手机启动时自动加载 iPhone 应用程序
我正在为组织内部使用做一种跟踪应用程序,并且不希望将其提交到应用程序商店。
我在应用程序中所做的是跟踪电话、消息等。
一旦我手动启动应用程序,我的应用程序就会在后台运行,并继续在后台运行,直到我关闭应用程序或电话已关机。
我想要添加到我的应用程序中的内容是,我想在手机再次打开时自动加载应用程序。
任何想法或指导都会有所帮助。 也欢迎使用私有 API 的建议。
I am doing a tracking kind of application for internal use of an organization and do not wish to submit it to app store.
What I am doing in the application is I am tracking the phone calls, messages etc.
My app runs in background once I start the app manually and keeps on running in the background until I close the app or the phone is switched off.
The thing that I want to add to my app is, I want to load the app automatically when the phone is switched on again.
Any idea or guidance will help. Suggestion for use of private apis is also welcome.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在私有 api 中,文件
SBApplication.h
中有您需要的所有方法。特别是:
等等,等等...
希望这有帮助。
In private api, in file
SBApplication.h
there are all methods that you need.In particular:
etc, etc...
hope this helps.
据我所知,您可以通过注册您的应用程序以进行重大位置更改来做到这一点。如果应用程序记录了重大位置变化,那么只要您的手机移动到新塔,应用程序就会收到更新。如果应用程序在更新发生时挂起,系统会在后台唤醒它来处理更新。
因此,如果您关闭应用程序并关闭手机,一旦手机重新启动,它就会获得更新,并且会强制您的应用程序在后台模式下运行。
有关详细信息,请阅读 iOS 编程指南:http: //developer.apple.com/library/ios/#documentation/iphone/conceptual/iphoneosprogrammingguide/BackgroundExecution/BackgroundExecution.html
希望有帮助
As far as I can understand you can do it by registering your app for significant location changes. If an app registers for significant location changes, as soon as your cellular phone moves to a new tower, app receives an update. If the application is suspended when an update occurs, the system wakes it up in the background to handle the update.
So if you close the app and turn of your phone, as soon as your phone will restart it should get an update and it will force your app to run in background mode.
For more info read iOS programming guide: http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iphoneosprogrammingguide/BackgroundExecution/BackgroundExecution.html
Hope it helps