LoginSignup
38
26

More than 5 years have passed since last update.

Carthage updateとCarthage bootstrapの違い

Last updated at Posted at 2017-08-01

CarthageでLibraryを管理する

1.導入

brew install carthage

2.Cartfileを作成と編集

touch Cartfile
vim Cartfile

3.実行

carthage update --platform iOS 

platformを指定するとiOSだけBuildされる。指定しないと、OSXとwatchOSも全部Buildされる。
実行したあと以下のfilesなど生成される。

  • Cartfile.resolved
  • Carthage/Build
  • Carthage/Checkouts

4.プロジェクトにframworkを追加
 xcodeprojのLinked Frameworks and Librariesのところで追加すれば良い。

Carthage updateとCarthage bootstrapの違い

update -> Update and rebuild the project's dependencies
bootstrap -> Check out and build the project's dependencies

updateはCartfileを読んで、libraryのversion情報などCartfile.resolvedに書き込みます。
bootstrapはCartfile.resolvedを読んで、Cartfile.resolvedで指定してるversionを使う。って感じかなぁ。
個人的には新しいversionへ更新したい時はupdate、
projectで使ってるlibrariesをchecked outしたいだけなら、bootstrapを使う。
  

そのほか

1.指定libraryだけをupdateする

carthage update <Lライブラリ名> 

・・基本の使い方しか書いてませんが、もっと勉強できたら更新するかも。

38
26
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
38
26