UILocalNotification dosen't prompts after 10 mins in background

后端 未结 1 1151
春和景丽
春和景丽 2021-01-07 08:40

In didFinishLaunchingWithOptions a timer loop calling a function httpRequest every 1 minute interval.

- (BOOL)application:(UIApplic         


        
相关标签:
1条回答
  • There is no way (within the app store guidelines) to run arbitrary code in the background for longer than ten minutes (as you have noticed).

    After 10 minutes your app will be suspended. There is a couple of ways around this, registering for other background modes (such as background audio, playing a silent sound file continuously) or background voip or background location services.

    These hacky work around will keep your application unsuspended however your application will not get approved for the store.

    in iOS7 there are advances to running code in the background, however nothing that will do what you want.

    So if this is an app for your own use, use private API's or the method I suggested above, however if you want to get this app on the store, I'm afraid your out of luck.

    0 讨论(0)
提交回复
热议问题