Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

iOS custom push notification via Notification Service Extension

I am stuck with custom push notification. What I am looking to acheive is to have image in notification. For that, the following things has been done:

  1. Created Notification Service Extension
  2. Enabled App groups and push notification in both- app and notification extension.
  3. Trying to build app, but unable to install on iPhone with the error:

having same bundle id in app and extension

Do I need to create separate bundle id and provisioning profiles for Notification Extension? If yes then how notification service class methods will be called?
Waiting for your early response. Thank You.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Expectation- Need to implement custom push notification

>Solution :

The Notification Service Extension is defined as a target in you project settings, hence it needs a unique identifier different than your app’s id. It’s recommended that you format the extension’s id like so: App_Bundle_Id.NotificationServiceExtension

Bundle Identifiers are unrelated to the method calls, iOS will handle them for you. Whenever a device receives a push notification, the extension is called (if configured properly) so you can execute your logic.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading