Search code examples
iosiphonepush-notificationcertificateprovisioning-profile

Create provisioning profile for testing push notifications


I'd like to test my push notifications feature on iOS. I'm working with DevExtreme, a framework based on phonegap.

Following what I made in the past, I made the following steps:

  1. Create the certificate. Here, I chose the "Apple Push Notification service SSL (Sandbox)" option. First question: is it right? I will use FCM.
  2. Create the APP id, enabling push notifications
  3. I need to create a template of my app, so, I need also the Provisioning Profiles. I try to create it selecting "iOS App Development" when creating it. Then, I can't see the created certficate.

What I tried to fix the point 3 is create another certficate selecting "iOS App Development" using the same certSigningRequest as point 1. I created a provisioning profile lined to this certificate. When building the template, I tried to use this file as provisioning and the certificate of point 1 as certificate, but I'm getting the error "The default keychain doesn't have an identity matching".

So, now I'm stuck here, because I don't know how can I test my push notifications feature on an iPhone device. Any ideas?

UPDATE:

Now,I'm trying to do the following: create the APN certificate and use it only for the upload to FCM. Then, create the certificate and profile for the as usual, selecting "iOS App Development" when creating the certificate and link it to provisioning profile.

Is my idea right?

UPDATE: Summarized all the steps here: https://programmingistheway.wordpress.com/2017/07/19/devextremephonegap-how-to-manage-push-notifications-with-fcm/


Solution

  • It’s because you are mixing up the 'Distribution Provisoning Profile' with the 'Development Provisioning Profile'.

    Remove old provisioning profiles from your keychain and follow these steps.