FirebaseUIをpod installしたら初めからエラーが出た
以下のようなエラーが出ました。
Error: /MyProject/ios/Pods/FirebaseUI/Auth/FirebaseAuthUI/FUIAuth.m:341:14: No visible @interface for 'FIRAuth' declares the selector 'useEmulatorWithHost:port:'
環境
・macOS Big Sur バージョン11.2.3
・XCode 12.4
・Swift5.3.2
対処法
Github上で同様のエラーが報告されていました。
これによると、PodfileでFirebase/Authのバージョンを7.2.0以上にすれば良いとのことです。
pod 'Firebase/Auth', '>= 7.2.0'
解決できなかった
上記の方法では私は解決できませんでした。
pod 'Firebase/Firestore'
pod 'FirebaseFirestoreSwift'
pod 'Firebase/Auth'
pod 'FirebaseUI/Auth'
pod 'FirebaseUI/Google'
pod 'FirebaseUI/Facebook'
pod 'FirebaseUI/OAuth'
pod 'FirebaseUI/Email'
私が入れたpodは上記の通りですが、一緒にFirestoreを入れていたため解決できなかったようです。
こちらもgithubに報告されていました。
どうやらFirebaseFirestoreSwiftとFirebase/Authが求めるFirebaseCoreのバージョンが違うことでコンフリクトが起きているようです。
pod 'FirebaseFirestoreSwift', '~> 7.3-beta'
としてpod updateするとエラーが消えました!
pod updateする前にPodfile.lockを削除するのを忘れずに。