Mega Search
23.2 Million


Sign Up

Make a donation  
What is the proper way to terminate an iOS app?  
News Group: embarcadero.public.delphi.platformspecific.ios

Hi,

I'm seeing this:
{code}
Unsupported platform service: Terminate
{code}

When closing the main form or doing Application.Terminate.

What is the proper way to terminate an iOS app?  (For example either the app has crashed or the user wants to logoff and close the app)

Of, if that is not possible, what is the proper way to restart an app that has crashed someplace and this is being caught in the Application.OnException event?

Gary
XE6 firemonkey iOS

Vote for best question.
Score: 0  # Vote:  0
Date Posted: 21-Nov-2014, at 12:59 PM EST
From: Gary Wardell
 
Re: What is the proper way to terminate an iOS app?  
News Group: embarcadero.public.delphi.platformspecific.ios
You should be able to automatically log off when the user presses the hardware home button with this:
https://forums.embarcadero.com/message.jspa?messageID=657381

Then you don't care if the app is still in the background or not.

As for needing to restart when your app crashes, I don't think there is any answer to that.

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 15-Dec-2014, at 5:16 PM EST
From: Douglas Rudd
 
Re: What is the proper way to terminate an iOS app? [Edit]  
News Group: embarcadero.public.delphi.platformspecific.ios
> {quote:title=Eli M wrote:}{quote}
> "On the iPhone there is no concept of quitting an app. The only action that should cause an app to quit is touching the Home button on the phone, and that's not something developers have access to."
> 

I just tested it and touching the home button does NOT close the app.  I even waited a half hour with the iPad sleeping and still it didn't close.

So apparently when I get into some sort of faulting situation I have to figure out some way of restating the app and reinitializing everything.

Is there any mechanism in firemonkey to do this?

Btw, the way I know it was still running is when I touched the icon it brought up the main screen and didn't ask me to logon.

Gary

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 14-Dec-2014, at 11:10 PM EST
From: Gary Wardell
 
Re: What is the proper way to terminate an iOS app?  
News Group: embarcadero.public.delphi.platformspecific.ios
"On the iPhone there is no concept of quitting an app. The only action that should cause an app to quit is touching the Home button on the phone, and that's not something developers have access to."

https://stackoverflow.com/questions/355168/proper-way-to-exit-iphone-application


I know what you're saying though. What if you DisposeOf all of the forms and then re-create the main one?

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 21-Nov-2014, at 3:52 PM EST
From: Eli M