2
votes

I try to use Adhoc push notification service for my app, But its not working. When i tested with the development APNs certificate its working perfect. I Followed same steps for Adhoc APNs as development APNs.

  1. I know that development and adhoc tokens are different for same device.
  2. I used both ssl://gateway.push.apple.com:2196 , ssl://gateway.push.apple.com:2195 but still no use. For development ssl://gateway.sandbox.push.apple.com:2195.
  3. I also updated provisional profile after enabling push notification service in developer account for Adhoc profile. When i open the Profile i can see these lines

    < key>aps-environment < string>production < key >get-task-allow

  4. I also updated provisional profile in XCode 5.1 and generated .IPA file using correct Adhoc Provisional Profile.

  5. I used same server PHP code which is sending notification for development devices. Changing the token to adhoc device token.
  6. Am using https://www.testflightapp.com for uploading adhoc app for testing for clients.

What am making mistake here.

1
Are you archiving (or running in Release) using the Ad Hoc profile you mentioned?Rich
yes archiving with correct Release, with correct provisional profile.user1997951
In the build settings, you've pick the Ad Hoc profile too, yes?Rich
yes Adhoc profile, which is generate from developer account after enabling push notification for production.user1997951
Did you create new .pem for adhoc push notifications? When you send push notifications over SSL to Apple you use pem certificate which is different for debug and for adhoc / release.Josip B.

1 Answers

1
votes

When Testing using ad-hoc you will need the following:

  • Recreate your certificates/key using the distribution APNs
  • Replace the url with ssl://gateway.push.apple.com not sandbox
  • Make sure your server has port 2195 and 2196 open on your firewall