My AWS SNS stopped sending push notifications to my subscribers on iOS and I am trying to understand why. So I started from scratch with the aim to deliver 1 notification to my test device.
I have done the following:
- Create new certificate on iOS Dev Portal of the new "Apple Push Services" type, not the old "APNs iOS Production", imported to keychain, exported certificate and private key, added those to AWS as described in the AWS SNS APNS instructions.
- Confirmed that this new APNS certificate shows up in the "Production SSL Certificate" list in my App ID on the portal.
- Create "iOS Production" application in AWS SNS and load the credentials above.
- Build the app for my test device, subscribe to notifications, get the token and strip all spaces etc. and with that token create a new Endpoint on AWS SNS.
- Select that single Endpoint and send a message to it.
I just get this error in the CloudWatch Logs:
"providerResponse": "NotificationErrorResponse(command=8, status=InvalidToken, id=1, cause=null)"
I've been through this process a few times, created new certificates, tried with old ones, reinstalled the app several times, etc. etc. I even ran across this issue of the Apple CA certificate expiring today as I saw most of the certificates on my Keychain appearing red with the message "This certificate has an invalid issuer" but apparently this should not be an issue according to Apple (also the above did not work from yesterday).
I feel like I have exhausted the research I can do here.
What is it that I am missing?
Or how can I debug this? I using the credentials I can successfully "ssh" to the APN server, is there a way to interactively figure something out there?
UPDATE:
It could be that I'm trying with the "production" certificate but on an app Im' building from Xcode? Isn't this new certificate supposed to work for both the Sandbox/dev and production version?