I am trying to build a helloWorld application using PhoneGap but it seems that is trying to find the .xcodeproj file twice.
phonegap version: 3.3.0-0.18.0
cordova version: 3.3.1-0.1.2
$ phonegap build ios
[phonegap] detecting iOS SDK environment...
[phonegap] using the local environment
[phonegap] compiling iOS...
[error] An error occurred while building the ios project.xcodebuild: error: 'HelloWorld.xcodeproj.xcodeproj' does not exist.
xcodebuild: error: 'HelloWorld.xcodeproj.xcodeproj' does not exist.
xcodebuild: error: 'HelloWorld.xcodeproj.xcodeproj' does not exist.
It works fine when I build and run from the XCode IDE.
In my case it was grep output which was confusing the build script.
Try running the following command just before build
or run
:
export GREP_OPTIONS="--color=never"
Source of the problem is in platforms/ios/cordova/build
script:
My local environment contains:
export GREP_COLOR='1;37;40'
export GREP_OPTIONS="--color=always"
.. which produces nice colored grep output, but it is confusing the above script, exactly at this line:
XCODEPROJ=$( ls "$PROJECT_PATH" | grep .xcodeproj )
PROJECT_NAME=$(basename "$XCODEPROJ" .xcodeproj)
A permanent fix would involve changing the line to something like:
XCODEPROJ=$( ls "$PROJECT_PATH" | grep --color=never .xcodeproj )
PROJECT_NAME=$(basename "$XCODEPROJ" .xcodeproj)
Cheers!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With