title: How to use App center environment variables in iOS project
body: <p>I have tried a few things, but I can't get the variables to stick, probably because I am not used to writing Scripts.</p>
  <p>The documentation from Appcenter : <a href="https://docs.microsoft.com/en-us/appcenter/build/custom/variables/" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/appcenter/build/custom/variables/</a>
  It says I can only access the environment variables from app center in the build script..</p>
  <ol>
  <li><p>I have tried creating a Run Script from Build phases, but no variables is saved no matter what. How do I save an environment variable ? I have tried, export ENVIRONMENT_TEST=&quot;abc&quot;, but I cant see it afterwards using</p>
  <p>let environments = ProcessInfo.processInfo.environment[&quot;ENVIRONMENT_TEST&quot;]</p>
  </li>
  <li><p>I found a similar issue: <a href="https://stackoverflow.com/questions/54266481/using-microsoft-app-center-environment-variables-in-ios">Using Microsoft App Center environment variables in iOS</a></p>
  </li>
  </ol>
  <p>here the solution is to save the environment variable $ENVIRONMENT_VARIBLE to a file and read from it later. So now im trying to save to a new plist file. This works locally, but not from a device. I believe its because the path is different. I use:</p>
  <pre><code>plutil -replace somekey -string somevalue1 ${SOURCE_ROOT}/AppName/AppcenterValues.plist
  </code></pre>
  <p>Any ideas for this ?</p>