The app is still running in the background of Xcode 4.2 iOS 5

I wrote an application on Xcode 4.2 using the iOS SDK 5.0.

I installed UIApplicationexitonsuspend in info.plist in YES, but when I double-click the home button, the application is still in the multitasking panel.

I uninstalled the application from iPhone 4 and send it again with Xcode, but still the output to suspend does not work. the app is still lingering on the multitasking tab.

+4
source share
3 answers

The fact that the icon of your application appears on the multitasking tab does not mean that your application still exists.

The "multitasking tab" simply displays a list of all running applications.

An easy way to evaluate if the application starts up again when you touch it, follow these steps:

  • run the application;

  • close it by pressing the "home" button;

  • restart the application and check the image that it shows at startup. If this image is your "Default.png" image, the application has been restarted. If you find your application in the state that you left it, the application simply was activated again (i.e. it was in the background).

A more advanced way to see what happens when the application starts is to place the NSLog trace in the application delegation methods:

 - (void)applicationDidEnterBackground:(UIApplication *)application { } - (void)applicationWillEnterForeground:(UIApplication *)application { } 

If you see printed tracks, this means that the application did not stop when paused.

Conversely, you can put the trace in:

 - (void)applicationWillTerminate:(UIApplication *)application { } 

if it is called when you press the home button, the application does not enter the background state, rather, it quits.

+4
source

If you want your application to not run in the background. Follow these steps: - Open the info.plist application, and then add another attribute of it: "The application does not start in the background" and make sure the checkbox is selected for this attribute. Now save, rebuild and run the application again. Therefore, your application will not work in the background.

0
source

"The application does not work in the background", and "UIApplicationexitonsuspend" is the same key

0
source

Source: https://habr.com/ru/post/1388036/


All Articles