Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

erdinc27

macrumors regular
Original poster
Jul 20, 2011
168
1
Is it possible to run the application still when the user taps to home button two times and remove the application from background ?
 
When the app is killed by the user from the task bar that's it. It's killed. There may be some cases where the app is restarted by the system but in the normal case the app stays killed.
 
so how about the situation there the user didnt Kill the application just took it background by using home button. As i know the OS will terminate it after a certain time. If so is it possible to restart it by device with the user settings that were set before application was killed ?
 
If an app goes to the background it isn't necessarily killed. It's only killed if the system decides to do this. The usual explanation would be due to memory pressure, but the OS can do what it likes. If your app has started a background task it will continue to run until the timeout. Then it will be backgrounded but not killed. An app may stay in the background for weeks without being killed.

If you want your app to restart in the same state it was in when it went to the background, regardless of whether the app was simply backgrounded or was killed, then it is up to your app's code to do this. Apple provides some capability to do this but usually you have to do something specific for your app to make this work.
 
If an app goes to the background it isn't necessarily killed. It's only killed if the system decides to do this. The usual explanation would be due to memory pressure, but the OS can do what it likes. If your app has started a background task it will continue to run until the timeout. Then it will be backgrounded but not killed. An app may stay in the background for weeks without being killed.

If you want your app to restart in the same state it was in when it went to the background, regardless of whether the app was simply backgrounded or was killed, then it is up to your app's code to do this. Apple provides some capability to do this but usually you have to do something specific for your app to make this work.

Thank u for useful information. I saved some informations to NSUserDefaults then read it back from there when the app is active again.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.