NOTE: This doc is mainly inspired by the Rails Application Templates documentation.
When using CocoaPods to generate a new Xcode project you can either use our default template or provide one yourself. Templates can be specified with a path or an URL.
$ pod generate Sample http://example.com/my_cocoapods_template.rb
Example:
# my_cocoapods_template.rb
add_asset("Default.png")
git :init
git add: '.'
git commit: %Q{ -m 'Initial commit' }
Or see the full list of features.
Adds a pod to the applications Podfile.
NOTE: this does not run pod install
pod 'AFNetworking', '~> 2.0.0'
Wraps the pods into the sepcified targets. This can be used to add your test pods to the unit test target.
pod_group :SampleTests do
pod 'OCMock'
end
prefix = ask('What prefix should be used for your files?')
prefix = prefix.uppercase
pod('install') if yes?('Run pod install ?')
git :init
git add: "."
git commit: "-a -m 'Initial commit'"