Generated new certificates in Apple Developer Centre.
It's weird i couldn't upload that certificates to GCM and also i couldn't see UPDATE button developer website.
It shows error {{ controller.errorMessage }}
How do I do that? Here's a screenshot of the Google Developer
You would have to import your GCM project to the Firebase Console (there won't be any changes, see my answer here) and update the certs from there.
While already importing, I would strongly advise toigrate your app(s) to start using FCM.
Same issue I was facing and able to solve !
Background : In my scenario we have an iOS App in the store and all our push notification configured through Google GCM (We were not using FCM). But we had situation where our APNS certificate is just about to get expired and we don't want to make any iOS Release(We had around 4k DAU on the current version)
Once certificate was expired any Notification we sent was throwing InvalidApnsCredentialfrom GCM.
Here is how to get out of this.
Configure you Firebase project. (Make sure you're logged into right Google account - the one you configured for setting up your GCM)
Goto : https://firebase.google.com > GET STARTED
Choose Import Google Project
You must see now all the GCM Project as below - If your logged in with correct account.
Choose the project.
Now your Firebase project is ready. It should look like below.
To Update new certificate.
Choose Setting gear at Overview.
Choose Project Settings
Now choose Cloud Messaging Tab & now you APNs Certificate section is visible.
If Certificate already expired - you must see RED flagged cell with UPLOAD & DELETE options. Upload new APNs certificate using * UPLOAD*.
You got better way to do it, please share your thoughts ! Cheers !
Related
I am amazed to see that When ever I am creating Certificates "Apple Push Notification service SSL (Production & Development)" it is not shown in Profiles
Things are very much changed on Developer portal And after bashing my head many times (deleting and creating different certificates) its is not working for me
What I am doing:
Attempt 1: When I create certificates from certificate menu it did appear on Profile menu (from where we create provisioning profile & selects certificates) but when I create APNs SSL certificate it never appears in provisioning profile menu
Attempt 2: I created separate SSL certificate and created p12 file from them and uploaded them into FCM server and then i created normal certificate and generated Provisioning profile and installing them in xcode it gives me error of not including something for Notification.
So after trying all these I am now not able to run app on device and not able to work around for FCM notification
Question: What steps are needed to create certificate while working on FCM?
"NOTE: Since all interface and working procedures are updated on developer portal is updated so all help on SO and other places are out date. Please let me know what should I do and how it is done in precise manner it will be great help. THANKS"
I suggest to use for push notification, .p8 key because this same key will work for both sandbox And production mode.
Use this solution to generate .p8 Key And upload key on firebase read this articles
I have been an android developer and was thinking the life is not easy but then I found the iOS developer account and its relativity with project creation and other certifications.
I have developed the app, then in that App, I need to add FCM notifications. For this, I have installed FCM pod. And made necessary changes in the project.
Now its turn for me to connect my project with FCM ios ( and ios APNS with FCM server)
So good so far. Now I want to create a different team for this project. But When I create a distribution certificate it always creates a file with the name of the team I was using before i.e ABCD. I tried to create another profile but it just creates ABCD named file.
Can anyone tell what could be the problem?
2nd what are the steps required to create a production certificate for FCM to launch the app in the store?
Please discuss the first point in detail why it is happening? Why I can't change the name of the certificate.
Note: Whenever I try to create a development certificate it take another name
Please let me know what is going on..........
Xcode generates certificate fully automatic these days. You should let it automatically build them for you till you experienced more with apple signing process.
you can change any identifiers you want before sending any kind of build to appStore, (for example for test flight)
If you didn't upload to appstore yet, you can just login with your other account in Xcode and choose it from the team dropdown in signing section of general tap in Xcode. Then Xcode tries to sign the app with new credentials.
For FCM, follow the original documentation of FCM.
And at the end, Welcome to iOS world ;)
i'm new in the world of certificates, and reading aware i had to adapt my flow to various case posted but without resolve the problem as per my current configuration.
Can you please confirm me the flow to produce the certificate app rightly ?
WHAT WAS DONE
App ID creation
Create an App ID (ex. com.dir.app)
Enable for app ID com.dir.app the push certification
Development APNS creation
[keychain] - produce a pair of key by a Certification request (key pair name: com.dir.app.dev)
[dev.console] - upload certificate SSL for the dev push part inside App ID options
Download the certificate com.dir.app.dev.apns.cer
Open it and export it as com.dir.app.dev.apns.p12
Development certificate creation
Go to Development Certificate tab
Create a new Dev. Certificate providing the previous key produced (com.dir.app.dev)
Download the certificate produced and install inside local machine Keychain. Now the key appear to be certified with the downloaded certificate
Export the certificated as com.dir.app.dev.p12
Provisioning creation
[dev-console] Create a new mobile provisioning for dev (iOS App Development) selecting the appID - Here a problem occurs: apple provide a certificates list without showing ANY details about certificates - instead, for production certificates, an expired date as detail is shown. So i tried to perform various tests.
Export it as com.dir.app.dev.mobileprovision
App Key creation
[dev-console] - Go go the Keys tab
Create a new key
Download the new key as com.dir.app.key.p8
Firebase configuration
Create a new application calling it with the same name of app ID created at point 1 (com.dir.app)
Go to the Cloud messaging tab
Select the application com.dir.app
Insert the new APNS key produced in .p8 format with its ID
Phonegap configuration
Add a new key using as .p12 the file produced at point 10 (com.dir.app.dev.p12), as provisioning file produced at point 12 (com.dir.app.dev.mobileprovision) with respective password.
Assumptions
[Phonegap] - Phonegap build finish correctly and keys are correctly selected
[Backend] - The backend system is currently working with another application (for which iOS configuration are suspects ...)
[Token for Push] - The Token is correctly generate by the backend system
Problem
The push notifications are not received by the app installed on ad iPad with iOS 11.2.2
QUESTIONS
During the configuration of Phonegap, i have to provide the .p12 file for the push notification instead the development p12 certificate exported?
I have another application that inside the App ID tab (in the developer console), doesn't have the Push Notification SSL certificates configured: **how is possible that this application (eg. com.dir.alpha) is able to receive the push notification? Is there maybe another way to enable push?
Many thanks in advance.
Simon
Problem was solved resolving this one Firebase + Push + iOS
Based on your system GCM management, after having being sure to have configured properly your GCM creation and registration, you must have to being sure also to are able to send a push by the Firebase > Notification console selecting "Single Device" as push device target.
It's my first time to update one app in app store after implementing the Firebase push notifications in the project. I'm trying to upload the "Production Certificate" in Firebase Console, but it gives me this:
The APNs certificate provided does not match the current environment
I want to make sure that after updating the app users will receive notifications.
Any link with tutorial to update one app in appstore is welcome.
The mistake I was making was that I was exporting the "private key" part of the certificate in Keychain Access instead of the "certificate" part. As soon as I re exported the .p12 using the correct item - it worked.
Please refer to the answer given here
The other possibility is:
You are confusing the development certificate with Production one in the certificate list of Key Chain Access.
Try to "Export" from the correct one.
This is what brought me here :)
I'm trying to send a message to my push notification test app. It's been working in proof of concept several weeks ago on the same application but not anymore.
I get a failure: InvalidApnsCredential and Firebase tell us : "A message targeted to an iOS device could not be sent because the required APNs SSL certificate was not uploaded or has expired. Check the validity of your development and production certificates"
But when I check in my firebase console, it tells me that dev and prod certificate will be valid for 9 more months.
What else could be causing this message?
In case if others are also facing the issue here are few tips:
Whenever you are stuck with notification issues try sending a push via the GUI console that firebase provide to send notifications
If your live app at Appstore is not receiving push notification but is receiving notification only when running via Xcode then you have not uploaded the production certificate to the firebase console
If you have uploaded both production and development certificates and still notifications are not received then download the latest certificates and upload them again to the firebase console
Adding Team id in Firebase worked for me.
Firebase console -> General -> select your app -> Add TEAM ID
You can find team ID in Apple developer portal :
https://developer.apple.com/account/#/membership
This might pain you to hear, but it seems that the Firebase Cloud Messaging system doesn't like dashes in the bundleID. I had something alongs of my.app.bundle-y and I was receiving InvalidAPNSCredential message on postman... I eventually tried changing my bundle id to my.app.bundle when all else failed, and notifications started coming through.
This is pretty severe change, and only really reasonable if the app is not yet deployed.
If all else fails and you have a dash in your bundle id, then maybe give this a go.
In the case of uploading a .p8 file (APNs auth key), adding proper Key ID worked for me.
When you download the .p8 file from Apple. The filename will be in format AuthKey_XXXXXXXXXX.p8. The 10 digit(marked XXXXXXXXXX after the AuthKey_) is the Key ID you need to add.please refer to the image
I had this issue and was struggling to find a solution even when my APNs token were up to date and etc. I was testing on android before IOS and on the POST method to https://iid.googleapis.com/iid i left "application": com.android name instead of IOS bundle ID. just a stupid error on my side.
in my case I was uploading .p8 key with wrong key id duoble check your "APNs Authentication Key" and make sure u have the right file with the right Key ID
and team ID
The Xcode "Bundle Identifier" must match the one configured in Firebase.
In Firebase:
Project Settings > Your Apps > Apple Apps
In Xcode:
Your project > Targets > General tab > Bundle Identifier
In my case, The Apn .p8 file had been deleted from the Firebase console (and I don't know why! :| )
I had it before and just upload it and the problem was solved.
but if you don't have it, you can create a new one from the
Apple developer account -> Certificates -> Keys -> Add new key and check
Apple Push Notifications service (APNs) from the services, then download it and upload in
Firebase -> App setting -> Cloud Messaging -> Apple app configuration -> APNs Authentication Key