1
votes

i am working with push notification currently. i have created CSR, Distribution certificate, mobile provision successfully and added them. My sanbox push is working but production (gateway.push.apple.com) is not working.

See the Dev portal App ID settings: enter image description here

And the keychain is like(Dev and distribution's private key is ok):

enter image description here

And in code sign identity is- iOS developer and the provision is automatic.

Settings looks like:

enter image description here

What could be the problem ? Thanks in advance.

Update:

May be problem is with my pem. From this site: http://apns-gcm.bryantan.info/, i test the push. i'm getting the sanbox but still not getting the production push.

It shows : Unable to connect to 'ssl://gateway.push.apple.com:2195': (0)

3
What build are you using with the production push? It has to be downloaded from the App Store (or an enterprise app)Paulw11
1. I am using this app to test on-itunes.apple.com/us/app/easy-apns-provider-push-notification/… , it works for sanbox only. 2. I am also trying to test it from my API server to send push. i sent the pem file server. Previously it was working fine. It is not working now.Jamshed Alam
try to set automatic mode of provision profiles, and export as ad hocVadim Kozak
Automatic shows error: **** has conflicting provisioning settings. **** is automatically signed, but code signing identity Automatic has been manually specified. Set the code signing identity value to "iPhone Developer" in the build settings editor, or switch to manual signing in the project editor. @ Vadim KozakJamshed Alam

3 Answers

0
votes

Some time it might be an issue of .PEM file. Regenerate the .PEM file and upload to your server and test.

0
votes

1.You should enable push notification from capacity in xcode

  1. Create a production APNS certificate only

  2. Download apn file and click it

  3. Right click on it & extract this to p12 file and save it into desktop or any where

  4. Open your terminal & go to p12 file directory

  5. write this command openssl pkcs12 -in yoursavedfilename.p12 -out yourfilename.pem -nodes -clcerts

  6. Now go to server and add this . use sandbox for development & remove sandbox for distribution . Both will work at Production apns .

0
votes

It doesn't work in xcode development mode. If you load your app into testflight or app store, gateway.push.apple.com would work well.