0

We need to implement rich notification in current application with audio, video, image, gif.

I have implemented everything and its working fine. And today started test some more push notification, but nothing works..

Similar issue: https://forums.developer.apple.com/thread/61774

Normal notifications without mutable-content work fine. Why its not working when adding mutable-content key to payload?

As far as I tested, there is no problem with certificate side.. I am using NotificationService extension to show media attachment

Any idea?

My payload looks like below:

{  
   "aps":{  
      "alert":{  
         "body":"On my way to searching humanity….. Did u see that?",
         "title":"God!!!"
      },
      "mutable-content":1,
      "category":"imageIdentifier"
   },
   "pic_url":"https://umad.com/img/2016/5/big-bear-wallpaper-background-12353-12796-hd-wallpapers.jpg",
   "mediaType":"image"
}

I am using APNS online tester https://pushtry.com/

Eric Aya
  • 69,473
  • 35
  • 181
  • 253
karthikeyan
  • 3,821
  • 3
  • 22
  • 45

2 Answers2

0

I am not sure of the problem, when "mutable-content":1 is set the service extension gets called. You can modify the payload in service extension, the possible cause might be you forgot to add the UNNotificationExtensionCategory in info.plist of service extension

enter image description here

The payload looks perfectly fine.

Koushik
  • 1,220
  • 15
  • 19
-1

usernotification only used for local notification, not remote. but you can received notification userinfo body, and sent local usernotification. there is a usernotification experience http://www.jianshu.com/p/e4e9cb61eac9

Charlotte
  • 11
  • 5
  • 1
    thanks for response...we can use it for both, pls refer https://developer.apple.com/documentation/usernotifications/unnotificationserviceextension, https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/index.html#//apple_ref/doc/uid/TP40008194-CH3-SW1 – karthikeyan Oct 31 '17 at 06:21