简体   繁体   中英

Pushkit and content-available

if I'm using pushkit to notifier the phone that a new call has been received, do I have to use content-available tag inside payload? Or not? Because using this, it seems that app is not relaunched always instantaneously sometimes

PushKit notifications do not need any special value in the payload to launch your app in the background. Only remote notifications (supported by the UserNotification framework) require the content-available flag to be set to 1 . You can find the payload key guide here .

If you're using PushKit for VoIP services, you must have enabled Background Modes and checked "Voice over IP" in the Capabilities section for your project. It looks like this option is missing in Xcode 9 but others have reported that adding it manually to the Info.plist fixes the issue.

See these links:
https://forums.developer.apple.com/thread/85077
https://stackoverflow.com/a/45060044/5059296

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM