What's the difference between 'developmentAppKey' and 'productionAppKey' in the airshipconfig?

StackOverflow https://stackoverflow.com/questions/22247552

  •  10-06-2023
  •  | 
  •  

Question

I couldn't find a real explanation of the difference between the developmentAppKey(secret) and the productionAppKey(secret).

I've looked at stuff like: https://support.urbanairship.com/customer/portal/articles/1138363-configuring-your-airshipconfig-plist-for-multiple-targets, but couldn't get through the help there. What is the difference between the developmentAppKey(secret) and the productionAppKey(secret)?

From what I understand; the developmentAppKey will be used if inProduction is set to false. Whereas the productionAppKey will be used if inProduction is true. Is this correct? And if this is correct, consider the following example:

Two apps, A-Debug and B-Release, both exist in Urban airship. If I create the following airshipconfig (for the sake of explaining I've left out all unnecessary info):


developmentAppKey = App-A-KEY

productionAppKey = App-B-KEY

gcmSender = 1234567891

inProduction = false


Is it possible to switch between the two apps using the inProduction flag? Or is this impossible due to the difference in Google Project Numbers (gcmSender) for the two apps?

Was it helpful?

Solution

Development app key/secret are for development environments (connecting to development servers).

Production app key/secret are for production environments (connecting to production servers).

DO NOT SWITCH BETWEEN THE TWO IN THE APP!!

I recommend creating two apps in Urban Airship (as you mentioned with A-Debug and B-Release). One for development, and another for production. From there, use the inProduction = false for developing and inProduction = true for when you publish the app. EG:

developmentAppKey = A-Debug-KEY developmentAppSecret = A-Debug-SECRET

productionAppKey = B-Release-KEY productionAppSecret = B-Release-SECRET

gcmSender = 1234567891

inProduction = false will use A-Debug Key and Secret inProduction = true will use A-Release Key and Secret

This will help with testing your push notifications before sending them out to your entire audience.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top