Silent push notifications only delivered if device is charging and/or app is foreground

后端 未结 8 951
囚心锁ツ
囚心锁ツ 2020-11-30 18:26

I have implemented silent push notifications but I have noticed some strange behaviour. The silent push notifications are handled via:

- (void)application:(         


        
8条回答
  •  情歌与酒
    2020-11-30 19:14

    I also noticed the same and wasted some time figuring out. See https://stackoverflow.com/a/31237889/1724763

    If you turned off Bg App Refresh, silent remote push will be dropped silently (the irony).

    However, my observation is that if you connect to Xcode via cable, somehow the Bg App Refresh setting is ignored and all silent push for your app works.

    I highly suspect this is an undocumented feature: charging causes the Bg App Refresh setting to be ignored.

提交回复
热议问题