5

My application runs in background in iOS 5 and iOS 6, but in iOS 7 it is creating problem.

When I see in console application continues doing task in background, but when I click on app to come in background then the app comes to the first screen of application(when we start the application). In console it does not tell that app crashes or something like that. It even does not print console messages written in applicationWillEnterForeground and applicationDidBecomeActive method. I am not getting the issue. I am building through iOS6 and installing the app in iOS7. Please help.

Stephane Delcroix
  • 16,134
  • 5
  • 57
  • 85
Vibhooti
  • 1,193
  • 2
  • 9
  • 20
  • 3
    Take a look http://stackoverflow.com/a/18962839/1597744 – Toseef Khilji Oct 10 '13 at 10:38
  • 1
    how do games like Temple Run, Candy Crush etc continuously run in background? My app sometimes runs in background in ios7, and randomly does not run,it restarts, does not crash but restarts, even though both the time I don't do anything which may create memory problem. – Anjani Oct 10 '13 at 12:39

1 Answers1

0

You should first understand how applications are ran in background on iOS. It usually depends on how fast do you reopen the application.

  • If the application was killed by OS, then you will always get the first screen when running and your app should be the one to save the state and restore it after opening it again.
  • Applications keep running for few seconds in background and then they are put in suspended state.
  • After a certain period of inactivity they are killed by the OS to preserve battery life and memory.
  • In certain situations (low memory is one example) applications in the background can be killed sooner.

Please read the following document:

https://developer.apple.com/library/ios/documentation/iphone/conceptual/iphoneosprogrammingguide/ManagingYourApplicationsFlow/ManagingYourApplicationsFlow.html

For a more accurate reply to your question, please provide more information.

Legoless
  • 10,942
  • 7
  • 48
  • 68