push notifications not working on app store application - iphone
I have created an application and uploaded it to itunes. The push notifications are not working for that now. In development it was working fine. I also have used this command to test the app:
codesign -dvvvv --entitlements - /path/to/App
And It has the following key:
开发者_运维百科< plist version="1.0">
< dict> < key>application-identifier< /key> < string>UFWA3A8K32.com.etubez.webmap< /string> < key>aps-environment< /key> < string>production< /string> < key>get-task-allow< /key> < false/> < key>keychain-access-groups< /key> < array> < string>UFWA3A8K32.com.etubez.webmap < /array> < /dict> < /plist>
Then I tried to create the distribution certificates for adhoc and tried to install it to run the push for production environment but these are not working. The php webservice returns everything ok like:
Thu, 03 Mar 2011 21:03:14 +0100 ApnsPHP[3231]: INFO: Trying ssl://gateway.push.apple.com:2195... Thu, 03 Mar 2011 21:03:19 +0100 ApnsPHP[3231]: INFO: Connected to ssl://gateway.push.apple.com:2195. Thu, 03 Mar 2011 21:03:19 +0100 ApnsPHP[3231]: INFO: Sending messages queue, run #1: 1 message(s) left in queue. Thu, 03 Mar 2011 21:03:19 +0100 ApnsPHP[3231]: STATUS: Sending message ID 1 [custom identifier: Message-Badge-3] (1/3): 253 bytes. Thu, 03 Mar 2011 21:03:19 +0100 ApnsPHP[3231]: INFO: Disconnected.
But I am not receiving any push notifications.
I also have tried to create the certificates again n again 3-4 times but not working. Can anyone help me in this regard?
Edit: I am using this method to create the certificates: http://code.google.com/p/apns-php/wiki/CertificateCreation One certificate to use both for sandbox and production development.
Many Thanks,
NavI keep this check list with me. This helps in finding possible cause. You can also get APNS logs from device (If you have access to..) and see if it helps.
APNS CheckList
Provider should install the Entrust Secure Server CA root certificate. This allows TLS/SSL to verify the full APNs server cert chain. This root certificate can be downloaded from Entrust's site.
The device token from development environment will not work on production push service. Each push environment will issue a different token for the same device. If an invalid device token is sent to the wrong environment, the push service will see that as an invalid token and discard the notification.
If you remove your app from your device and then send a push notification to it, you would expect to have the device token rejected, and the invalidated device token should appear on the feedback service. However, if this was the last push-enabled app on the device, it will not show up in the feedback service. This is because deleting the last app tears down the persistent connection to the push service before the notice of the deletion can be sent.
Push providers are often behind firewalls. To send notifications, you will need to have TCP port 2195 open. To reach the feedback service, you will need to have TCP port 2196 open. Devices connecting to the push service over Wi-Fi will need to have TCP port 5223 open.
The IP address range for the push service is subject to change; the expectation is that providers will connect by hostname rather than IP address. However, the entire 17.0.0.0/8 address block is assigned to Apple, so you can specify that range in your firewall rules.
We can enable APNS logging, install the configuration profile APNsLogging.mobileconfig on device by either putting the file on a web server and downloading it location using Safari on your device, or by sending it as an email attachment and opening the attachment in Mail on your device. We can use mdm to push profile.
More information can be found here.
I had the same problem and installed a Console app from the app store and found a message "no valid aps-environment' entilement string found for application"
I forgot to add push notifications to the entitlement file so it was not registering for push notifications when download from the app store.
Make sure to uninstall the app from your device and clean install the AppStore version.
精彩评论