Display image in notification bar with remote notification(Rich media push notification) in iOS 10

前端 未结 3 815
攒了一身酷
攒了一身酷 2021-01-13 08:39

I have integrated APNS and want to display image in remote notification like below;

I have used below code with reference link;

AppDelegate

3条回答
  •  抹茶落季
    2021-01-13 08:56

    Your notification payload should be like this:

       aps =     {
            alert =         {
                body = Testing;
                title = Dining;
            };
            badge = 1;
            "content-available" = 1;
            "mutable-content" = 1;
            sound = "Bleep-Sound.wav";
        };
    
    }
    

    Content-available and mutable-content should be outside the alert and also you should add the badge count too....

提交回复
热议问题