It is important to know the basics of Apple’s push notification system, as we use the same terms. The Apple Push Notification Service Programming Guide is a fairly easy to read document.
When you create or edit an application record on our server, you have to select where your app system is In development, connecting to test servers, or In production, connecting to real push servers. Apple treats the two servers completely separately, so a device token for development/sandbox will not work on production/distribution.
When building your app using a development provisioning profile, set your Urban Airship application to In development, and upload the development Push SSL certificate. To push to an app built with a distribution provisioning profile (either with a release build in XCode, ad-hoc distribution, or the iTunes App Store), use an application that is In production, and upload the production Push SSL certificate.
Because Apple treats development and production/distribution as completely separate instances, we suggest making two applications in the Urban Airship web interface. That way you can continue to build and develop your application even after releasing it without interrupting your users.
When you start a new application, we recommend turning on debug mode. When this is on we will pause after every notification is sent to ensure that Apple accepts it. If Apple’s servers encounter a device token they do not recognize for that application, they will reject it and close our connection. In that case you will see a record in the error console and the device token will be marked inactive. To reactivate the device token, use the registration call.
For security reasons, we strongly recommend not including the Master Secret in your application. However, it can be useful to send push notifcations from the device - for instance, to schedule notifications in the future for that particular user. In the administrative interface for your application, there is an option to allow push from the device. If this is enabled, we will allow push messages to be sent using the application key and secret. However, only messages sent to specific device tokens will work; the broadcast API, tags and aliases are still disabled.