毎回、毎回、ライブラリをgitからダウンロードして、プログラムをし、また、最新版のプログラムが配信されたら、同じことの繰り返し。
ちょっとめんどくせぇーなーっと思って、COCOAPODSを導入してみることに。
基本的には、iOSライブラリ管理の神ツール「CocoaPods」のインストールと使い方を読みながら導入したわけですが、のっけからつまづくことに。
ターミナルで、
sudo gem install cocoapodsをうったんだけど、何も起きない。
うんともすんとも言わない。
超困ったので、
sudo gem install cocoapods -Vでインストール
進捗が確認できるので、こっちの方がいいかも。
その後、すかさず、
pod setupを実行し、「.xcodeproj」ファイルと同じディレクトリ上に「Podfile」を作成し、いざ、
pod installしたら、今度は、
[!] The `プロジェクト名 [Debug]` target overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Target Support Files/Pods/Pods.debug.xcconfig'. This can lead to problems with the CocoaPods installation - Use the `$(inherited)` flag, or - Remove the build settings from the target. [!] The `プロジェクト名 [Release]` target overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Target Support Files/Pods/Pods.release.xcconfig'. This can lead to problems with the CocoaPods installation - Use the `$(inherited)` flag, or - Remove the build settings from the target.がでてきて、「TARGET」→「Build Settings」→「Linking」→「Other Linker Flags」に「$(inherited)」を追加して、初めて、コンパイルが正常に通りました。
参考:Using cocoaPods for google AdMob SDK
長かったなー、ここまでの道のり。
0 コメント:
コメントを投稿