0

I have an issue with Notification Service Extension on iOS 13. This issue is not always happen. When I push a notification with mutable-content = 1, on development apple server ( api.sandbox.push.apple.com:443), Apple return success on my server, but no notification comes to my device. Sometimes it still comes, but very late, for example I push it at 9:00 AM, it comes to my device at 9:15 AM, and show exactly time (15 mins ago). Is this an apple error or my error? If it's my error, how do I fix this? And if it's Apple's error, does it happen on real server (api.push.apple.com:443)? Thanks!

1 Answers1

0

"Mutable-content" should be inside "aps" dictionary

Try this if you are sending from apns server

{
"aps": {
    "category": "content_added_notification",
    "alert": {
        "title": "Photos",
        "body": "Antoine added something new - take a look"
    },
    "mutable-content": 1
},
"image_url": "https://www.example.com/image_url"
}

And this if you are sending from firebase

 let dict = ["to": "SERVER-KEY",
             "notification":["body":"body text",
                             "title":"notification text",
                             "category": "myNotificationCategory",
                             "mutable-content": true],
             "data":[
                             "mediaUrl": "https://homepages.cae.wisc.edu/~ece533/images/airplane.png"

        ]]as [String:Any]
Vikas Rajput
  • 1,754
  • 1
  • 14
  • 26