Closed varris closed 5 years ago
The command for simctl should be:
/Application/Xcode.app/Contents/Developer/usr/bin/simctl
The Xcode path is determined using the following command:
xcode-select -p
Could you please run the command and see what your output is. This should be:
/Applications/Xcode.app/Contents/Developer
You can also do this with the build.gradle by adding:
task checkSimctl {
doLast {
def commandRunner = new org.openbakery.CommandRunner()
println new org.openbakery.xcode.Xcode(commandRunner).getSimctl()
}
}
and then execute:
./gradlew checkSimctl
My guess is that something is wrong with the xcode installation, or the command line tools.
Hello,
I did that and got ./gradlew -p dev-ios/ checkSimctl
Task :dev-ios:checkSimctl /Contents/Developer/usr/bin/simctl
BUILD SUCCESSFUL in 1s 1 actionable task: 1 executed
and I have for sure simctl l /Applications/Xcode.app/Contents/Developer/usr/bin/simctl -rwxr-xr-x 1 root wheel 294B Aug 22 14:26 /Applications/Xcode.app/Contents/Developer/usr/bin/simctl
and it is xcode 10
run xcode-select -p /Applications/Xcode.app/Contents/Developer
closing because after updating to xcode 10 need update command line tools to xcode 10
don't forget update command line tools
I was wrong still have the problem
the problem is gradle 4.7 when I have changed your repo to 4.7
got the same error with example build
./gradlew -p example/tvOS/Example_tvOS_Swift/ build
Task :xcodebuild FAILED
FAILURE: Build failed with an exception.
java.io.IOException: Cannot run program "/Contents/Developer/usr/bin/simctl" (in directory "."): error=2, No such file or directory
can you run xcode-select -p
xcode-select -p /Applications/Xcode.app/Contents/Developer
the problem is gradle. if have gradle >= 4.7 it will run gradle daemon for speeding up the build. sometimes that daemon caches wrong path value.
the workaround is run gradle with no daemon option ./gradlew --no-daemon -p dev-ios/ test
I have build.gradle
buildscript { repositories { maven { url('http://repository.openbakery.org') } mavenCentral() }
}
apply plugin: 'org.openbakery.xcode-plugin'
xcodebuild { target = 'dev-ios' scheme = 'dev-ios' // configuration = 'Test' destination = ['iPhone 8' ] }
after ./gradlew -p dev-ios/ build have error FAILURE: Build failed with an exception.
I have xcode 10, gradle 4.7