I'm attempting to create a script that builds and archives my iOS project. My goal is to have a script that creates AdHoc and Distribution ipas.
I've attempted something like this:
xcodebuild -scheme MyApp -configuration AdHoc archive
It works when I execute this command in the terminal. But when I put it in a shell script file and then run it from the terminal:
sudo sh /Users/user/somepath/buildscript.sh
I get the following error:
Provisioning profile 'XXX-XXX-XXX-XXX-XXX' can't be found
What do you think?