无法删除PFObject?

时间:2015-04-13 22:40:16

标签: ios xcode swift parse-platform

我试图删除一个PFObject,但是我收到了这个错误:

[Error]: object not found for delete (Code: 101, Version: 1.7.0)

这里是我的代码

var newQuery = PFQuery(className: "Transfer")
newQuery.getObjectInBackgroundWithId(object.objectId!, block: { (newObject, error) -> Void in
    if error == nil {
        println("newObjectId : \(newObject!.objectId)")
        newObject!.deleteInBackgroundWithBlock( { (success, err) -> Void in
                if error == nil {
                   if success {
                         println("Deleted Successfully")
                   }
                 } else {
                     println("Error : \(err?.localizedDescription) \(err?.userInfo)")
                }
        })

   } else {
       println("Error : \(error?.localizedDescription) \(error?.userInfo)")
   }
})

我println()我获取的newObject的一些值,一切都是正确的,所以我不明白为什么它找不到删除的对象?

1 个答案:

答案 0 :(得分:1)

我认为这是因为该对象具有只读权限。查看此thread了解详情

祝你好运