development push notification works. Production does not - ios

I created a production and sandbox APNS certificate (one for both like apple says i can) but it only works when i use the sandbox gateway.
I have created an ad hoc provisioning profile (so i get a production device token when running the app) and archived and exported the app with that provisioning profile and my ios production identity (i just have them set in xcode before archiving).
I added it to my ipad but nothing happens when i send a push notification.
When i just install the app using xcode (getting a development devicetoken) i can send a push notification no problem using the sandbox gateway.
i looked at the ad hoc provisioning profile and i see 'production' under aps-environment.
I don't think i am missing anything but here we are.

Related

Device token Changing after exported as ipa

Hi Everybody i'm working with Apple Push Notifications for my app here i'm struggled with Device token issues & not getting Notifications.
i successfully created a .p12 key then i uploaded in Amazon SNS it working good and i'm receiving notifications also.
ISSUE Not getting notifications for exported ipa.
When i run with xcode it giving some device token(ex. xxx1111).after i uninstalled the old one,i exported as ipa,& uploaded in diawi.com then run it in same device it gives some different device token(ex. yyy2222). now i copied that new device token(yyy2222) into Amazon SNS with same .p12 key only, now i'm not getting any notifications.
But i deleted the app installed from diawi.com again i run it from xcode then i send the notifications with old device token(xxx1111) it getting notifications.
what is my mistake? help me pls.
TL;DR You've probably not uploaded the production APN certificate to your APN provider.
If the version of the app you run from Xcode works, but the exported version does not, then maybe you've only set up the development APN certificate in your APN provider. The exported app (be it Ad Hoc or Enterprise) is going to use a production certificate, so your APN certificate should be production too.
If you haven't created the production certificate, go to Certificates, Identifiers & Profiles in the developer portal, click on Production and choose Apple Push Notification service SSL (Sandbox & Production):
p.s. The token should change between development and distribution versions of the app.

iOS Push Notification not working in production environment (GPGS)

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.

How do I run my iOS app (Xcode 6) with the aps-environment set to "production"?

I'm developing an app with Xcode 6 and I want to test production push notifications but I can't seem to run my app with a production aps-environment. How can I manually enable this for testing purposes?
I've already registered my app through Apple Developer with both development and production push notification certificates and everything works fine using the sand-box developer push notification environment. But I'm having problems registering for production push tokens and keep receiving development push tokens instead.
I tried changing the code signing identity of the target to iOS Distribution but that led to other problems and I couldn't even launch my app. Can I only use a production aps-environment after the app has been released? If so then how do I test production push notifications before release?
Further information is that the app still hasn't been released yet and I'm using Amazon SNS on a node.js server for delivering pushes. Once again, the whole chain is working perfectly using the APNS_Sandbox (developer) environment.
To use production APS, your app has to be signed with a production provisioning profile.
Try this:
Create an Ad Hoc provisioning profile with your phone's device identifier included in it.
Set your Release target's provisioning profile to this new provisioning profile.
Archive your app (Product > Archive in Xcode). Note: make sure that Archive builds the release target.
Export the .ipa of your app (Export > Save for Ad Hoc deployment in Organizer) and install that on your phone (drag it into iTunes, on your device in the Devices organizer, etc).
When you run that version, your app should be sending the production tokens. To my knowledge, you're not able to directly put production versions of your app onto your phone through Xcode (but I may be wrong).

Submit iOS Push Notification App to app store

I made a simple push notification app and try to submit to app store.
I created two types certificates(iOS distribution and APNs Production iOS).
And I added the APNs Production Certificate to Production SSL certificate of existing my app id(com.push.app). The app id(com.push.app) already has Development SSL Certificate(APNs Development iOS).
And I created a provisioning profile with iOS distribution type certificate and used for build app.
I want to know that my procedure is right or wrong because normally we use APNs Development provisioning profile for develpoing as everybody knows.
Regards
It should work fine. Just verify that you generated distribution certificate with gateway.push.apple.com. Also its always wise to have different app id for developement/distribution locally and while launching app on Appstore.
Once you configure your app to use APNs, Xcode automatically creates
the necessary distribution provisioning profiles when you export your
iOS app for beta testing or submit your app to the store.
Please follow:
https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/ProvisioningDevelopment.html

PUSH notifications ain't working in distribution

I was testing push notifications on developer certificate and everything worked fine. After switching to distribution certificate and publishing the app notifications are not working.
Tokens are generated because my database is filled with them, but still notifications are not recieved.
Is there a way I could test out distribution build (signed with distrubution certificate)? I've build the app for ad hoc development signed with distribution certificate but I can't install it on any device, neither by iTunes (process is stuck on installing after clicking reyed out icon on device) or iFunBox.
I've checked the code signing and development was signed with develompment profile, and distribution with distrubution profile. But there also was provisining profile selected. I've readen that there should be selected "none". Could that be the reason?
I can't afford waiting another 6 days for approval not being sure that this time it works perfectly.
When you run PUSH notification with distribution certificate you have to set sandbox=false at your server side .
For testing distribution build I just deployed it for AdHoc deployment. It helped me to veryfi if it works on distribution;

Resources