task switch results in app being restarted

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
dcpbarrington
Posts: 87
Joined: Tue Nov 13, 2007 6:40 pm

task switch results in app being restarted

Post by dcpbarrington » Wed Feb 03, 2016 11:02 pm

Forum,

I have a couple of iOS apps that I have developed in LiveCode. In the apps I have a help system that opens up a browser and takes the user to a context specific help page. Works like a champ.

Now here is the frustrating issue. When I double click the home button to display the running apps, there is my LiveCode app and Safari running on the iPhone. Every time I go back to the LiveCode app, iOS completely restarts the app. The user is taken back to the splash screen and needs to re-authenticate. This is a real pain in the butt.

My understanding is that iOS keeps the app in memory and it should just start from where the user was when you switch back to the app.

As far as I can tell the LiveCode app and Safari are the only two processes running on the phone so there shouldn't be a memory issue that would require the app to be restarted.

I'm able to switch between other apps without the app being restarted every time. Is this a LiveCode issue on iOS?

Is there something that I need to configure?

Would love to understand if others are having this same issue.

Thanks
Dan

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4163
Joined: Sun Jan 07, 2007 9:12 pm

Re: task switch results in app being restarted

Post by bn » Wed Feb 03, 2016 11:35 pm

Hi,

have a look at this recent discussion on the use-list:

http://runtime-revolution.278305.n4.nab ... 00634.html

Kind regards
Bernd

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: task switch results in app being restarted

Post by Dixie » Wed Feb 03, 2016 11:42 pm

Are you opening a browser built in the app or passing the URL off to safari ?

quailcreek
Posts: 746
Joined: Sun Feb 04, 2007 11:01 pm

Re: task switch results in app being restarted

Post by quailcreek » Thu Feb 04, 2016 1:41 am

Here's another place to look. I use something similar to this for all my mobile apps. If you want to investigate this further I can share the code I use.

http://lessons.livecode.com/m/4069/l/15 ... ile-device
Tom
MacBook Pro OS Mojave 10.14

dcpbarrington
Posts: 87
Joined: Tue Nov 13, 2007 6:40 pm

Re: task switch results in app being restarted

Post by dcpbarrington » Thu Feb 04, 2016 5:55 pm

Thanks for the followup on this issue.

Right now I'm launching a URL in safari. I expect this issue would go away if I would create a help browser in the app and not use an external browser.

So it looks like you need to do a special handler to take the user back to where they were before the suspend. I will look into what would be involved.

NOTE: This is not an issue on Android.

Thanks for the information.
Dan

Post Reply