在某个时间触发一个动作,可以吗?
我正在研究iPhone的开发,我想知道是否可以在特定时间触发一个动作?
根据我所读到的内容,目前这似乎不是一个选项,因为不允许后台进程。 这是真的? 如果是这样,你们对替代方案有什么想法吗?
谢谢
I am just looking into development for the iPhone and I was wondering if it is possible to trigger an action at a certain time?
Based on what I have read it does not seem like this is currently not an option because there are no background processes allowed. Is this true? If so do you guys/gals have any ideas on alternatives?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您的应用程序未运行,那么不,目前不可能。
如果您的应用正在运行,您始终可以使用
NSTimer
。此外,此处提到了手动触发方法,其中涉及发送包含导致应用程序启动的链接的电子邮件。
If your app is not running, then no, it's not currently possible.
If your app is running, you can always use
NSTimer
.Also, a manual trigger method was mentioned here on SO that involves sending emails with links in them that cause your app to start.
您可以阅读这篇关于推送通知服务:Apple 在以下位置运行 iPhone 应用程序的解决方案的文章:背景,这可能会有所帮助。
You can read this article about Push Notification Service: Apple's Solution to run iPhone Apps in the background, which may be of help.