I can not update a record in Parse; Error: “object not found for update (Code: 101, Version: 1.2.16)”

后端 未结 5 2213
走了就别回头了
走了就别回头了 2020-12-18 22:19

I am using Parse as my backend for one of my native iOS app. I am not able to update a record on a table in Parse. First I query the object that I want to update it. So, \"o

5条回答
  •  情歌与酒
    2020-12-18 23:15

    The error : "object not found for update (Code: 101, Version: 1.2.16)" append when the you try to save an object that the user does not have ACL access.

    In order to let the user change the object you need to set PFACL permission when you create the object :

    For a specific user :

    PFObject *object = /*the object you want to save*/
    NSString *userID = /*the objectID of the user you want to let perform modifications later*/
    PFACL *groupACL = [PFACL ACL];
    [groupACL setWriteAccess:YES forUserId:userID];
    object.ACL = groupACL;
    

    For a all users :

    PFObject *object = /*the object you want to save*/
    PFACL *groupACL = [PFACL ACL];
    [groupACL setPublicWriteAccess:YES];
    object.ACL = groupACL;
    

提交回复
热议问题