I've been given a task to (re?)enable push notification for the company iOS app and don't know where to begin.
I learned that provisioning profile contains information on which app services are enabled, so
I logged into the apple developer center and got to the Certificates,Identifiers & Profiles page, but saw that Development iOS Provisioning Profile was already enabled with Push Notification.
However in the App IDs section, it shows Push Notification as configurable with a yellow dot.
Does this mean that the push notification is no longer working?
If that is the case, would regenerating the push notification certificate fix it? or would I have to create a new provisioning profile as well?
Thanks!
I meet the same problem. I had it token care of!
You need to add iOS push certificateļ¼
https://developer.apple.com/account/ios/certificate/certificateCreate.action
Apple Push Notification service SSL (Sandbox & Production).
Push certificate had been expired so it required creating a new push certificate. This invalidated provisioning profile with associated app id, so I had to re-generate the provisioning profile as well.
If in the App iD of your App its says Configurable then you better start by creating a new certificate, if not then try to get the exact private key of your CSR, your certificate and your pem file which you might have used earlier. It would do well to re-configure the entire thing actually, a mismatch between the private key would never allow you to receive the notifications
Related
I have some account with old certificate for an app that is currently in production. It's not duplicate of this question (Xcode apple developer certificate expiration: (0xE8008018)) because I know exactly what to do, but what harm it can does. Since I do not have CSR file that was used to create this certificate and app use a lot of push notifications.
Does revoking certificate will break push notifications?
What's about signing? If I revoke certificate I have to regenerate provisioning profile before pushing to store?
What will happen when I revoke certificate there?
You should review the Apple Support article on Certificates.
Does revoking certificate will break push notifications?
Yes, "you can no longer send push notifications to your app." At least not until you regenerate the cert and change your application to use the new one.
Distribution:
iOS Distribution Certificate (App Store)
If your Apple Developer Program membership is valid, your existing apps on the App Store will
not be affected. However, you will no longer be able to submit new
apps or updates to the App Store.
iOS Distribution Certificate (in-house, internal use apps)
Users will no longer be able to run apps that have been signed with this
certificate. You must distribute a new version of your app that is
signed with a new certificate.
Does revoking certificate will break push notifications?
Yes, if you revoke the certificate you will no longer receive push notifications to the app.
What's about signing? If I revoke certificate I have to regenerate provisioning profile before pushing to store?
If you create a new certificate and upload it to the server sending the push notifications you will be able to send push notifications again. This can be done without the need to build a new binary for the AppStore.
what harm it can does. Since I do not have CSR file that was used to create this certificate and app use a lot of push notifications.
Create a new certificate request and upload it to the correct app to create a new certificate in the developer portal. You do not need the original CSR file to do this.
In your case, Create a new certificate and replace the old cert on
push server with newly generated one. Cheers! All the pushes will
continue to deliver to users. But make sure do above thing just after
creation of new certificate.
Push cert is used for communication between your push server and APNS.
APNS allows push payload from the servers having valid certificates.
So replace the old cert with new one. I done it in past. No issue
faced. Push will be effected for the duration you would take to revoke
and update the certificates on push server.
I have an iOS app featuring push notifications. I need to add a new app capability (associated domains) and regenerate my provisioning profiles. What will happen to push notifications? Am I required to do anything else? Thanks.
No it has no effect on APNS , because APNS is AppId Based so if the App id same regeneration of provisioning profiles doesn't have effect to notification.
Recently I've uploaded one app with push notification support successfully, and then i wanted to update other apps on the store that doesn't include push notification at all and i don't want to include this feature in it. and when i always submit it it says that :
Missing Push Notification Entitlement - Your app appears to include
API used to register with the Apple Push Notification service, but the
app signature's entitlements do not include the "aps-environment"
entitlement. If your app uses the Apple Push Notification service,
make sure your App ID is enabled for Push Notification in the
Provisioning Portal, and resubmit after signing your app with a
Distribution provisioning profile that includes the "aps-environment"
entitlement. See "Provisioning and Development" in the Local and Push
Notification Programming Guide for more information. If your app does
not use the Apple Push Notification service, no action is required.
You may remove the API from future submissions to stop this warning.
If you use a third-party framework, you may need to contact the
developer for information on removing the API.
I've no idea whats happening with Xcode and this issue is so confusing check this :
If your ad-hoc provisioning profile has the aps-environment key, that it means your app is configured correctly in the Apple Provisioning Portal. All you need to do is delete the App Store distribution profile on your local machine, then re-download and install the distribution profile from the Provisioning Portal. This new one should contain the aps-environment key.
Make sure you have removed aps-environment key from your profile in portal.
Please ensure that your code does not contain following methods:
- (void) application:(UIApplication*)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken;
- (void) application:(UIApplication*)application didFailToRegisterForRemoteNotificationsWithError:(NSError*)error;
And the method call to register for notification:
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:UIRemoteNotificationTypeAlert|UIRemoteNotificationTypeBadge|UIRemoteNotificationTypeSound];
If these methods are not there then please re-create distribution provisioning profile and re-build you application with it.
If you want to enable push notification in an app, you need to create fixed bundleID like: "com.appname.app" and provisioning profile for the same.
WildCard bundle id and provisioning profile will not work for Push notification as payload needs fixed address for delivery.
So please try with the fixed BundleID and provisioning profile.
You have probably introduced a 3rd party SDK that is ready for push notifications. That doesn't necessarily mean that you need to send push notifications. That's why it's only a warning and you shouldn't care.
Apple tells you about it just in case you really wanted to send push notifications.
I have transfered the app after I released new version push notification is not working
Thanks in advance
Even though the problem description is very lacking I think that the solution is very obvious: the APNS certificate is strongly linked to the Apple Member account certificates/provisioning files. If they don't match, the push won't come through.
That means, you have to sign your app with the same provisioning file (with the same bundle id) you've signed the old app with.
If you don't have the access to the old provisioning file's certificates, you have to create a new APNS certificate.
StackOverflow question explaining setting up APNS certs
or
certs tutorial
Either the original account owner has invalidated the original push notification certificate, or you have an error in your server unrelated to the transfer process.
I advice you to
Create a new push certificate.
Test that it works by sending a notification from a desktop app like APNS Pusher.
Update the push certificate in your server.
I have an app that uses push notifications. These notifications work perfectly in development, but I have problems in production. When I signed and uploaded my app to the App Store, I didn't realize that I haven't habilitated the push notifications.
Do I have to add a new provisioning profile and re-upload the app just to fix this?
I'm using the same certificate and the same xx.p12.
Yes. After you complete the production push notification certificate setup you need to regenerate your provisioning profile and resign your app.
The reason for this is that the provisioning profile contains entitlements related to the push notification service and the all important aps-environment information.
If you do not recreate the provisioning profile these entitlements and information will not be included.
For more information you can view the Local and Push Notification Programming Guide, specifically the provisioning section.