GithubHelp home page GithubHelp logo

cocoapods-links's Introduction

cocoapods-links

A CocoaPods plugin to manage local development pods

Installation

gem install cocoapods-links

Purpose

Let's face it, pod development with local dependencies can be a pain. Let's say you have a project MyApp a few pods declared in your Podfile:

pod 'Foo', '~> 1.0.0'
pod 'Bar', :git => 'https://github.com/MyCompany/Bar.git', :tag => "1.0.1"

Perhaps you need to make some modifications to Bar to implement a new feature in MyApp. So you modify your Podfile:

pod 'Bar', :path => "/path/to/bar/checkout"

This development flow requires you to make a temporary change to your Podfile that is managed by source control. Wouldn't it be great if CocoaPods offered a means to manage development pods without having to alter files under source control?

Enter cocoapods-links.

With cocoapods-links, developers can easily test their pods using the provided link functionality. Linking is a two-step process:

Using pod link in a project folder will register a global link. Then, in another pod, pod link <name> will create a link to the registered pod as a development pod.

This allows developers to easily test a pod because changes will be reflected immediately. When the link is no longer necessary, simply remove it with pod unlink <name>.

NOTE: Although the Podfile and Podfile.lock will not be updated using links, the Pods xcodeproj will be updated. If you check in the contents of your Pods directory then you must make sure to unlink your development pods prior to committing any changes.

Usage

Register

To register a pod for local development linking:

pod link

Unregister

To unregister a pod:

pod unlink

Link

To link a pod for use in another pod project:

pod link <name>

Unlink

To unlink a pod from a pod project:

pod unlink <name>

List

To list all registered pods

pod list links

To list all linked pods in a pod project:

pod list links --linked

License

cocoapods-links is released under the MIT license. See LICENSE.

cocoapods-links's People

Contributors

hfossli avatar mowens avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cocoapods-links's Issues

Cocoa pods Version 1.0 beta compatibility

Will a version that is compatible with the 1.0 beta be released soon? I need to use the beta now for some bug fixes that aren't in 0.39 but I'd really like to keep using this plugin.

Thanks!

Unable to activate cocoapods-links-0.3.0, because json-2.0.2 conflicts with json (~> 1.8)

» pod list links
Error loading the plugin cocoapods-links-0.3.0.

