didReceiveRemoteNotification:fetchCompletionHandler not being called when app is in background and not connected to Xcode

前端 未结 10 1670
别那么骄傲
别那么骄傲 2020-11-28 04:27

I\'ve a very strange problem, I implemented:

- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchComp         


        
10条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-28 05:20

    Possible reason is that Background App Refresh is off on your iPhone.
    You can turn this option on/off in Settings->General->Background App Refresh.
    When Background App Refresh is off on your phone, didReceiveRemoteNotification:fetchCompletionHandler method will be called only when the phone is connected to XCode.

提交回复
热议问题