TONY0922のブログ

学んだことを適当に記録していくブログです。主にRuby, Java, PHPで仕事してます。更新頻度はそんなに高くないので、ご了承下さい。

KiwiをCocoaPodsからインストールしようとしたら、ハマった

使用環境
Xcode 5.1.1
iOS 7.1
CocoaPods 0.32.1

既存のプロジェクトにKiwiを導入したくて、 CocoaPodsにKiwiをインストールさせるために以下を書いた。

platform :ios

target "App_Kiwi", :exclusive => true do #テスト用プロジェクト
    pod 'Kiwi'
end

そんで、プロジェクトのルートディレクトリで下記を実行。

$ pod install
Analyzing dependencies
[!] The platform of the target `App_Kiwi` (iOS 4.3) is not compatible with `Kiwi (2.2.4)` which has a minimum requirement of iOS 5.0 - OS X 10.7.

色々調べた結果、platformでバージョンを指定していないのが、ダメっぽい。

platform :ios, '7.1' #ここで使用しているバージョンを書く。

target "App_Kiwi", :exclusive => true do
    pod 'Kiwi'
end

もう一回チャレンジ!

$ pod install
Analyzing dependencies
Downloading dependencies
Installing Kiwi (2.2.4)
Generating Pods project
Integrating client project

[!] From now on use `App.xcworkspace`.

うまくいった!

参考URL
http://stackoverflow.com/questions/18797180/platform-of-the-target-fubartests-ios-4-3-is-not-compatible-with-kiwi-2-2