applicationWillTerminate

Hello, you can call the applicationWillTerminate ( ) method from the main viewController ?

Thank you Senatore Massimo

Replies

No, you don't call that API directly. That will be called by the system as needed. What are you trying to do?

How else can I put in app backgroung by viewController source ?


Thanks

Massimo Senatore

When i use :

exit(0), app is launched into the backGround state ?


Thank you

Massimo Senatore

You don't. Users will put apps in the background as they switch to other apps. When an app is moved to the background, delegate APIs such as applicationDidEnterBackground are called. You then implement those delegate APIs to do the work you need. See the documentation on UIApplicationDelegate for details.

We are testing an app security

Thanks

Massimo Senatore

Please have a sample script ?

Massimo Senatore

An iOS app can put itself in the background by sending Safari a valid openURL message, which will launch Safari into the foreground.