我想允许所有用户都能写入任何行。当他们要求关注某人时,他们会自己添加“#到该用户的pendingFollowers行。但是,当我尝试这个时,在日志中我得到错误" [错误]:找不到对象。"。我已将安全权限设置为该类的写入和读取,因此我认为它不应成为问题。我的代码目前有点笨拙,但希望你能得到这个想法。我在这里显示权限设置正确(或者我相信)。
// This does get hit
print("#124 got hit")
// This says that there are 1 objects
print("There are this amount of objects " + String(describing: objects?.count))
currentPendingUsers.append(nameOfMostRecent)
for i in 0...currentPendingUsers.count-1 {
print("#125 got hit")
// This shows the other user which this person has requested to follow
print(currentPendingUsers[i])
}
// This tries to add the user to pending followers row - where the error is thrown
object.addUniqueObjects(from: currentPendingUsers, forKey: "PendingFollowers")
object.saveInBackground()
}