is it possible somehow make an app like service, which send every for example hour notification to user and will be running on background all the time? Thanks
-
1No, your app can't achieve this using any type of background mode since you only get very limited time in the background. The closest thing to what you want would be push notifications and all the logic would just sit server-side. – DBoyer Oct 05 '15 at 21:38
-
Please at least try to search the previous questions before asking something that has been asked and answered many times before http://stackoverflow.com/questions/11044095/ios-keep-an-app-running-like-a-service/11044108#11044108 – Gruntcakes Oct 05 '15 at 22:11
2 Answers
You technically could make an app nearly always runs in the background but you wouldn't be able to get it on the App Store.
A few things to note about apps running in the background:
An app only runs in the background for up to 3 minutes before it's shut down by iOS.
Apps are woken up in the background by a few different types of notifications: geolocation, remote, and scheduled. With each notification, the app can only be open for up to 3 minutes.
If you were really serious about having an app always be running, you could schedule a notification every 3 minutes to keep the app alive.
But I highly recommend not doing that. What do you want the application open for?

- 2,411
- 1
- 18
- 26
It IS possible, but not for an app store app.
What you have to do is set up your app with the background mode for playing sound in the background, and then either play a silent sound constantly, or ask for background time, and when it expires, play a short sound before asking for more background time.
By doing that you can run constantly in the background. From the background you can trigger local notifications or a few other things.
Note that the above will absolutely, positively, cause your app to be rejected from the app store and will also drain the user's battery faster than normal.

- 128,072
- 22
- 173
- 272