iOS Question Run code when application is in background

Adilson Jacinto

Active Member
Licensed User
Longtime User
Hi there, hope someone can help me here, I previously had developed an application in phonegap build which allowed me to compile my html5 files in object c files to be able to upload my app on iTunes. Anyway when i developed I had a problem with background run because as soon you press the home button that pauses the app, but found a plugin for phonegap build which allowed me to overcome this issue "window.plugins.BackgroundJS.UnlockBackgroundTime", Then when I uploaded my app on iTunes, apple rejected it but they also said to allow me to use this background mode I would have to write a description that they provided me, and then I managed to upload it successfully.

Right now i am trying to the same with B4i but I don't know how to allow the app to run in the background?

Please help...

Thanks
 

Adilson Jacinto

Active Member
Licensed User
Longtime User

I have indeed read this article, and I need to use a long-running task in my app? I have a timer in my app that runs every 10 secs to check a values from my databse an then if it does it will notice the user. Can you help please?

Even if we have to force the app to run in the background. Like I said I have already done this with phonegap build using a plugin
 
Upvote 0

Adilson Jacinto

Active Member
Licensed User
Longtime User

I tried to do something yesterday which it is weird, I created a timer which runs every second, then I created a variable "Count" and I increase this by 1 in the timer1_Tick and a label to display the value. Right I then click the home button and after 10 seconds and the values were still going up? So my question is, if the app does not run in the background how comes the values carried on running instead of pausing where I left???
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…