简体   繁体   中英

Apple Push Notification payload with image

在此处输入图片说明

I received push notification from an x app with image at right bottom (circled)

Need to show same sort of image in my app. What is apns payload structure for this. Can anybody help me. Thanks in advance.

For Remote Notification, set mutable-content : 1 and category : newCategory . Note that the category value is set to "newCategory" which matches what you previously added to UNUserNotificationCenter and UNNotificationContentExtensions plist.

Example:

{
    "aps" : {
        "alert" : {
        "title" : "title",
        "body" : "Your message Here"
        },
        "mutable-content" : "1",
        "category" : "newCategory"
    },
    "otherCustomURL" : "http://www.xxx.jpg"
 }

For more info: https://stackoverflow.com/a/38066583/742298

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