Skip to Content

iOS User Setting to change AgentryServerURL for various schemes

Sep 15, 2017 at 08:23 PM


avatar image

Is it possible to change the AgentryServerURL based on different iOS Schemes per environment? I have tried to create a $(AGENTRY_SERVER_URL) User-Defined setting but the Branding.plist file does not seem to translate that to my actual SMP server. Has anyone been able to do this with iOS Agentry projects?

10 |10000 characters needed characters left characters exceeded

I am not following on what you are wanting to do. Can you clarify what you mean by different server url based on iOS schemes?


We have a QA and a Prod SMP instance for our Agentry project. Each of these has a different server URL. I am trying to tie the Agenrtry URL to the iOS Scheme (Debug/Release). Currently I have to manually change the agentryServerURL before creating the branded IPA file for our application.

* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Nathan Worcester Dec 04, 2017 at 02:43 PM

I was able to resolve this issue by configuring the xCode Schemes as follows:



if [ "${CONFIGURATION}" == "DEV" ]; then

/usr/libexec/PlistBuddy -c "Set :agentryServerUrl https://...DevSMP.../AppName""$plist"

elif [ "${CONFIGURATION}" == "QA" ]; then

/usr/libexec/PlistBuddy -c "Set :agentryServerUrl https://...QASMP.../AppName""$plist"

elif [ "${CONFIGURATION}" == "Production" ]; then

/usr/libexec/PlistBuddy -c "Set :agentryServerUrl https://...ProdSMP.../AppName""$plist"


10 |10000 characters needed characters left characters exceeded
Bill Froelich
Sep 20, 2017 at 03:47 AM

I am not aware of anyone doing that before. Typically I see customers creating a QA release ipa and a PROD release ipa so they can both co-exist on the same device side-by-side and the user will then choose which version to use. Not sure if what you want to do is possible or not.



10 |10000 characters needed characters left characters exceeded