iOS questions

Monte Goulding monte at sweattechnologies.com
Sun Oct 14 23:28:43 EDT 2012


On 15/10/2012, at 2:10 PM, Mark Smith wrote:

> Monte Goulding wrote
>> on UIApplicationWillResignActiveNotification
>>   -- do your encryption here
>> end UIApplicationWillResignActiveNotification
> 
> I'm going to try:
> 
> 
> on UIApplicationWillResignActiveNotification
>   close this stack
> end UIApplicationWillResignActiveNotification

Hmm... I'm not positive that's the best plan as you will probably find your stack is closed when the user awakens their phone. I would suggest something like this:

on closeStack
  encryptItAll
end encryptItAll

on UIApplicationWillResignActiveNotification
  encryptItAll
end UIApplicationWillResignActiveNotification

on encryptItAll
  -- do your encryption and save
end encryptItAll

If you really want to force quit at sleep then try:

on UIApplicationWillResignActiveNotification
  quit
end UIApplicationWillResignActiveNotification

Not sure if apple will be happy about that though....

Cheers

Monte

--
M E R Goulding 
Software development services
Bespoke application development for vertical markets

mergExt - There's an external for that!




More information about the use-livecode mailing list