はじめに
MessageKitとはiOSアプリでLINEのようなチャット画面を簡単に作成することができるframeworkであり、cocoapodsでinstallできる。
ただ使い方がよく分からなかったので、クローンしてサンプルプロジェクト(MessageKit/Example/ChatExample.xcworkspace)を触ろうとしたがビルドが通らなかった。
エラー文
.../MessageKit/Example/Pods/Target Support Files/ Pods-ChatExample/Pods-ChatExample.debug.xcconfig: unable open file (in target "ChatExample" in project "ChatExample") (in target 'ChatExample')
解決策
ChatExample.xcworkspaceを削除し、
pod install
を実行。失敗。エラー文は以下
Fetching podspec for `MessageKit` from `../`
[!] CocoaPods could not find compatible versions for pod "InputBarAccessoryView":
In snapshot (Podfile.lock):
InputBarAccessoryView (= 4.2.2)
In Podfile:
MessageKit (from `../`) was resolved to 3.0.0, which depends on
InputBarAccessoryView (~> 4.2.2)
None of your spec sources contain a spec satisfying the dependencies: `InputBarAccessoryView (= 4.2.2), InputBarAccessoryView (~> 4.2.2)`.
よく分からんが要はキャッシュを手動で更新してやる必要があるらしい。(参考pod install でライブラリの最新バージョンが入らないときの対処)
pod repo update
pod install
通った。