0

Iv'e been working on a topdown shooter game in Sprite-Kit using Swift and Xcode. I was wondering if there was a simple way to make a notification pop up if the user stops playing the app for a certain time (like 2 days for example.)

Also if I decide to add waiting in the future, can I make a notification pop up after and upgrade or something is complete? (this could also help other people viewing this post)

There is probably a similar way of doing these things but I would prefer if there was a simpler was as I am a bit new to Sprite-Kit and I don't want anything to complicated. A function would be nice if possible! :)

Thanks in advance!

1 Answers1

0

If I am understanding you correctly sounds like the problem you are trying to solve has nothing to do with SpriteKit on it's own, but it's more related to triggering of a local or a push notification.

  • One way to achieve what you are trying to do is to make an object/module that it's sole responsibility is to count the application usage, when user opens the app or however you want to count that. You can trigger local notification that prompts the user that they haven't played the game for the past X days and every time the user uses the app you cancel the old notification and post a new one for the next X days.

  • Second option would be a server to manage the notifications via push notifications and your app will need to support push notification also tell the server whenever it's used so the server could notify if the app is not used for the past X days.

Todor Brachkov
  • 219
  • 1
  • 9