Watch, Follow, &
Connect with Us

Please visit our new home
community.embarcadero.com.


Welcome, Guest
Guest Settings
Help

Thread: What is the proper way to terminate an iOS app?


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 3 - Last Post: Dec 15, 2014 5:16 PM Last Post By: Douglas Rudd
Gary Wardell

Posts: 241
Registered: 11/13/03
What is the proper way to terminate an iOS app?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 21, 2014 12:59 PM
Hi,

I'm seeing this:
Unsupported platform service: Terminate


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
Eli M

Posts: 1,346
Registered: 11/9/13
Re: What is the proper way to terminate an iOS app?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 21, 2014 3:52 PM   in response to: Gary Wardell in response to: Gary Wardell
"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?

Gary Wardell

Posts: 241
Registered: 11/13/03
Re: What is the proper way to terminate an iOS app?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 14, 2014 11:08 PM   in response to: Eli M in response to: Eli M
Eli M wrote:
"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
Douglas Rudd

Posts: 314
Registered: 5/16/97
Re: What is the proper way to terminate an iOS app?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 15, 2014 5:16 PM   in response to: Gary Wardell in response to: Gary Wardell
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.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02