How to generate valid APNS Certificate (.p12) for use in GCM for iOS?
I am trying Google Cloud Messaging sample app for iOS platform. https://developers.google.com/cloud-messaging/ios/start
To generate GoogleServices-Info.plist APNS development and production certificates are needed (PKCS#12 file format).
I have created .p12 file in MAC KeyChain Access (bundling both APNS dev certificate and private key).
But when uploading the .p12 file, it says it is not in valid format
(The certificate must be a valid PKCS12 file).
- didReceiveRemoteNotification:fetchCompletionHandler not being called when app is in background and not connected to Xcode
- How can WhatsApp encrypt Push Notifications on iOS?
- Get device token for push notifications after app was deleted
- iOS APNS: sending the device token to the provider in string format
- iOS Push Notifications not working for Distribution
- Get Apple's remote push notifications even after app terminates
4 Solutions Collect From Internet About “How to generate valid APNS Certificate (.p12) for use in GCM for iOS?”
Here’s my solution, without the terminal !
delete your actual certificate ( in Keychain ) : “Apple Development IOS Push Service” & “Apple Production IOS Push Service”
Go to Apple Developer, Identifiers, App IDs, Select “YourApp”, Edit, Push Notification and download the 2 certificates (dev & prod)
import these 2 certificates in Keychain
in Keychain, go to “My Certificates”, find the “Apple Development IOS Push Service” & “Apple Production IOS Push Service”, click on the arrow to expand the Certificate + Key
Select both the the Certificate + Key, Right click “Export 2 items”, you have your .p12 valid certificate ready for upload to GCM Services
For anyone still having this issue, the solution for me was to not select both the key and the certificate for export – rather just export the certificate which ALREADY includes the key.
This problem comes when we use Firefox to upload the .p12 file. In Chrome I am able to upload the same file.
you can select only one also to export in .p12 format..
macApplication > Keychain Access > My Certificates > Export in .p12 format
- Testflight build on iOS8 not installing
- how to lock Iphone by programmatically
- How do you watch or evaluate an expression in xcode like visual studio's immediate window?
- How to hide a status bar in iOS?
- Why does Xcode automatically create variables with underscores?
- How to rotate image in Swift 3?
- What is the advantage of using arrayWithCapacity
- Performing selector on UILabel generates crash?
- A couple users getting NSURLErrorServerCertificateUntrusted
- Background upload multiple images using single NSURLSession uploadTaskWithRequest
- Xcode organizer documentation, show Table of Contents
- Localize Done button of MPMoviePlayerViewController
- How to get the number of weeks from given year
- Xcode 8 and ipod touch
- Concatenate String in Swift