didReceiveRemoteNotification not called in iOS 13.3 when app is in background

后端 未结 2 1884
情书的邮戳
情书的邮戳 2021-02-13 01:22

I am banging my head. I am implementing push notification. Everything is working fine (push is received, badge is updated) but under iOS 13.3 the method application(_:didReceive

相关标签:
2条回答
  • 2021-02-13 01:46

    I spend a support ticket to get an answer to this problem.

    It turns out that the documentation is not 100% "valid" for iOS 13 on this topic. The device decides whether to wake up or not. Although the documentation states a little different.

    Apple's preferred way of implementation as a notification extension. After that, you have to adapt the payload to include "mutable-content".

    I asked the support afterward if I should file a radar and they replied with "yes".

    0 讨论(0)
  • 2021-02-13 01:56

    Have you set

    "content-available": 1
    

    in you backend APS payload?

    Also need to make sure you have enabled background mode in your iOS App's info.plist file

    <key>UIBackgroundModes</key>
    <array>
        <string>processing</string>
        <string>remote-notification</string>
    </array>
    
    0 讨论(0)
提交回复
热议问题