How to keep NSTimer alive in Background on iOS 7?

后端 未结 4 731
情书的邮戳
情书的邮戳 2021-01-01 03:35

I have created Application which runs NSTimer in Background. I used the Location manager to run the NSTimer in background,

I used below link to run NSTimer in backgr

4条回答
  •  无人及你
    2021-01-01 04:10

    In iOS7, there is a new mode for periodic data fetch. Add the fetch background mode to your app, and in your application delegate, pass an interval to - [UIApplication setMinimumBackgroundFetchInterval:. Your app's delegate will start receiving calls to application:performFetchWithCompletionHandler: once the app is in the background.

    More information here: https://developer.apple.com/library/ios/documentation/uikit/reference/UIApplicationDelegate_Protocol/Reference/Reference.html#//apple_ref/occ/intfm/UIApplicationDelegate/application:performFetchWithCompletionHandler:

提交回复
热议问题