2013-10-13 53 views
0

我正在嘗試創建一個應用程序,其中每個PFObject的類別分別爲VerificationsVerified_By解析 - PFObject不更新

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

你試過' saveInBackgroundWithBlock'並檢查錯誤? – Wain

+0

@所以我做了,我收到了輸出:'Error Domain = Parse Code = 101「無法完成操作(解析錯誤101。)」'以及找不到更新對象。我介紹了這一點,並且本地設備上的所有數據都是正確的。 – Jeeter

+0

對象有什麼關係/角色? – Wain

回答

1

事實證明,我沒有合適的ParseACL需求(公共讀取= TRUE,公共寫=真)