PDA

View Full Version : How to run an iPhone non-GUI application in background




Amit Jain
Dec 29, 2008, 11:34 PM
Hi All,

While looking into the web fouond that only one application can be run at a time in iPhone. So is there any way or work around to run a non-GUI app in iPhone in Background.
This app will continuously query certain requests to iPhone regardign some internal iPhone events.
Thanks in advance.
Regards.
Amit



firewood
Dec 30, 2008, 12:17 AM
Try another forum where they discuss non-Apple-SDK development for jail-broken devices.

.

Amit Jain
Dec 30, 2008, 12:29 AM
Try another forum where they discuss non-Apple-SDK development for jail-broken devices.

.

Thanks..
You mean to say that this cannot be done directly using apple SDK. Is something illegal or how can jail broking help in this kind of developement. can you help in technical terms.
I will also take your suggesstion and go to soem other forum.
Thnx again.

fishkorp
Dec 30, 2008, 09:04 AM
Per SDK guidlines your app cannot run in the background and not operate outside it's sandbox, other than by the means Apple provides. So you can access the camera, photos, and contacts, but that's about it. You can't have your app call another app or use any private frameworks. To achieve what you want you'd have to make an app for jailbroken phones, not something that would be available on the App Store.

firewood
Dec 30, 2008, 09:47 AM
In more technical terms, the stock iPhone OS runs a daemon which will kill any background user process it finds. And any app which tries to start another process won't go in the App store, since this violates term-of-use of the SDK.

.

tusharbhatta
Jan 7, 2009, 05:04 AM
So can I write an application that will launch in a specific time and to some task ?

Push service may be not an way here as it requires network. Is applescript the solution ?

If you know something could u plz throw some pointer ?



Thanks

robbieduncan
Jan 7, 2009, 05:19 AM
So can I write an application that will launch in a specific time and to some task ?
Not using the SDK no.

Is applescript the solution ?
There is no AppleScript on the iPhone

tusharbhatta
Jan 7, 2009, 07:13 AM
Not using the SDK no by robbieduncan

Did you mean to say that there is other way around ( not using sdk ) ?

robbieduncan
Jan 7, 2009, 07:16 AM
Did you mean to say that there is other way around ( not using sdk ) ?

Probably on jailbroken phones yes, but I have no experience of that.

CommanderData
Jan 7, 2009, 07:18 AM
by robbieduncan

Did you mean to say that there is other way around ( not using sdk ) ?

That is exactly what he meant. BUT, you will need to jailbreak your phone, and any phone you want to run this on, and it will not be allowed in the app store. For the "how" you'll need to go find a jailbreak/unofficial iPhone programming forum...

piz
Jan 7, 2009, 09:15 AM
Hi All,

While looking into the web fouond that only one application can be run at a time in iPhone. So is there any way or work around to run a non-GUI app in iPhone in Background.
This app will continuously query certain requests to iPhone regardign some internal iPhone events.
Thanks in advance.
Regards.
Amit

If you like to run a non-GUI app in background, why instead not to use a Timer procedur that does the job?

Amit Jain
Jan 7, 2009, 10:23 PM
If you like to run a non-GUI app in background, why instead not to use a Timer procedur that does the job?

Actually I am trying to make an app which always will run in the background of iPhone by timer how can we do that could you plz elaborate it will really help me.

drivefast
Jan 7, 2009, 11:38 PM
amit: there is no way to do that using the sdk. it's a big no-no, at least for now, and you have to live with it. we would probably have had twice as many apps in the itunes store if this feature would be acceptable, and apple would have twice as many customers calling in and complaining about the battery life.

piz: if the application is terminated, the timer is destroyed. to keep the timer alive you would have to keep the application alive, you would have to keep the screen lit up and so on.

chka
Jan 8, 2009, 10:06 AM
amit: there is no way to do that using the sdk. it's a big no-no, at least for now, and you have to live with it. we would probably have had twice as many apps in the itunes store if this feature would be acceptable, and apple would have twice as many customers calling in and complaining about the battery life.

piz: if the application is terminated, the timer is destroyed. to keep the timer alive you would have to keep the application alive, you would have to keep the screen lit up and so on.

what about plaing audio? it continue to play when I run other applications... And Apple says you can write same power applycations with their SDK as they did themself! So they are lying? :-)

robbieduncan
Jan 8, 2009, 10:09 AM
what about plaing audio? it continue to play when I run other applications... And Apple says you can write same power applycations with their SDK as they did themself! So they are lying? :-)

Apple apps like Mail and iPod can keep running in the background: yours can't. Whether you think that's Apple lying or not is up to you...

firewood
Jan 8, 2009, 11:05 AM
And Apple says you can write same power applycations with their SDK as they did themself! So they are lying? :-)

You might be able to use the SDK to write those application, but the OS won't run them, and the App store won't accept them.

e.g. the OS will kill any user background process, but not Apple's own Mail/iPod/etc. apps. (If you boot your own phone OS, of course, all bets are off... and not a topic for this forum...)

.

v3lvet
Jan 20, 2010, 02:19 AM
Amit/chka...
Look at some of the work done for jailborken apps like Backgrounder, aTimeTool, SBSettings, LockDown, iProtect, and other background running apps and contact those developers. They've done some very good work at managing battery life while running some small processes needed for their apps