LoginSignup
3
3

More than 3 years have passed since last update.

[備忘録] FirebaseUIエラー:No visible @interface for 'FIRAuth' declares the selector 'useEmulatorWithHost:port:'の対処法

Last updated at Posted at 2021-04-12

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を削除するのを忘れずに。

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3