RMSPushNotificationsBundle
                                
                                 RMSPushNotificationsBundle copied to clipboard
                                
                                    RMSPushNotificationsBundle copied to clipboard
                            
                            
                            
                        Can't manage to get IOS push notification working
I think it's missing some documentation about iOS and how to generate the certificate and passphrase. I've followed a neat video that it's explaining how to do ti (for another service, but still the same process): https://www.youtube.com/watch?v=12yjIm0Z8Cw
- Generated CSR from keychain
- upload the CSR to apple developer and download the generated certificate
- Add this certificate to the keychain
- Export the certificate (as p.12 format) setting a passphrase
- Copy the exported certificate to the appfolder (app/certificatesfor me)
Here is my configuration:
rms_push_notifications:
    android:
        gcm:
            api_key: xxxxxxx
            use_multi_curl: true # default is true
    ios:
        sandbox: true
        pem: "certificates/xxxx-apns-dev-cert.p12" # can be absolute or relative path (from app directory)
        passphrase: "xxxxx"
Now I have a p12 certification and the passphrase I've created. If I try to send a push notification I get the following error:
PHP Warning: stream_socket_client(): Unable to set local cert chain file `/var/www/xxxx/app/certificates/xxxxx-apns-dev-cert.p12'; Check that your cafile/capath settings include details of your certificate and its issuer in /var/www/xxxx/vendor/richsage/rms-push-notifications-bundle/RMS/PushNotificationsBundle/Service/OS/AppleNotification.php on line 196
Your must generate a *.pem file and set to configuration.
Ok, looking at the configuration I think the bundle is waiting for a .pem certificate
To generate one from the .p12 I had, I did the following:
openssl pkcs12 -in zumny-apns-dev-cert.p12 -out zumny-apns-dev-cert.pem -nodes -clcerts
And update my config file to point to the .pem file:
rms_push_notifications:
    android:
        gcm:
            api_key: xxxxxxx
            use_multi_curl: true # default is true
    ios:
        sandbox: true
        pem: "certificates/xxxx-apns-dev-cert.pem" # can be absolute or relative path (from app directory)
        passphrase: "xxxxx"
And it's now working. I think more documentation about this would be a great plus for the bundle ;)
Thanks everyone
http://stackoverflow.com/questions/21250510/generate-pem-file-used-to-setup-apple-push-notification
yes, but having the doc at the same place than the bundle or at least linking the doc in the bundle would have saved me a lot of time ;)
I'll submit a PR with documentation improvement ;)
Guys- This still pending?