xcode - Why is "xcodebuild: command not found" in this build script? -


hi have following in root of xcode project:

#!/bin/bash xcodebuild -scheme target1 clean; xcodebuild -scheme target1 archive; xcodebuild -scheme target2 clean; xcodebuild -scheme target2 archive; 

however, executes first line xcodebuild -scheme target1 clean; , yields

... ** clean succeeded **  xcodebuild: command not found xcodebuild: command not found xcodebuild: command not found 

disclaimer: i'm absolute mac os x / unix greenhorn.

edit: following kranteg's suggestion added pwd script:

#!/bin/bash pwd; xcodebuild -scheme target1 clean; pwd; xcodebuild -scheme target1 archive; pwd; xcodebuild -scheme target2 clean; pwd; xcodebuild -scheme target2 archive; pwd; 

the output:

/users/cku/programme/uraclient === clean target uraclient of project uraclient configuration debug ===  check dependencies  <... lots of compiler messages clean ...>  ** clean succeeded **  /users/cku/programme/uraclient xcodebuild: command not found /users/cku/programme/uraclient xcodebuild: command not found /users/cku/programme/uraclient xcodebuild: command not found /users/cku/programme/uraclient 

edit 2: replacing pwd echo $path yields better result, script performs first 3 xcodebuild commands before failing. however, path variable seems unaffected xcodebuild:

/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:desktop/adt-bundle-mac-x86_64-20130522/sdk/platform-tools === clean target uraclient of project uraclient configuration debug ===  <... log messages ...>  ** clean succeeded **  /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:desktop/adt-bundle-mac-x86_64-20130522/sdk/platform-tools === build target uraclient of project uraclient configuration release ===  <... log messages ...>  ** archive succeeded **   following commands produced analyzer issues:     analyzeshallow uraclient/sqlitelibrary/sqlitemanager.m     analyzeshallow uraclient/ura/nsstring+urlencoding.m     analyzeshallow uraclient/services/uratrippredictionsprovider.m     analyzeshallow uraclient/utilityappviewcontroller/viewcontroller.m     analyzeshallow uraclient/rncryptor/rndecryptor.m     analyzeshallow uraclient/rncryptor/rnencryptor.m     analyzeshallow uraclient/rncryptor/rnopensslcryptor.m     analyzeshallow uraclient/rncryptor/rnopenssldecryptor.m     analyzeshallow uraclient/rncryptor/rnopensslencryptor.m (9 commands analyzer issues) /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:desktop/adt-bundle-mac-x86_64-20130522/sdk/platform-tools === clean target uraaseag of project uraclient configuration debug ===  <... log messages ..>  ** clean succeeded **  /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:desktop/adt-bundle-mac-x86_64-20130522/sdk/platform-tools xcodebuild: command not found /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:desktop/adt-bundle-mac-x86_64-20130522/sdk/platform-tools 

with of kranteg & opal i've come working solution:

#!/bin/bash /usr/bin/xcodebuild -scheme target1 clean archive; /usr/bin/xcodebuild -scheme target2 clean archive; /usr/bin/xcodebuild -scheme target3 clean archive; <...> 

thanks again relentless community support, have given otherwise :-)

note: i've found each scheme has post-action step "archive" action, had forgotten about:

xcrun -sdk iphoneos packageapplication "$archive_products_path/$install_path/$wrapper_name" -o "${home}/desktop/${product_name}.ipa" 

this automatically creates .ipa files ad-hoc deployment. maybe interfered original build script changing working directory. however, don't understand why not register pwd , echo $path logging.


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -