Ghobs
Ghobs

Reputation: 859

Unable to test Production Push Notifications through AdHoc

I'm following Parse's Push Notification Tutorial for setting up my Parse app to now be able to send Production push notifications, rather than Development ones, so I can get it ready for the app store. This is covered in section 7.1 in the tutorial.

When I attempt to create an AdHoc provisioning profile, it only works if I create an iOS distribution certificate, when I create an APN production certificate, which is the correct one for this purpose, it shows me this: enter image description here

If I decide to go ahead and use the iOS distribution certificate from this list instead: enter image description here

The provisioning profile is successfully created, but again, it's not using the correct certificate for push notifications. Likewise, because I had to use the distribution one to create the profile, I therefore would have to use the certificates .p12 file when connecting my Parse Notification settings to this profile. When I attempt to do this, I unsurprisingly receive the following error:

enter image description here

because I'm uploading the .p12 of an iOS Distribution certificate, and not the APN Production iOS certificate. When I try uploading the .p12 of the APN Production iOS certificate to Parse, it works, but my test iOS device doesn't receive push notifications, because the provisioning profile doesn't use that certificate, as I mentioned earlier.

Am I following the directions incorrectly? Why can't I make a provisioning profile using a Production APN certificate, so that it can work with Parse Push Notifications?

Upvotes: 0

Views: 1508

Answers (2)

meda
meda

Reputation: 45490

I have never used parse, but you have two exact production certificate.

This is an issue, revoke one of them and try again should work!

the provisioning profile doesn't use that certificate

I think you are misunderstanding what you need to do:

  • delete the app from your device
  • Build your app signed with distribution certificate
  • Install the ad-hoc version of the app on your device

Here is an image to illustrate how the provision profile works:

enter image description here

It's a good idea to check apple docs out

Also very important to check which provisioning profile you have used to sign and build the app.

Upvotes: 3

Ghobs
Ghobs

Reputation: 859

Turns out my error was forgetting to set the code signing settings in both Project AND Targets.

Upvotes: 0

Related Questions