3

I'm currently trying to create a little app that should run in background. It should start with the system or springboard and run until the device shut's down. I searched for tutorials out there but doesn't found anything really useful. It would be great if someone would help me out.

Best regards

EDIT: I'm sure that it isn't possible in an app designed for the appstore, but i'm looking for a variant that work's on jailbroken devices.

Nate
  • 31,017
  • 13
  • 83
  • 207
Lukas
  • 1,346
  • 7
  • 24
  • 49

4 Answers4

4

ColinE's answer is wrong. SuperDev's is correct. You certainly can create services on iOS, just as on OS X.

As another reference, the best tutorial I've found on the subject is Chris Alvares' blog post on creating an iOS Launch Daemon. (Launch Daemon is the proper iOS terminology for what you're describing)

You may find additional useful information within the Apple Docs for Launch Daemons, or searching for OS X information, instead of just for iOS, where it requires jailbreaking (and therefore is less widely used).

Cydia has lots of apps that are launch daemons, or contain launch daemons (possibly in addition to a UI application).

Community
  • 1
  • 1
Nate
  • 31,017
  • 13
  • 83
  • 207
2

Have you read about launch daemons? You could use one of those. An example is untrackerd by rpetrich, an awesome cydia developer.

s6luwJ0A3I
  • 1,023
  • 1
  • 9
  • 22
1

This is not possible, you cannot create 'service' type apps:

iOS: Keep an app running like a service

This is by design. Apple limits the the capabilities of your apps in order to ensure a good user experience. If everyone could create background services, it would soon slow down the user's phones - like a Windows PC!

Community
  • 1
  • 1
ColinE
  • 68,894
  • 15
  • 164
  • 232
0

Have you tried reading about Mobile Substrate? It let's you build extensions for the springboard. That way you could run the app in the background.

Siddharth Gupta
  • 897
  • 5
  • 20
  • 1
    Thank's for that, i've read about it, but found no good tutorials or something similiar. Do you know some? :) – Lukas Feb 18 '13 at 07:38
  • This solution requires jail-breaking. In other words, you cannot deploy this solution to users via the appstore. – ColinE Feb 18 '13 at 07:40
  • I know,.. I want to deploy the app via cydia as i wrote in the title. But how can i achieve this? Are there any tutorials out there? :) – Lukas Feb 18 '13 at 07:42