Working with settings.plist to keep app from exiting.

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
rleiman
Posts: 56
Joined: Fri Dec 14, 2012 11:28 am
Location: Boston, MA
Contact:

Working with settings.plist to keep app from exiting.

Post by rleiman » 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.

Code: Select all

<key>UIApplicationExitsOnSuspend</key>
${APPLICATION_EXITS_ON_SUSPEND}
Part of this code executes only after the home button is tapped.

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
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.

rleiman
Posts: 56
Joined: Fri Dec 14, 2012 11:28 am
Location: Boston, MA
Contact:

Re: Working with settings.plist to keep app from exiting.

Post by rleiman » Sat Dec 29, 2012 3:35 pm

I'm going to try MergeBgTask.

I think that will allow the code to execute.

gpb01
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 281
Joined: Sat Jun 04, 2011 5:41 pm
Location: Switzerland

Re: Working with settings.plist to keep app from exiting.

Post by gpb01 » Sat Dec 29, 2012 6:25 pm

rleiman,
as I already indicated to you in another post, or you understand this : http://developer.apple.com/library/ios/ ... sFlow.html or is totally unuseful that you continue your attempts !

Is NOT necessary to understand the C language, IS NECESSARY to understand the concepts and how iOS work !!!

Guglielmo

P.S. : And ... NO, with mergeBgTask you just can ask iOS for few more minutes (10 minutes) before your app is suspended !

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”