0
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 5 years have passed since last update.

CocoaPodsの利用方法

0
Posted at

CocoaPods

CocoaPods とは、ライブラリ管理ツールです。
構築手順を以下に記載します。

本ページでは、CocoaPodsの実装方法およびライブラリのインストール方法をまとめました!

端末へのインストールおよびセットアップ

  1. CocoaPods をインストールする

     sudo gem install cocoapods
    
  2. セットアップコマンドを実行します

     pod setup
    
  3. (アプリ名).xcodeproj/ と同じ階層に移動します

  4. Podfile を作成します

     pod init
    

これにより、Podfile が作成されます。

ライブラリのインストール方法

ここでは、SwiftLint のインストール方法を記載します。

  1. Podfile にインストールするライブラリを記載します

     # Pods for (アプリ名)
     pod 'SwiftLint' // 追記する
    

2. Podfile に記載されているライブラリをインストールします

    pod install

※アプリでSwiftLintを利用できるようにするためには、アプリ内での設定が必要です。

.gitignore への設定

Podsフォルダはgitの対象から外しましょう。

# CocoaPod
Pods/
0
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
0
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?