How to Use Rich Push Notification in iOS using swift 3/4

Updated 26 October 2021

Save

Rich Push Notification

Push notification is very use full to provide  information regarding your app , some messages you can read without opening the app so that iOS 10 provide the image feature also so now you can add the image in push notification so you can make more attractive  push notification in app and provide the more information.

Here i have taken example of fire base push notification.

1: Setup your firebase push notification  in iOS app .

2: Now go  file – > new – > targets > and select “Notification Service Extension”

 

3: Give some name like “NotificationService” , then will create file and also it create its own info.plist file.

So Please open the info.plist file of “NotificationService” and allow the “Allow Arbitrary Loads” to “YES”

 

4: it will look like this:

5: Add Some Code in this to enable the rich push notification.

 

6: Here “attachment” is key that will take the image and add into your push notification.

7: Now its time to set the AppDelegate.swift file . your file will look like this:

 

8: Now run your app , and registered with firebase .

9: Here we have taken the example to send the push notification using post man.

You can take the detail reference :

Send Push Notifications via Firebase by Postman

 

Here we have to make some changes for sending the rich push notification :

Please use this parameter :

Paste this part on your post man body section .

Now your request is ready to send the image notification in app

Note:  you can set the image url in “attachment” part that will show in your notification message.

 

 

 

 

 

 

 

 

author
. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


5 comments

  • Md Khabbab Hossain Tusher
    • kunal prasad (Moderator)
  • Tusher
    • kunal prasad (Moderator)
  • ali
  • Start a Project


      Message Sent!

      If you have more details or questions, you can reply to the received confirmation email.

      Back to Home