I have an app in the App Store that uses push notifications via Firebase Cloud Messaging. I created an APNs key for it at the time. I no longer have the key and was planning on releasing a new app. I tried to create a new key but the Devloper portal said I have reached the limit of keys for this service. If revoke the old key will it break the app I already have in the App Store? What's the best solution for this?
Your app will continue to function on the app store, however will be unable to receive push notifications until you replace the old key with the new key. Your APNS key is specific to your development team and not to the app itself. You won't need to update the existing app after switching the keys. The only info that APNS needs from the app is the bundle identifier.
Related
I use APNs Authentication key to configuration in my firebase.
I do transfer app bundle from developer account to another account.
After transfer, my app in iOS device cannot received notification from firebase.
Is it mean that, my old APNS authentication key is not working? Am I need to create APNs key in my new developer account?
If like that, my existing user that already install my app will not received notification, until I upload new app version?
Keys and certificates are generated per team. If you're using your personal team to publish the app, you need to generate all new certificates and keys after you changes your developer account.
On your backend you should somehow solve the problem of using both keys during transition period: An old one for your old app versions and the new one for the new app, published from another account. Otherwise users who use older app versions won't be receiving your push notifications.
In case of Firebase
In Firebase console you need to create a new app, using new Team ID. In your Apple Developer account you need to create new APNs key and add it to your new app in Firebase. On your backend you need to handle these two applications separately, because they'll have different Firebase keys.
you must add a new project in firebase, because of the new apple developer account and new bundle Identifier, and download new
"GoogleService-Info.plist" file and replace it.
after that, you must define new APNS authentication and add the key to firebase with the new bundle id.
your "Team Id" now changed and you must add or edit your firebase project. check the below pic in last item (this pic is in firebase project settings):
I recently transferred my iOS app from one developer account to another and now I am not able to send push notifications from Firebase Cloud Messaging to my app. I have tried the following:
Updating the Team ID in the Firebase Console
Generating a new APNs Key and uploading to the Firebase Console
Re-configuring APNs on Apple Developer App ID page for the app of interest
a) Generating a Certificate Signing Request on my local machine
b) Uploading this Certificate to the App ID to configure APNs
c) Generating a new certificate based off of this CSR
d) Downloading this new certificate and saving in keychain
Trying to send push notifications from the Firebase Console
It is clear that the FCM Tokens are updated and that the problem lies within something that I am missing / forgetting to do on the Apple side to allow FCM to talk to APNs, but I cannot figure out what I am doing wrong. Any thoughts?
We've encountered essentially the exact same issue. So far, the only way we've gotten push notifications to deliver to the client is by re-installing the App. Watching this to see if anyone else has a better solution!
I have transferred an iOS app. It was using SSL certificates to send push notifications in Production.
In the new developer program I would like to switch to using Auth Key.
The App ID has been transferred so it is part of the new developer program.
Can I send push notifications from the new developer program with the new Auth Key without making a new version of the app?
I just created the APNs Key file from Apple Developer website. It was saying "Don't lost this key". I already have a backup but what happens if I lost it?
It is also saying I just need one APNs Key for all apps.
Can I create more than one APNs Key or should I go with just one? If I lost this am I going to can't send notifications for just that app or none of my apps?
Thanks in advance.
You can have MULTIPLE .p8 files. The .p8 file is used to generate a JWT Token on the server side and that is used to send push notifications via HTTP2 to Apple's APNS server. Only problem is that if you lose it, you have to regenerate a new one on the server side. It doesn't affect existing apps at all because it's bound to the bundleId, applicationId, and developer account.
In other words, it's not a certificate that the app has to be re-signed with or anything.
Scenario to make it simpler:
I create an app called MyApp with BundleId: com.SO.myApp.
I create an APNS .p8 file with account RT8NCD.
On the server side, I use this .p8 file to send notifications to com.SO.myApp via HTTP2 and JWT Token generation.
I release the app to the AppStore.
I then LOST the .p8 file and can't send push to my app which is already on the store!
What do I do?
I go into the developer portal and re-create a NEW .p8 file with the same AppId and BundleId and same account.
Then on the server side I use this .p8 file to send push notifications to the devices registered in my database.
I do not need to release a new app or new version or anything.
So in other words, there's not really any consequences to losing it.. but it's not a good idea to get into the practice of losing keys, certificates, etc.. Seriously.
P.S. I cannot guarantee that this behaviour won't change in the future. It's Apple. Try not to lose things.
you can create one APN key per app (one for development one for production) but also you can recreate it, and all devices which was registered with all APN will be supported by new key
Today I noticed a new section named "Keys." I don't know which services uses this? Anybody have any idea? Or I'm the beta user to see this?
I noticed it also quite recently and used it right away for push notification configuration of a 3rd party service. In my case I created a key and then added it to the Visual Studio Mobile Center push notification configuration site along with the BundleID and the TeamID.
Additional to this you still have to configure Push Notification on your App Identifier in the corresponding section.
It looks like the keys here are a new and more convenient way for passing push authentication info like the PEM files before.
But can't actually find and official docs on this topic by Apple :( by now.
Found this info https://developer.clevertap.com/docs/how-to-create-an-ios-apns-auth-key
If you’d like to send push notifications to your iOS users, you will
need to upload either an APNs Push Certificate, or an APNs Auth Key.
We recommend that you create and upload an APNs Auth Key for the
following reasons:
No need to re-generate the push certificate every year One auth key
can be used for all your apps – this avoids the complication of
maintaining different certificates When sending push notifications
using an APNs Auth Key, we require the following information about
your app:
Auth Key file Team ID Your app’s bundle ID
This sounds like a convenient way to send APN as no need to keep renew annually, but the 1 key is used for all your apps and the p8 file can only be downloaded once after generated. Not sure if the APN still work if I delete the key afterward.
Keys are used for a variety of Apple services. Here's a screenshot: