IOS app run with command line failing

930 views Asked by At

I have created an app in IOS and want to run it with a shell script. The script has following commands:-

xcodebuild -target "${PROJECT_NAME}" -sdk "${TARGET_SDK}" -configuration Release

/usr/bin/xcrun -sdk iphoneos5.1 PackageApplication -v "${PROJECT_BUILDDIR}/${APPLICATION_NAME}.app" -o "${BUILD_HISTORY_DIR}/${APPLICATION_NAME}.ipa" --sign "${DEVELOPPER_NAME}" --embed "${PROVISIONING_PROFILE}"

The values for the variables are properly set. The app is getting build successfully, but the second command is failing ie. .app file is getting created but .ipa file creation is failing. The error is as follows:-

Unable to copy '/Users/abcd/Library/MobileDevice/Provisioning\ Profiles/XXXXXXX-YYYY-4C1C-BD7A-A0E08E5F5FF1.mobileprovision' to '/var/folders/7r/rkky9bq529x5k0s961z9qby00000gp/T/Q6hP4gQFE0/Payload/Splist_test3.app/embedded.mobileprovision'

ie. the provisioning profile is not getting copied to some temporary path. I have already tried giving appropriate permissions to the files but the error exists. On further investigation, i found that embedded.mobileprovision directory itself does'nt exist. Since, the files are getting created dynamically, how can I make sure that this directory gets created on the fly and the error does'nt occur. Please let me know if I am making any other mistake. Thanks. Would greatly appreciate anybody helping because this error has become a bottleneck for me.

1

There are 1 answers

0
morisunshine On BEST ANSWER

Maybe you can find the way to solve this problem from here