Skip to content

Instantly share code, notes, and snippets.

@roothybrid7
Created January 14, 2012 03:18
Show Gist options
  • Save roothybrid7/1610106 to your computer and use it in GitHub Desktop.
Save roothybrid7/1610106 to your computer and use it in GitHub Desktop.
CocoaPods 0.3.9 修正非公式版インストール

v0.3.9の暫定対策版

注: CocoaPods 0.3.9を上書きしますので公式版のほうに戻す場合は、一度アンインストールしてから再インストールしてください

手順

必要なものをインストール:

macgem install rake                             # rakeがインストールされていない場合

暫定版CocoaPodsのインストール:

curl https://raw.github.com/gist/1610106/1b06a71ea6c510ed05b937b095b50aba31c7c1f7/install.sh | sh

CocoaPodsの再セットアップ:

pod setup                                       # CocoaPodsの再セットアップ

対策内容

Podfileで、targetブロックに :exclusive => true を与えるとライブラリのヘッダファイルがヘッダ検索パスへ正常にシンボリックリンクが作られない問題の対策 :exclusive => true があってもなくてもすべてヘッダ検索パスへシンボリックリンクが作られるように修正しました。

下記の例だと、OCMock以外はヘッダ検索パスへシンボリックリンクが作られないので、そのままでは正常にビルドできなくなる

Podfile例:

platform :ios
dependency 'JSONKit'
dependency 'AFNetworking'
target :test, :exclusive => true do
    dependency 'OCMock'
end
#!/bin/bash -
GEMFILE="cocoapods-0.3.9.gem"
macgem list rake | grep rake >/dev/null || {
echo 'rakeがインストールされていません!!: $ macgem install rake' >&2
exit 1
}
git clone git://github.com/roothybrid7/CocoaPods.git
cd CocoaPods
git checkout hotfix/prevent_dup_cleaning
macrake gem:build
macgem install $GEMFILE -f
cd -
rm -rf CocoaPods
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment