2

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.

1 Answers1

0

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.

Uma_Shanker_Tiwari
  • 453
  • 1
  • 3
  • 16
  • Thanks for your answer, I read mobile provisioning-profile in terminal and got this: https://drive.google.com/file/d/0B9qifDYny7EAeHFScDhZMDM4V1U/view?usp=sharing please let me know if this is not correct as it should be? – Chetan Anand Jul 06 '15 at 12:09
  • It is looking correct. Have you got the native Apple push notification alert dialog when app launch using production provisioning profile? – Uma_Shanker_Tiwari Jul 06 '15 at 12:59
  • I believe it came the first time I ran this app from Testflight, I don't have any new device to test it now. However i'll give it a try. – Chetan Anand Jul 06 '15 at 13:25
  • If it came the first time it means you configured cert and provisioning profile correctly and everything is okay on client side, you should check your provider, try to reconfigure it again with prod cert and pass phrase properly. – Uma_Shanker_Tiwari Jul 06 '15 at 13:42
  • For Resetting the Push Notifications Permissions Alert on iOS check this link http://stackoverflow.com/questions/19700382/how-to-display-ios-push-notification-popup – Uma_Shanker_Tiwari Jul 06 '15 at 14:03
  • I did that, and got Native dialogue for push notification permission, may I assume that it will work when the app is released on appstore after app review? Please let me know how can I confirm that my .p12 file contains correct Private key . – Chetan Anand Jul 06 '15 at 16:37
  • You got Native dialogue for push notification permission it means your APNS certificate is okay. you need to check GPGS if push is not coming – Uma_Shanker_Tiwari Jul 07 '15 at 06:35
  • As per http://stackoverflow.com/a/21358616/4753527 , I should select Certificate as well as Private kay in keychain and then Export 2 items in a .p12 file, However when i'm doing that , Google play service console is not accepting the combined p12 file, saying 'upload failed'. – Chetan Anand Jul 07 '15 at 09:05