• Stars
    star
    203
  • Rank 192,890 (Top 4 %)
  • Language
    Ruby
  • License
    BSD 2-Clause "Sim...
  • Created over 12 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Integrate 3rd-party libraries in RubyMotion for iOS / OS X projects via CocoaPods

motion-cocoapods

Build Status Gem Version

motion-cocoapods allows RubyMotion projects to integrate with the CocoaPods dependency manager.

Installation

$ [sudo] gem install motion-cocoapods

Or if you use Bundler:

gem 'motion-cocoapods'

Setup

  1. Edit the Rakefile of your RubyMotion project and add the following require line:

    require 'rubygems'
    require 'motion-cocoapods'
  2. Still in the Rakefile, set your dependencies using the same language as you would do in Podfiles.

    Motion::Project::App.setup do |app|
      # ...
      app.pods do
        pod 'AFNetworking'
      end
    end

    You can use use_frameworks! to install pods as frameworks (NOTE This feature requires RubyMotion 4.18+).

    Motion::Project::App.setup do |app|
      # ...
      app.pods do
        use_frameworks!
        pod 'AFNetworking'
      end
    end
  3. If this is the first time using CocoaPods on your machine, you'll need to let CocoaPods do some setup work with the following command:

    $ [bundle exec] pod setup
    

Tasks

To tell motion-cocoapods to download your dependencies, run the following rake task:

$ [bundle exec] rake pod:install

That’s all. The build system will properly download the given pods and their dependencies. On the next build of your application it will pod the pods and link them to your application executable.

If the vendor/Podfile.lock file exists, this will be used to install specific versions. To update the versions, use the following rake task:

$ [bundle exec] rake pod:update

Options

If necessary, you can pass vendor_project options to the pods configuration method. These options are described here. For instance, to only generate BridgeSupport metadata for a single pod, which might be needed if a dependency that you’re not using directly is causing issues (such as C++ headers), you can specify that like so:

   Motion::Project::App.setup do |app|
     app.pods :headers_dir => 'Headers/AFNetworking' do
       pod 'AFNetworking'
       # ...
     end
   end

By default the output of CocoaPods doing its work is silenced. If, however, you would like to see the output, you can set the COCOAPODS_VERBOSE env variable:

$ [bundle exec] rake pod:install COCOAPODS_VERBOSE=1

Contribute

  1. Setup a local development environment.

    $ git clone git://github.com/HipByte/motion-cocoapods.git
    $ cd motion-cocoapods
    $ [bundle exec] rake bootstrap
    
  2. Verify that all the tests are passing.

    $ [bundle exec] rake spec
    
  3. Create your patch and send a pull-request.

License

Copyright (c) 2012-2015, HipByte ([email protected]) and contributors. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

More Repositories

1

BubbleWrap

Cocoa wrappers and helpers for RubyMotion (Ruby for iOS and OS X) - Making Cocoa APIs more Ruby like, one API at a time. Fork away and send your pull requests
Ruby
1,181
star
2

sugarcube

Some sugar for your cocoa. RubyMotion helpers.
Ruby
422
star
3

Joybox

Cocos2D & Box2D Wrapper for Ruby Motion - Currently out of date an unmaintained :-(
Ruby
280
star
4

ib

IB Outlets for rubymotion
Ruby
253
star
5

afmotion

AFMotion is a thin RubyMotion wrapper for AFNetworking
Ruby
215
star
6

motion-support

Commonly useful extensions to the standard library for RubyMotion
Ruby
132
star
7

motion-firebase

A RubyMotion wrapper for the Firebase SDK. Adds more rubyesque methods to the built-in classes.
Ruby
48
star
8

motion-provisioning

Simplified provisioning for RubyMotion iOS, tvOS and macOS apps.
Ruby
46
star
9

motion-sqlite3

A minimal wrapper over the SQLite 3 C API for RubyMotion
Ruby
33
star
10

motion-authentication

A simple, standardized authentication helper for common authentication strategies for RubyMotion apps.
Ruby
11
star
11

motion-authorization

Simple and intuitive authorization solution for RubyMotion. Inspired by CanCan and Pundit.
Ruby
10
star
12

motion-http

A cross-platform HTTP client for RubyMotion that's quick and easy to use.
Ruby
7
star
13

motion-turbo

Turbo Native for RubyMotion
Ruby
6
star
14

motion-lager

Full featured logger for use in RubyMotion apps.
Ruby
5
star
15

motion-expect

Bring RSpec 3.0 expect syntax to RubyMotion
Ruby
3
star
16

BubbleWrap-HTTP

BubbleWrap's (now deprecated) HTTP library
Ruby
3
star
17

motion-settings

Easily store and retrieve your user's preferences and settings using NSUserDefaults.
Ruby
1
star