iOS How to let the app run at background even if it is closed ?!

mlibary

macrumors newbie
Original poster
Jun 11, 2012
6
0
Hi every body;:rolleyes:

I'm in the middle of a xCode project and I need to know that how can I make my iPhone app run at background even if the user close it !!! :confused:
Like in reminder apps, it will remind you even if it is closed !!
How can I do that ?

Thanks in advance :D
 

ArtOfWarfare

macrumors G3
Nov 26, 2007
8,613
4,089
If you specifically want to make an app that pops up messages at specific times (like reminders,) you want to look up Local Notifications.

If you want something else to run in the background, you may be out of luck, as Apple only allows a select few types of apps to run in the background. (off the top of my head, I think apple allows geo-fence notifications, local notifications, push notifications, VOIP, and music streaming tasks to run in the background. I might be missing one or two.)

Here's a good apple doc to look at:
https://developer.apple.com/library...cationsFlow/ManagingYourApplicationsFlow.html

The whole doc is pretty relevant to what you want, but you'll especially want to focus on the last section called "Background Execution and Multitasking". They have lists of the types of activities your app is allowed to do in the background.
 
Last edited:

mlibary

macrumors newbie
Original poster
Jun 11, 2012
6
0
If you specifically want to make an app that pops up messages at specific times (like reminders,) you want to look up Local Notifications.

If you want something else to run in the background, you may be out of luck, as Apple only allows a select few types of apps to run in the background. (off the top of my head, I think apple allows geo-fence notifications, local notifications, push notifications, VOIP, and music streaming tasks to run in the background. I might be missing one or two.)

Here's a good apple doc to look at:
https://developer.apple.com/library...cationsFlow/ManagingYourApplicationsFlow.html

The whole doc is pretty relevant to what you want, but you'll especially want to focus on the last section called "Background Execution and Multitasking". They have lists of the types of activities your app is allowed to do in the background.

Thank you very much :)
 

dejo

Moderator
Staff member
Sep 2, 2004
15,981
450
The Centennial State
(off the top of my head, I think apple allows geo-fence notifications, local notifications, push notifications, VOIP, and music streaming tasks to run in the background...
Actually, push notifications are not really a background service but more of a iOS-level functionality. The app need not have been "backgrounded" in order to receive push notifications.
 

ArtOfWarfare

macrumors G3
Nov 26, 2007
8,613
4,089
Actually, push notifications are not really a background service but more of a iOS-level functionality. The app need not have been "backgrounded" in order to receive push notifications.
Hmm... I suppose you're correct, there is a difference, or else Sparrow could have just used push notifications as they wanted in their app.
 

jnoxx

macrumors 65816
Dec 29, 2010
1,343
0
Aartselaar // Antwerp // Belgium
Hmm... I suppose you're correct, there is a difference, or else Sparrow could have just used push notifications as they wanted in their app.
Opening Push Notifications will open your view, and you can send a dictionary with your Push Notification, which you can use to open a specific view right of the bat (even though you're newly opening the application).
 

Similar threads

  • theprizerevealed
0
Replies
0
Views
213
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.