Reputation: 51
I am using parse to store some objects in my app. When the app terminates I want to delete the objects created with a certain ID. I used the applicationWillTerminate method to post a NSNotification which triggers this method:
public func deleteStuff(notification: NSNotification){
print("DELETE STUFF NOW")
//DELETE MESSAGES
for messageObject in messageObjectArray {
messageObject.deleteInBackground()
}
}
When this method is called, all of the objects in the messageObjectArray should be deleted but they are not. Maybe this is because the application terminates before the method can finish deleting the objects or maybe I am doing something else wrong. Does anybody have a solution?
Upvotes: 0
Views: 27