This guard uses the Xcoder to provide monitoring of your Xcode projects for changes and launch clean, build, and package actions in response.
Guard-xcoder does not simply monitor all source files within a directory, it looks at the project file and finds the source files that are specifed in a target's source build files. It also currently will rebuild when the global PCH file has been changed as well.
Make sure you have guard installed.
Install the gem with:
gem install guard-xcoder
Add it to your Gemfile:
gem 'guard-xcoder'
And then add a basic setup to your Guardfile:
guard init xcoder
guard 'xcoder', :actions => [ :clean, :build, :test ] do
watch('TestProject')
end
guard 'xcoder' :actions => [ :build ] do
watch('TestProject//Specs')
end
guard 'xcoder' :actions => [ :clean, :build, :package ] do
watch('TestProject//AppStoresubmission')
end
Currently guard-xcoder
does not re-evaluate the file watchers when the project file changes.
This should hopefully be present in a future release.