CocoaPodsで起きた問題と解決方法
.xcworkspaceが生成されない
下記のような状態の場合は、.xcworkspaceは生成されません。
source 'https://github.com/CocoaPods/Specs.git' install! 'cocoapods', :integrate_targets => false platform :ios, '7.0' target 'Unity-iPhone' do pod 'Google-Mobile-Ads-SDK', '~> 7.13' end
「integrate_targets
」を「true
」にし、「pod instal
」を実行してください。
install! 'cocoapods', :integrate_targets => true
diff: /../Podfile.lock: No such file or directory エラー
下記のようなエラーが出ている場合
diff: /../Podfile.lock: No such file or directory diff: /Manifest.lock: No such file or directory error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.
1. BuildSettings -> Add User-Defined でユーザー定義を追加します。
2. Keyを 「PODS_ROOT
」 値を 「${SRCROOT}/Pods
」に設定します。
clang: error: linker command failed with exit code 1 (use -v to see invocation)
それまでに出ていたwarnningを含めたログを見て、修正を判断してください。
ログの内容によって対応方法が変わります。
例えば、duplicate symbol _OBJC_CLASS_$_PodsDummy_Pods_Unity_iPhone in:
と出ていた場合は、ライブラリが重複していますので、重複しているものを一つ消すというような形です。