Working with settings.plist to keep app from exiting.
Posted: Sat Dec 29, 2012 2:49 pm
Hi Everyone,
I removed the following key in settings.plist from one of the simulators in the LiveCode folder so the app will keep running when the home button is tapped.
Part of this code executes only after the home button is tapped.
The "if" statement does not execute because I noticed that "LblMinutes" is not updated when I tap the app to re-display it, but "lblCurrentTime" is constantly being updated even 15 minutes after tapping the home button. I will be placing code to play an audio file in the "if" statement if I can get this to work.
If I keep the app running on the simulator screen, then all of the coding executes.
Can you tell me if something else needs to be done in settings.plist ?
Thanks.
I removed the following key in settings.plist from one of the simulators in the LiveCode folder so the app will keep running when the home button is tapped.
Code: Select all
<key>UIApplicationExitsOnSuspend</key>
${APPLICATION_EXITS_ON_SUSPEND}
Code: Select all
on updateTime
put long time into field "lblCurrentTime"
send "updateTime" to me in 500 milliseconds
set the itemDel to ":"
if word 1 of item 3 of the field "lblCurrentTime" = "00" then
put word 1 of item 2 of the field "lblCurrentTime" into the field "lblMinutes"
end if
end updateTime
If I keep the app running on the simulator screen, then all of the coding executes.
Can you tell me if something else needs to be done in settings.plist ?
Thanks.