1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【CocoaPods】iOSのライブラリをForkして使う

Posted at

iOSアプリのライブラリを一部カスタマイズして使う機会があったので。

フォーク

まず普通にFork。
https://help.github.com/ja/github/getting-started-with-github/fork-a-repo
GitHub公式練習用リポジトリSpoon-Knifeを使って説明。

このボタンを押して
image.png
こうなれば成功。
image.png

Fork元の変更を楽に取り込むローカル構成手順もあるが割愛。
https://help.github.com/ja/github/getting-started-with-github/fork-a-repo#step-1-set-up-git

Podfile

ライブラリを修正したら、Podfileで本来このように書くものを…

  pod 'Spoon-Knife'

このようにfork先のrepoとbranchを指定してpod install

  pod 'Spoon-Knife', :git => 'git@github.com:{{ your name }}/Spoon-Knife.git', :branch => '{{ your branch }}'

参照 : https://guides.cocoapods.org/using/the-podfile.html#from-a-podspec-in-the-root-of-a-library-repo

ただし元のライブラリが既にインストール済みの場合、リポジトリのみの変更は解釈されないので一度この行を消しての再インストールが必要だった。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?