Will iOS launch my app into the background if it was force-quit by the user?

后端 未结 7 779
佛祖请我去吃肉
佛祖请我去吃肉 2020-11-22 00:46

I am triggering a background fetch by using the content-available flag on a push notification. I have the fetch and remote-notification

7条回答
  •  遇见更好的自我
    2020-11-22 01:23

    The answer is YES, but shouldn't use 'Background Fetch' or 'Remote notification'. PushKit is the answer you desire.

    In summary, PushKit, the new framework in ios 8, is the new push notification mechanism which can silently launch your app into the background with no visual alert prompt even your app was killed by swiping out from app switcher, amazingly you even cannot see it from app switcher.

    PushKit reference from Apple:

    The PushKit framework provides the classes for your iOS apps to receive pushes from remote servers. Pushes can be of one of two types: standard and VoIP. Standard pushes can deliver notifications just as in previous versions of iOS. VoIP pushes provide additional functionality on top of the standard push that is needed to VoIP apps to perform on-demand processing of the push before displaying a notification to the user.

    To deploy this new feature, please refer to this tutorial: https://zeropush.com/guide/guide-to-pushkit-and-voip - I've tested it on my device and it works as expected.

提交回复
热议问题