Closed chorsnell closed 8 years ago
Thanks for reporting this! I think we should inspect what CN Apple uses in new certificates and update the detection accordingly. Maybe even by inspecting other fields.
I'm not sure when I have time to do this and release a new version. I'm open to a PR resolving this issue, so feel free to create one. If someone has the time to give information about what certificates have what metadata now that would also help a lot!
No worries. So it looks like they have merged the two: http://stackoverflow.com/questions/34431337/apple-push-services-created-instead-of-apple-production-ios-push-services
As mentioned in the SO, you can request dev only certs still, however production certs will work now for both gateways. Looking in the certs I can no longer see anything we can rely on to tell the difference.
Feels like the endpointEnv
may need to be manually toggled, in the instance that you are using a production + dev cert, but want a specific endpoint. If I get time (and if you agree) I will submit a PR.
Well the new certs are basically production certificates that also work with the development environment. So I think we should add the new CN to the if
s and make it choose the production env. You can always override this and force it to use develop if you want to.
I've now released 1.2.0 that should fix this issue!
Noticed now Apple are naming their APNS certificates differently.
They are named
Apple Push Services
rather than specificlyProduction
orDevelopment
https://github.com/mac-cain13/notificato/blob/master/src/Wrep/Notificato/Apns/Certificate.php#L149
As they are now merging the two, unsure how accurately it would detect the correct environment to use, however got it working by adding an extra condition to catch the updated name and point to production.