Skip navigation
juliojfc
Currently Being Moderated

How to quit/exit an iOS app?

Jun 28, 2011 10:07 AM

NativeApplication.nativeApplication.exit() does not seem to work on iPad!

 

Using sdk 2.7, it works fine on Flash builder, but once deployed to an iDevice nothing happens, the app does not quit!.

 

I've already included the extra key in the iPhone InfoAdditions:

<key>UIApplicationExitsOnSuspend</key>

<string>YES</string>

Still no dice... I have to force quit the app via the double-tap-Home trick.
Any ideas/suggestions welcome.
julio

  • Currently Being Moderated
    Adobe Employee
    Jun 29, 2011 7:43 AM

    Hi,

    Could you try with the following syntax?

     

     

    <key>UIApplicationExitsOnSuspend</key>

    <true/>

     

    Thanks,

    Sanika

    |
    Mark as:
  • Currently Being Moderated
    Community Member
    Jun 29, 2011 5:33 PM

    Hi,

    @Julio

    is your application frozen or in supsended state? If no - but you're facing "bad" state in your application you need to handle that state in such way that while supporting multitasking - your application is reset to "proper" state - as there is no support on iOS for programmatic termination (so native application cannot just terminate itself).

    http://developer.apple.com/library/ios/#qa/qa1561/_index.html

     

    hth,

    regards,

    Peter

    |
    Mark as:
  • Currently Being Moderated
    Adobe Employee
    Jun 30, 2011 6:02 AM

    Hi,

    iOS does not provide a way to exit the application. So it is expected that nativeApplication.exit() won't work on iOS and it does on Android.

    One question, how are you making sure that you application is not relaunching? The fact that you see it on double-tap Home does not mean that it did not exit. This is because double-tap Home in iOS 4 gives you a list of recently launched applications.

    Hope that helps.

     

    Thanks,

    Sanika

    |
    Mark as:
  • Currently Being Moderated
    Community Member
    Sep 19, 2011 7:38 PM

    julio

    I've been playing with this same problem for ages - just found your post. and the link to devgirls.

    What code have you put in to identify when starting from scratch? if I may ask please.

     

    I am strongly suspecting that this latest ios4 on my iPhone is still not doing it properly?

    although this discussion really cleared up a lot of mystery for me

     

    thanks

    Robert

    |
    Mark as:
  • Currently Being Moderated
    Community Member
    Sep 19, 2011 8:19 PM

    Julio,

    Thanks. Excellent.

    That’s exactly what I mean.

    I have put in an option to [Reset] my app, that clears the SharedObjects, but of course with the thing in suspended state, it pretty much gets lost after that.

     

    So, in theory, I should

    Clear SharedObjects

    Exit

    Press home button ( to completely shut down the app)

     

    I need to be able to allow users to log into a different login, other than one currently stored in SharedObject, so I needed to clear those, and do a reload as well as restart. Seems like a lot of footwork just to get the thing to … begin at the beginning..

    Hmmm.

    This is an interesting 'feature' for sure.


    Thanks Julio.

    Robert

    |
    Mark as:
  • Currently Being Moderated
    Community Member
    Jan 16, 2012 10:44 PM

    Awesome! Nice to know that 2 days of testing means I am not crazy and it just doesn't work. Excellent. Truly, now I can move on with a solution.

    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points