Skip to Content
avatar image
Former Member

iOS User Setting to change AgentryServerURL for various schemes

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?

Add comment
10|10000 characters needed 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?

  • Former Member

    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.

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Dec 04, 2017 at 02:43 PM

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

    #!/bin/sh

    plist="${SRCROOT}/Branding.plist"

    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"

    fi

    Add comment
    10|10000 characters needed characters exceeded

  • 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.

    Sorry,

    --Bill

    Add comment
    10|10000 characters needed characters exceeded