Push Notification Frequently Asked Questions

Client-side

My application fails to register a device token. In the console, I see “no valid ‘aps-environment’ entitlement string found for application”.

This means that the provisioning profile used to build the application does not have push notifications enabled. Push notifications must be enabled for that application ID in the iTunes Developer Portal.

If you’ve already enabled push notifications and still receive this error, it might be because you enabled push notifications after the provisioning profile was created. In this case, the profile will not have the required push notification settings, and must be regenerated.

To regenerate the provisioning profile, find it in the iTunes Developer Portal, and click Edit->*Modify* and save it. When you download the new profile, we recommend removing the existing profile from the device and XCode before installing the new one. Many developers continue to report problems unless they do this step.

My iPhone is unlocked to work on other carriers, and my application fails to register a device token.

Unlocked iPhones cannot use Apple’s Push Notification service, even over WiFi. While we’ve heard reports of hacks that can enable this on phones, we don’t know the efficacy of the methods and we cannot support them.

How can device tokens become inactive?

There are 3 ways a device token registered to your application may become inactive:

  1. Apple rejects a device token as invalid - this can only be caught if your application is in push debug mode. The most common cause of this is a development device token sent to production servers.
  2. Apple informs Urban Airship that this device token was sent to an application that it is not on the device. The user could have deleted the application or the push certificate could be for the wrong application ID.
  3. You send a DELETE request to the /api/device_tokens/<device_token> API using your application key and master secret for authentication.

#3 is available so application developers can manually manipulate device tokens. To reactive a device token a developer may use the registration API.