每天在特定时间呼叫方法 [英] Calling A Method At Specific Time Every Day
问题描述
我的应用程序在自助服务终端模式下不断运行。在特定时间每24小时一次,我需要将核心数据中的一些数据同步到Web服务。
My app runs constantly in kiosk mode. Once every 24 hours at a specific time I need to sync some data from core data to a web service.
我知道如何进行同步,但我不知道如何安排应用程序在每天的特定时间进行同步通话,例如在凌晨02:45。
I know how to do the sync piece but I don't know how to schedule the app to make the sync call at a specific time each day e.g. at 02:45 am.
当应用程序不断运行时,是否可以执行此类操作?
Is it possible to do something like this when an app is running constantly?
推荐答案
使用本地通知。这是一个教程: http:// www。 icodeblog.com/2010/07/29/iphone-programming-tutorial-local-notifications/
Use Local Notifications. Here is a tutorial:http://www.icodeblog.com/2010/07/29/iphone-programming-tutorial-local-notifications/
希望这有助于你开始...
Hope this helps u to start...
这也是:
这篇关于每天在特定时间呼叫方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!