When it comes to iOS Push Notifications, many developers are confused about the proper setup and combination of signing identities and the server to which to point your app to for registration of the device token. Here is a handy guide for this:

  • If your app is signed using a Development Signing Identity, then your device token should be sent to your development servers, which use Development SSL certificates to connect to Apple Push Notification servers (APNs).
  • If your app is signed using a Distribution Signing Identity (either Ad Hoc or App Store provisioning profiles), then your device token should be sent to your production servers, which use Production SSL certificates to connect to connect to APNs.
  • The device token you will get from the same app (e.g. app with bundle ID com.happyteamlabs.happygoals) will differ depending on Signing Identity type used when building the application.
    1. Development Signing Identity
    2. Distribution Signing Identity
      • You will get the same device token for Ad Hoc and App Store versions
      • This means that when you try to push a notification in your Production Servers which use Production SSL certificates, both users who installed the app from the App Store and users who installed the app using the Ad Hoc build will receive the notification

Some other notes:

  • If you try to register a device token from an app built using a Development Signing Identity to your Production Servers, when you try to send a push notification, the device will not receive the push notification. This is because the APNs will not recognize the device token. This is like giving the APNs a bogus device token.
  • Even if you use 2 different Provisioning Profiles, if the corresponding Signing Identity type is the same (e.g. Distribution), then you will get the same device token.
  • Even if you use 2 different Signing Identities, if the type is the same and within the same iOS account (developer or enterprise), then you will get the same device token.

Hope this helps.

Happy Goals for iOS

Happy Goals for iOS

Want an app to help you track and achieve your goals, without the complex stuff, saving you from headaches? Checkout Happy Goals - Habits & Goals Tracker now in the App Store! Happy Goals has been featured in the App Store in over 32 countries. Start now, better late than never!

 

Thank you!

%d bloggers like this: