CocoaPods – managing Objective-C libraries

CocoaPods is the best way to manage library dependencies in Objective-C projects. CocoaPods was originally designed to be integrated in Objective-C Xcode projects, but it can readily be used in RubyMotion projects using the motion-cocoapods gem.

Installing CocoaPods with RubyMotion

Perform the following steps to install CocoaPods with RubyMotion:

  1. Install CocoaPods.
       $sudo gem install cocoapods
    
  2. Set up CocoaPods.
       $pod setup
    
  3. Install motion-cocoapods to work with RubyMotion.
    $sudo gem install motion-cocoapods
    

Now we are all set to use CocoaPods in our RubyMotion project. Add the following code in the Rakefile:

Motion::Project::App.setup do |app|
  app.pods do
    dependency 'Reachability'
  end
end

So, next time when you build your code, it will automatically download the library for you. Then you can use the Objective-C CocoaPods in your project.

For detailed documentation on CocoaPods, visit http://cocoapods.org/.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.143.5.217