I'm having trouble with the 'Run Script' in the Xcode IDE. I'm able to download a file from a server using this script below, straight into a directory in Xcode, which can be viewed, by way of right clicking on the folder in the IDE where the download has been sent to, however although it appears here, its not appearing in the 'Copy Bundle Resources' nor in the Xcode resources folder, so when trying to pull this file into the code, I get file doesn't exist.
I'm aware of how to add the file manually(+), however this would be better if it run's automatically in the script.
Can anyone help with this Bash Script below, I've tried to copy (cp) to ${PRODUCTS_DIR} and ${BUILT_PRODUCTS_DIR} but its not copying over for some reason. I'm able to (mv) move the file but still this does appear in the 'Copy Bundle Resources'? Anyone got any clues to this? Thanks in advance.
fileToDownload=$(ssh $Username@server1 ls -t /doc_test_control/the_test_foler/myFile.txt)
echo "File to download: $fileToDownload"
scp $Username@server1:$fileToDownload "${SRCROOT}/Mobile-App-iOS/Test_Foler/"
echo "File downloaded to : ${SRCROOT}/"
mv "${SRCROOT}/Mobile-App-iOS/Test_Foler/""* "${BUILT_PRODUCTS_DIR}"
ls -l "${SRCROOT}/Mobile-App-iOS/Test_Foler/"
echo "DONE"