So I got this e-mail from Apple but my app was not rejected. If I release this version, will push notification be available to my users? Can I test it? If I have to resubmit, is there a way to not increment my app's version? Everything is working fine in the development environment and I already have everything set to the production environment as well (app id, certificate, provision profile, all of them using push notification).
If that warning is correct, push notifications won't work for your app in production.
The way to test your app with the production APNS environment is to build your App with an AdHoc provisioning profile, which will cause it to use the production push environment. This will allow your server to use the production certificate to send notification to the production APNS server.
Of course, even if it works, you still have to check your actual production provisioning profile, to see whether it contains the <aps-environment> with Distribution value.
Recreate your Distribution provisioning profile and build my application with it. This change will fix the issue of Missing Push Notification Entitlements
I fixed above warning by following steps
Step 1:Go to 'Capabilities' Tab
Step 2:Select 'Background Modes' section and unchecked 'Remote notifications'
Related
I am facing issue during push notifications when app is installed on IOS(8.3) device(iPhone and iPad).
Its working locally(in development). But when I configure the same in production( upload app to app store ). It is not working.
These are the configurations that I have done:
* In Xcode, in entitlement file, for "APS environment" key i have given value as "production".
* While creating the SSL certificate i have created the production SSL certificate.
* In code i have used "withProductionDestination()" method while pushing the notification to APNS.
I am not geting any error or exceptions while sending the notification payload with token to APNS(both in production and development).
I have verified that the notifications feature is active in my account for both development and production. I have also verified the certificates and they are correct.
Can you please let me know what steps I might have missed or doing wrong?
Device token for Production (distribution) and Sandbox (developer) are different for same device.
I was also facing the same issue that push notifications were not coming in production and problem was that I was still using device id which I received in developer mode. So, I generated device id again with production certificate and notifications started to come again.
Also, make sure that you access the production environment at this URL gateway.push.apple.com with port 2195.
If you use production certificate for push notifications, you need to remove .sandbox in the apns server address and if you install the app by using Xcode, generally by using run option, then the mode will be set to development and the push notifications from production environment won't be received. You need to install the app by generating the .ipa file and install in from iTunes.
I had the same issue. PN's were working on development, but couldn't get them on production.
What helped me: Adding APNS for Distribution Certificate to Firebase.
I keep getting this error from apple for my production app.
"Missing Push Notification Entitlement - Your app appears 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. Xcode 8 does not automatically copy the aps-environment entitlement from provisioning profiles at build time. This behavior is intentional. To use this entitlement, either enable Push Notifications in the project editor's Capabilities pane, or manually add the entitlement to your entitlements file. For more information, see https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/HandlingRemoteNotifications.html#//apple_ref/doc/uid/TP40008194-CH6-SW1."
I am unsure what error is occurring in my app. The app does not send push notifications when I am using the production app, but works in the development app. My provisioning profile has push enabled, i added it in Xcode, and I created a .p12 file in keychain access. What am I missing. From the tutorial above I can't figure out what step I didn't take. Please let me know.
Thank you
First of all, let me tell you exactly what that error is saying.
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.
When you are going to use push-notifications, you should have an appID that has push notification capability enabled. In development portal you can check whether it's enabled or not. When you click on app ID you are using, It will show clearly what capabilities are enabled. It should be there for both staging and production environments. If you enable capability for the development environment and not for production it's not going to work. So make sure you are using an app ID that has push notifications enabled for both environments.
Now read the error statement again. So according to the error, it's saying it's not enabled for app ID. If you create distribution provisioning profile first and later if you enable the capability to app ID, it's not going to work. So If you update the capability in your app ID, now again create distribution certificate with the app ID selected. This is what from the error.
Even there will be lots of reasons for push notifications are not working for the production environment. When you are creating push notification certificate there also you need to create push notification for the production environment. Development APNS and production APNS are two different. So make sure you are using production push certificate only when firing remote notification.
I'm developing an app that uses push notification. When tested on development device (e.g. installed using cable connected to the Mac), it can receive push notification correctly. But when it's installed using ad-hoc means, no push notification received.
But, the app can obtain the device id on both development and ad hoc scenario. This is evident by the device id received and recorded on the server. The server receives device id on both development and ad hoc scenario. But even then, if the app is installed using ad hoc means, it's not receiving any push notification from the server.
PS:
I'm using Xcode 8.2.1 and Swift 3.
I have created the certificate using SSL push notification for distribution and development, and have included (double click) the certificate on the Xcode.
I have made sure that the capabilities for push notification is ON. Both steps on push notification are also has ticks.
I archived the app using Xcode automatically manage sign in. Xcode is supposed to linked in all the correct certificates for me, including the certificates for SSL push notification for distribution and development... right?
What is your thought on what's wrong with this, and the solution for this? Thanks.
EDIT:
When I tried to use manual code signing, here's what I got:
I can't resolve the status issue. I know that the debug is supposed to have different provisioning. But for now, that's not the main issue. If I can solve the status issue, I also can solve the different profile.
You need to make sure if the certificates for the push notification in adhoc environment are created fine. Secondly, the UDID is getting saved on server properly or not.
Firstly, you should check your uuid of mobile provision in ipa is correct by running command security cms -D -i yourprovisionname.mobileprovision in bash.
the trailing lines
<key>UUID</key>
<string>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</string>
you can unzip your .ipa file and find embedded.mobileprovision in your Payload/App
If mobileprovision is correct, you should check your certifications.
Note that The certification of production environment is different than sandbox.
After checking the certification, you can check the server side. When we push to a sandbox(development), we push to address gateway.sandbox.push.apple.com, and in the distributed environment, we push to gateway.push.apple.com(no sandbox).
As far as I know, the only way to build an app to use the production certificate for push notifications is to make an Ad hoc build or an app store build.
how do I then debug one of these builds ?
I get a cannot connect to the app when i try to attach to process.
I have tried changing the archive scheme to 'debug' also
The production certificate for push notifications you created(Existing) will works for both App Store and Ad-Hoc builds.
You can Debug them using Xcode by attaching device.for that you have to create Development push notifications certificates.
For testing Ad-Hoc builds you can put Alerts, Local notifications so can check contents.
I needed to get my Push token from an ad-hoc installation.
to do this I copied the token string to UIPasteboard then used that to target the production device for testing - still can't debug, but can see if the push works properly
It looks like you can't do this, I guess it's one of those release and hope for the best things
I'm using Google play Game Service plugin for unity3d,
I'm getting push notification on iOS in development environment. However its not working in production environment.
I configured everything in the same way and published all changes in Google developer Console,
uploaded .p12 file for both Production and Development,
I'm testing with 'AdHoc and Production mobile provisioning profile' in TestFlight, but i'm not getting Push notification.
Please help me as i'm stuck here in final step and can't send it to Apple App Review board with this prominent bug in my app.
You should check your provisioning profile, to make sure it contains the correct aps entitlement :
Verify that the entitlements in the provisioning-profile file are correct. To do this, open the .mobileprovision file in a text editor. The contents of the file are structured in XML. In the Entitlements dictionary locate the aps-environment key. For a development provisioning profile, the string value of this key should be development; for a distribution provisioning profile, the string value should be production.
You should make sure you are using production device tokens when sending push notifications to the production APNS server (device tokens that works in the sandbox environment don't work in the production env).
You should have tested your app with an AdHoc provisioning profile prior to releasing it to the app store. The AdHoc profile works with the production push environment.