Detecting when an iOS app quits

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Jellicle
Posts: 453
Joined: Thu Feb 24, 2011 11:07 am

Detecting when an iOS app quits

Post by Jellicle » Fri Mar 25, 2011 12:35 am

Can we detect when our apps have been closed by users? Closestack, suspend and shutdown don't seem to work.

Gerry
14" MacBook Pro
Former LiveCode developer.
Now recovering.

BvG
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1239
Joined: Sat Apr 08, 2006 1:10 pm
Contact:

Re: Detecting when an iOS app quits

Post by BvG » Fri Mar 25, 2011 12:40 am

Don't really know, but maybe suspend or suspendStack works?

I'd consider this a bug, probably?
Various teststacks and stuff:
http://bjoernke.com

Chat with other RunRev developers:
chat.freenode.net:6666 #livecode

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

Re: Detecting when an iOS app quits

Post by bn » Fri Mar 25, 2011 12:42 am

Hi Gerry,

I use

Code: Select all

on shutDown
-- code here
end shutDown
to save data from a data stack in

http://forums.runrev.com/phpBB2/viewtop ... =49&t=6834

It does save the stack.

Kind regards

Bernd

Jellicle
Posts: 453
Joined: Thu Feb 24, 2011 11:07 am

Re: Detecting when an iOS app quits

Post by Jellicle » Fri Mar 25, 2011 12:55 am

That is so strange. I wrote some code to read a file at openstack and write it at shutdown, and it never seemed to write it. Just tried again, and it did. I guess I need some sleep, or LiveCode needs a rest, or something :)

Many thanks :)
14" MacBook Pro
Former LiveCode developer.
Now recovering.

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

Re: Detecting when an iOS app quits

Post by bn » Fri Mar 25, 2011 1:03 am

Hi Gerry,

In case you run into trouble with a save on shutdown:

make shure it is in the stack script if your stack has more than one card and beware that iOS is case sensitive for file names.

bit me before.

Kind regards

Bernd

Post Reply