To run pod install
as a pre-build action for your target using RVM, follow these easy steps.
- Duplicate your main scheme, and make sure it's shared
- Navigate to the Edit Build section of your new scheme
- Uncheck
Find Implicit Dependencies
(otherwise Xcode will stop the build when the workspace contents change) - Go into the Pre-actions subsection
- Add a new run script with the following content:
source "$HOME/.rvm/scripts/rvm"
rvm use ruby-1.9.3-p194 # whichever version of Ruby you installed the cocoapods gem to
cd ${SRCROOT}
pod install
- Change the
Shell
to/usr/bin/env bash
and make sure to Provide Build Settings from your target - Click OK
- Switch to the new scheme, and build!
Interesting. Out of curiosity, is checking in the
.xcworkspace
file something that you or other CocoaPods users actually find to be useful, or something done begrudgingly simply to make the Bot work? I've never considered checking it in until now.Also, what exactly do you mean when you say "setup the Bot to build that file"?