Trip Phillips
Trip Phillips

Reputation: 440

Deleting objects in Parse with NSTimer

In the app I'm making I need objects to delete themselves after a certain amount of time in Parse. I'm pretty sure I need an NSTimer but I'm not positive. Is there anyone that could help me? Thanks

Upvotes: 0

Views: 68

Answers (1)

Kelvin Lau
Kelvin Lau

Reputation: 6781

You can do it with NSTimer, but depending on your use case, that may not be ideal.

NSTimer will stop running in the background after a specific amount of time. See: How to run NSTimer in background beyond 180sec in iOS 7?

Futhermore, if your app is not running, you will not be able to do this time based deletion in your Parse database.

What is ideal is to have background jobs running in the Parse cloud. See: http://blog.parse.com/announcements/introducing-background-jobs/

and the Parse documentation for further details.

Upvotes: 1

Related Questions