Provide MapQuest application key programatically instead of using info.plist

5 posts / 0 new
Last post
alberto_mota
Provide MapQuest application key programatically instead of using info.plist

For different environments, i need to use different "MapQuest application key". Is there any way to provide the "MapQuest application key" outside of info.plist? I dont want to have a different info.plist for each environment just because the "MapQuest application key"


MQBrianCoakley
You can use a build setting
You can use a build setting in xcode and put the build setting into the info.plist. When the app is compiled, the build variable gets substituted into the plist. This is a decent article on how to do that.

alberto_mota
We are switching environments

We are switching environments in run time. Can we provide the API Key on runtime. 

As we are switching environments in runtime, set the build setting into the info.plist wont be a solution for us.

 


MQBrianCoakley
There is no method we're
There is no method we're aware of that will set the key at runtime. I will forward this to the team as an enhancement request.

alberto_mota
nice, thanks

nice, thanks