README.md in cocoapods-rome-1.0.0 vs README.md in cocoapods-rome-1.0.1

- old
+ new

@@ -9,24 +9,54 @@ ```bash $ gem install cocoapods-rome ``` -## Usage +## Important -Write a simple Podfile like this: +In the examples below the target 'caesar' could either be an existing target of a project managed by cocapods for which you'd like to run a swift script **or** it could be fictitious, for example if you wish to run this on a standalone Podfile and get the frameworks you need for adding to your xcode project manually. +## Usage + +Write a simple Podfile, like this: + +### MacOS + ```ruby platform :osx, '10.10' plugin 'cocoapods-rome' target 'caesar' do pod 'Alamofire' end ``` +### iOS + +```ruby +platform :ios, '8.0' + +plugin 'cocoapods-rome', { :pre_compile => Proc.new { |installer| + installer.pods_project.targets.each do |target| + target.build_configurations.each do |config| + config.build_settings['SWIFT_VERSION'] = '4.0' + end + end + + installer.pods_project.save +}, + + dsym: false, + configuration: 'Release' +} + +target 'caesar' do + pod 'Alamofire' +end +``` + then run this: ```bash pod install ``` @@ -37,10 +67,13 @@ $ tree Rome/ Rome/ └── Alamofire.framework ``` +## Advanced Usage + + For your production builds, when you want dSYMs created and stored: ```ruby platform :osx, '10.10' @@ -83,25 +116,35 @@ This hook allows you to make any last changes to the generated Xcode project before the compilation of frameworks begins. It receives the `Pod::Installer` as its only argument. +### `post_compile` + +This hook allows you to run code after the compilation of the frameworks finished and they have been moved to the `Rome` folder. + +It receives the `Pod::Installer` as its only argument. + #### Example Customising the Swift version of all pods ```ruby platform :osx, '10.10' -plugin 'cocoapods-rome', :pre_compile => Proc.new { |installer| - installer.pods_project.targets.each do |target| - target.build_configurations.each do |config| - config.build_settings['SWIFT_VERSION'] = '4.0' +plugin 'cocoapods-rome', + :pre_compile => Proc.new { |installer| + installer.pods_project.targets.each do |target| + target.build_configurations.each do |config| + config.build_settings['SWIFT_VERSION'] = '4.0' + end end - end - installer.pods_project.save -} + installer.pods_project.save + }, + :post_compile => Proc.new { |installer| + puts "Rome finished building all the frameworks" + } target 'caesar' do pod 'Alamofire' end ```