我正在尝试创建一个应用,其中每个PFObject
都有类别Verifications
和Verified_By
。
Verifications
由一个数字组成,Verified_By
是一个字符串数组
当我尝试更新类别并保存PFObject
时,数据是正确的并在本地保存,但是当我调用saveInBackground
时,它不会在数据浏览器中更新。
以下是我的更新代码:
if (![verifiedBy containsObject:[ViewController getUserName]]) {
//havent verified
NSMutableArray *newArray = [NSMutableArray arrayWithArray:verifiedBy];
[newArray addObject:[ViewController getUserName]];
[toModify setObject:newArray forKey:@"Verified_By"];
[toModify incrementKey:@"Verifications"];
[toModify saveInBackground];
[[[UIAlertView alloc] initWithTitle:@"Verified!" message:@"You have successfully verified this" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil, nil] show];
}
else {
[[[UIAlertView alloc] initWithTitle:@"Already Verified" message:@"You have already verified this" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil, nil] show];
答案 0 :(得分:1)
事实证明我没有正确的ParseACL
需求(public read = true,public write = true)