Premise
So these are the steps when you have already set up your push notifications and successfully tested them before, but your certificates have expired or have somehow been invalidated.
Maybe you see something like this when you try to test with Pusher.
How To
Now go to Apple’s developer program. We will upload the request for a certificate in order to get another one. Sign into your developer account.
After signing in, click on Certificates, Identifiers, and Profiles.
First click on “Profiles.”
Try sending the push again.
Second if that didn’t work.
- Make sure you are using the certificate that would match the provisioning profile that is active.
- Grab a fresh device token and paste it in.
Third, if that didn’t work.
- Lets get a new certificate:
Instead of going to the certificates section directly, we must first click the app ids.
Find your app’s id and check that the bundle id matches from your project.
Click the edit button.
Then double click on the downloaded file.
It should show up in your keychain access. Most of the certificates will be hard to differentiate, you can find your certificate because the end of the Name of the certificate will be your project’s bundle id.
Then click Certificates
, Login
, then right click your certificate
aka the cert that has a expiration date a year and a month from now.
Export "Apple push services: cor..."
Click OK.
Put in your computer’s password here.
You should now see your glowing p12 certificate.
Now go back to the Apple Developer website again.
Choose the one with a date that is farthest in the future.
Now give it a name.
Then, continue
Then click download.
Click on Downloads
to access it, drag it out to your desktop, then double click it. It copied your projects bundle id that you gave on the Apple Developer Website, so it finds your app and installs itself when you double click it. Smart.