LCUser *u = [LCUser currentUser];
if(u.ACL) {
//即之前设置过了acl,下次启动app后ACL依然是nil
}
else {
}
同样,修改ACL也报错
LCUser *u = [LCUser currentUser];
if (u) {
LCACL *acl = u.ACL;
//如果没有写权限,先要修改写权限
if(![acl getPublicWriteAccess]) {
acl = [LCACL ACL];
[acl setPublicWriteAccess:YES];
[acl setPublicReadAccess:YES];
u.ACL = acl;
[u saveInBackgroundWithBlock:^(BOOL succeeded, NSError * _Nullable error) {
if (error) {
/* 返回错误
code = 403;
error = "Forbidden writing by object's ACL.";
*/
}
else {
//
}
}];
}