Gem::ConflictError - Unable to activate cocoapods-links-0.3.0, because json-2.0.2 conflicts with json (~> 1.8)
/usr/local/opt/rbenv/versions/2.4.1/lib/ruby/2.4.0/rubygems/specification.rb:2291:in raise_if_conflicts' /usr/local/opt/rbenv/versions/2.4.1/lib/ruby/2.4.0/rubygems/specification.rb:1411:in activate'
/usr/local/opt/rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/claide-1.0.2/lib/claide/command/plugin_manager.rb:93:in safe_activate_and_require' /usr/local/opt/rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/claide-1.0.2/lib/claide/command/plugin_manager.rb:31:in block in load_plugins'
/usr/local/opt/rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/claide-1.0.2/lib/claide/command/plugin_manager.rb:30:in map' /usr/local/opt/rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/claide-1.0.2/lib/claide/command/plugin_manager.rb:30:in load_plugins'
/usr/local/opt/rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/claide-1.0.2/lib/claide/command.rb:326:in block in run' /usr/local/opt/rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/claide-1.0.2/lib/claide/command.rb:325:in each'
/usr/local/opt/rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/claide-1.0.2/lib/claide/command.rb:325:in run' /usr/local/opt/rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/cocoapods-1.2.1/lib/cocoapods/command.rb:52:in run'
/usr/local/opt/rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/cocoapods-1.2.1/bin/pod:55:in <top (required)>' /usr/local/opt/rbenv/versions/2.4.1/bin/pod:22:in load'
/usr/local/opt/rbenv/versions/2.4.1/bin/pod:22:in `

'

[!] Unknown command: links

Link Subspecs

It seems that when I am using subspecs, my linked pods do not work.

Is this a known limitation?

Thanks!

Handle Podfile.lock and Manfiest.lock files when installing links

Currently the pod link <name> command will setup links and install dependencies. When installing dependencies the Podfile is unchanged but the Podfile.lock and Manifest.lock files are changed. The Podfile.lock file should not change during linking, however, I think the Manifest.lock file should change. Most people do not check in their Pods directories and if they do they would have to unlink their pods anyways.

So this ticket is to:

  1. keep Podfile.lock the same for an linked source before it is linked
  2. let Manifest.lock file update normally

pod link on dependencies doesn't work

In order for the plugin to work on dependencies I need to add them to the podfile

pod 'foo'

It would be awesome to be able to link dependencies as well.

unable to link to a pod

Command

bundle exec pod link mypod

Report

  • What did you do?

tried to link to a pod

  • What did you expect to happen?

link succeeds

  • What happened instead?

error:

NoMethodError - undefined method `include?' for #<CLAide::ARGV:0x00007fc96d9e40d8>
/Users/kambala/.bundler_gems/ruby/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/command.rb:101:in `ensure_not_root_or_allowed!'
/Users/kambala/.bundler_gems/ruby/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/command.rb:48:in `run'
/Users/kambala/.bundler_gems/ruby/2.6.0/gems/cocoapods-links-0.3.0/lib/pod/links.rb:72:in `link'
/Users/kambala/.bundler_gems/ruby/2.6.0/gems/cocoapods-links-0.3.0/lib/pod/command/link.rb:37:in `run'
/Users/kambala/.bundler_gems/ruby/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Users/kambala/.bundler_gems/ruby/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/command.rb:52:in `run'
/Users/kambala/.bundler_gems/ruby/2.6.0/gems/cocoapods-1.10.1/bin/pod:55:in `<top (required)>'
/Users/kambala/.bundler_gems/ruby/2.6.0/bin/pod:23:in `load'
/Users/kambala/.bundler_gems/ruby/2.6.0/bin/pod:23:in `<top (required)>'
/Library/Ruby/Gems/2.6.0/gems/bundler-2.2.20/lib/bundler/cli/exec.rb:63:in `load'
/Library/Ruby/Gems/2.6.0/gems/bundler-2.2.20/lib/bundler/cli/exec.rb:63:in `kernel_load'
/Library/Ruby/Gems/2.6.0/gems/bundler-2.2.20/lib/bundler/cli/exec.rb:28:in `run'
/Library/Ruby/Gems/2.6.0/gems/bundler-2.2.20/lib/bundler/cli.rb:474:in `exec'
/Library/Ruby/Gems/2.6.0/gems/bundler-2.2.20/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/Library/Ruby/Gems/2.6.0/gems/bundler-2.2.20/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/Library/Ruby/Gems/2.6.0/gems/bundler-2.2.20/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
/Library/Ruby/Gems/2.6.0/gems/bundler-2.2.20/lib/bundler/cli.rb:30:in `dispatch'
/Library/Ruby/Gems/2.6.0/gems/bundler-2.2.20/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
/Library/Ruby/Gems/2.6.0/gems/bundler-2.2.20/lib/bundler/cli.rb:24:in `start'
/Library/Ruby/Gems/2.6.0/gems/bundler-2.2.20/exe/bundle:49:in `block in <top (required)>'
/Library/Ruby/Gems/2.6.0/gems/bundler-2.2.20/lib/bundler/friendly_errors.rb:128:in `with_friendly_errors'
/Library/Ruby/Gems/2.6.0/gems/bundler-2.2.20/exe/bundle:37:in `<top (required)>'
/usr/local/bin/bundle:23:in `load'
/usr/local/bin/bundle:23:in `<main>'

Stack

   CocoaPods : 1.10.1
        Ruby : ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin20]
    RubyGems : 3.0.3
        Host : macOS 11.4 (20F71)
       Xcode : 12.5.1 (12E507)
         Git : git version 2.30.1 (Apple Git-130)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib
Repositories : trunk - CDN - https://cdn.cocoapods.org/

Plugins

cocoapods-deintegrate : 1.0.4
cocoapods-links       : 0.3.0
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-trunk       : 1.5.0
cocoapods-try         : 1.2.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.