سؤال

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.

هل كانت مفيدة؟

المحلول

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

نصائح أخرى

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

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!

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.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top