问题
I need to be able to ensure that the iphone is always connected to a network. If it loses reception I need to be able to warn the user. Since the only way I see this working is using a background process is it possible to use private APIs so that the app can run in the background.
I know it can be done with Jailbroken phones but I would rather not Jailbreak the phones.
回答1:
If you mean having this behavior while running an app; check out the Reachability sample.
If you mean having this behavior while not running an app; check out Android.
回答2:
There is currently no way to run a background process.
You can send notifications to the phone while it is connected to a network, but obviously there is no way to send a notification when it is disconnected.
来源:https://stackoverflow.com/questions/1624080/iphone-background-app-in-ad-hoc-distribution