armanb21
armanb21

Reputation: 53

How would you check if the user has been active and push it to Parse?

I have no idea how to even go about doing this feature but I'm trying to check if the user has been active in the last four months and if they haven't delete their account. My app uses Parse.com and objective-c.

I would really appreciate any help.

Edit: @YuviGr helped me with the logic of the code but if you'd like to take a look at the finished code you can visit it by going to:

Upvotes: 0

Views: 94

Answers (1)

YYfim
YYfim

Reputation: 1412

Every object you insert into the Parse.com DataBase has 4 default values.

  • objectId
  • createdAt
  • updatedAt
  • ACL

You can use the updatedAt value to figure out when was the last time the user entered the app. Just remember to save the user every time he logs into the app so the updatedAt value can be updated.

As for the detection and deletion. You can do the test once a user tries to log in your app, if the last time he logged was more then X months then delete/invalidate the user account.

Upvotes: 1

Related Questions