CedarTargetSpecs.system_or_exit "pushd #{CedarTargetSpecs::PROJECT_ROOT} && xcodebuild -target #{CedarTargetSpecs::UI_SPECS_TARGET_NAME} -configuration #{CedarTargetSpecs::CONFIGURATION} -sdk iphonesimulator clean build ARCHS=i386 && popd", CedarTargetSpecs.output_file("Specs")
CedarTargetSpecs.system_or_exit "pushd #{CedarTargetSpecs::PROJECT_ROOT} && xcodebuild -workspace \"My-App-Project.xcworkspace\" -scheme #{CedarTargetSpecs::UI_SPECS_TARGET_NAME} -configuration #{CedarTargetSpecs::CONFIGURATION} -sdk iphonesimulator clean build ARCHS=i386 && popd", CedarTargetSpecs.output_file("Specs")
Note that I added the -workspace option with -scheme and removed -target.
Now, when I run rake Specs, I'll get the following error when it tries to launch ios-sim (running Specs from XCode runs fine):
-------
Touch /Users/SoftwareDev/Library/Developer/Xcode/DerivedData/My-App-Project-hhxpbduwsokzdacgrhmtptgmcepj/Build/Products/Release-iphonesimulator/Specs.app
cd /Users/SoftwareDev/Documents/workspace/My-App-Project
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/SoftwareDev/.rbenv/versions/1.9.3-p194/bin:/usr/local/Cellar/rbenv/0.4.0/libexec:/Users/SoftwareDev/.rbenv/versions/1.9.3-p194/gemsets/global/bin:/Users/SoftwareDev/.rbenv/versions/1.9.3-p194/gemsets/global/bin:/usr/local/Cellar/rbenv/0.4.0/libexec:/usr/local/heroku:/usr/local/heroku/bin:/usr/local/Cellar/postgresql/9.1.3/bin:/usr/local/bin:/Users/SoftwareDev/.rbenv/shims:/Users/SoftwareDev/.rbenv/bin:/android-sdk-mac_86/platform-tools:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin"
/usr/bin/touch -c /Users/SoftwareDev/Library/Developer/Xcode/DerivedData/My-App-Project-hhxpbduwsokzdacgrhmtptgmcepj/Build/Products/Release-iphonesimulator/Specs.app
** BUILD SUCCEEDED **
Executing ios-sim launch ./build/Release-iphonesimulator/Specs.app --devicetypeid 'com.apple.CoreSimulator.SimDeviceType.iPhone-6, 8.1' | tee /dev/stderr | grep -q ', 0 failures'
Application path /Users/SoftwareDev/Documents/workspace/My-App-Project/build/Release-iphonesimulator/Specs.app doesn't exist!
rake aborted!
******** Build failed ********
Tasks: TOP => Specs
(See full trace by running task with --trace)
------
This is clearly because it's looking at the wrong location and the built Specs.app is elsewhere. You can see that from the Touch output vs. the execution of ios-sim. I can hardcode the path in the Rakefile under def build_dir to look like this:
File.join("/Users/SoftwareDev/Library/Developer/Xcode/DerivedData/My-App-Project-hhxpbduwsokzdacgrhmtptgmcepj/Build/Products/Release" + effective_platform_name)
--
You received this message because you are subscribed to the Google Groups "Cedar Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cedar-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.