Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated to reflect the current process. #27

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 22 additions & 13 deletions articles/cocoapods/index.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,29 @@ In this article we will cover how you can integrate the http://cocoapods.org[Coc
Synopsis
--------

CocoaPods is the missing dependency manager for Objective-C projects. It is similar to RubyGems but for Objective-C dependencies.
CocoaPods is the dependency manager for Objective-C projects. It is similar to RubyGems but for Objective-C dependencies.

Dependencies in CocoaPods are called Pods. You can get the list of Pods available from the http://github.com/CocoaPods/Specs[CocoaPods/Specs] GitHub repository.
Dependencies in CocoaPods are called Pods (analgous to Ruby Gems). You can get the list of Pods available from the http://github.com/CocoaPods/Specs[CocoaPods/Specs] GitHub repository.

CocoaPods was originally designed to be integrated in Objective-C Xcode projects, but we worked with the awesome CocoaPods author to make it possible to be used in RubyMotion projects.
CocoaPods were originally designed to be integrated in Objective-C Xcode projects, but we worked with the awesome CocoaPods author to make it possible to be used in RubyMotion projects.

You can check the http://cocoapods.org website to get more information about CocoaPods.

Installation
Setup
------------

First, you will need to install and setup CocoaPods, unless you already have.
Firstly, you will need to implement the gem. This can be done systemwide with command line, or bundler. The code lives in the http://github.com/HipByte/motion-cocoapods[HipByte/motion-cocoapods] GitHub repository.

Command Line:
----
$ sudo gem install cocoapods
$ pod setup
$ [sudo] gem install cocoapods
----

The RubyMotion CocoaPods integration also comes as a gem.

Bundler (in your Gemfile)
----
$ sudo gem install motion-cocoapods
gem 'motion-cocoapods'
----

The code lives in the http://github.com/HipByte/motion-cocoapods[HipByte/motion-cocoapods] GitHub repository.

Usage
-----
Expand All @@ -56,7 +54,18 @@ Motion::Project::App.setup do |app|
end
----

That's all you have to do.
You can view and example of a pod being used in https://github.com/HipByte/RubyMotionSamples/blob/master/osx/Markdown/Rakefile[RubyMotionSamples]

If this is your first time using CocoaPods on your machine, you'll need to let CocoaPods perform some setup with the following command:
----
$ [bundle exec] pod setup
----

Additionally you can tell motion-cocoapods to download your depencies with the following rake task:
----
$ rake pod:install
----

The next time you build your project, the +JSONKit+ sources will be downloaded then built and linked against your application executable. If you require a Pod that has dependencies, they will also be properly honored.
That's it! The +JSONKit+ sources will be downloaded then built and linked against your application executable. If you require a Pod that has dependencies, they will also be properly honored.

For more detailed information and issues please see the gem's http://github.com/HipByte/motion-cocoapods[Github page]