title: Xcode not adding newly generated plist after run script phase
body: <p>I'm trying to follow this article <a href="https://peterfriese.dev/reading-api-keys-from-plist-files/" rel="nofollow noreferrer">https://peterfriese.dev/reading-api-keys-from-plist-files/</a> in an attempt to add a run script where a plist is generated from a sample plist that exists in the directory. Upon executing the script it correctly copies the content from the sample plist and generates the new plist(Test-Info.plist) into the root of the project.
  <a href="https://i.stack.imgur.com/b9yLO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/b9yLO.png" alt="enter image description here" /></a></p>
  <p>The issue I have is that when the script has completed running, Xcode is unable to find the new plist generated. If I manually drag and drop the new plist into Xcode it works however I'm trying to see how Xcode can add the new plist without manual intervention.</p>
  <pre><code>CONFIG_FILE_BASE_NAME=&quot;Test-Info&quot;
  
  CONFIG_FILE_NAME=${CONFIG_FILE_BASE_NAME}.plist
  SAMPLE_CONFIG_FILE_NAME=${CONFIG_FILE_BASE_NAME}-Sample.plist
  
  CONFIG_FILE_PATH=$SRCROOT/$PRODUCT_NAME/$CONFIG_FILE_NAME
  SAMPLE_CONFIG_FILE_PATH=$SRCROOT/$PRODUCT_NAME/$SAMPLE_CONFIG_FILE_NAME
  
  if [ -f &quot;$CONFIG_FILE_PATH&quot; ]; then
    echo &quot;$CONFIG_FILE_PATH exists.&quot;
  else
    echo &quot;$CONFIG_FILE_PATH does not exist, copying sample&quot;
    cp -v &quot;${SAMPLE_CONFIG_FILE_PATH}&quot; &quot;${CONFIG_FILE_PATH}&quot;
  fi
  </code></pre>
  <p>I'm guessing the script needs to be modified so when the new plist is generated not only should it be added to the root but also the Copy bundle Resources phase which I'm unsure to do. Any help would be appreciated.</p>