2
3

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.

iOS開発/CocoaPods導入手順/Swift

Last updated at Posted at 2015-05-27

最初に

プロジェクト配下で

$ pod init

できなかったら

$ sudo gem install cocoapods

またはiTerm再起動

CocoaPodsインストール

$ pod install

これでprjフォルダ以下にPodfileができる。

ライブラリ追加

# Uncomment this line to define a global platform for your project
# platform :ios, '6.0'
use_frameworks!

target 'mapple-pass' do
  pod 'Alamofire'
  pod 'SwiftyJSON'
end

target 'mapple-passTests' do

end

cocoapodからライブラリインストール(bundlerでいうbundle install)

Pod install

ライブラリ検索

プロジェクトを開くとき

オブジェクト配下のワークスペースを開く

error

[!] Pods written in Swift can only be integrated as frameworks; this feature is still in beta. Add `use_frameworks!` to your Podfile or target to opt into using it.
use_frameworks!
pod install

できたら、ワークスペースできた。
次からhoge.xcworkpaceで開きましょう。
↓podsができます。
スクリーンショット 2015-05-27 22.39.02.png

参考

http://www.raywenderlich.com/64546/introduction-to-cocoapods-2
http://hajipion.com/1066.html

2
3
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
2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?