When using Authentication
on iOS project using react-native-firebase
v3.0.3,
the application fails to build, with the below error messages, I've replicated the same issue on my local computer and on my automated build system (bitrise.io).
By commented the related code the app compiles without any additional issue.
❌ /Users/vagrant/git/node_modules/react-native-firebase/ios/RNFirebase/auth/RNFirebaseAuth.m:561:22: use of undeclared identifier 'FIRActionCodeOperationRecoverEmail'; did you mean 'FIRActionCodeOperationVerifyEmail'?
case FIRActionCodeOperationRecoverEmail:
^
❌ /Users/vagrant/git/node_modules/react-native-firebase/ios/RNFirebase/auth/RNFirebaseAuth.m:561:22: duplicate case value 'FIRActionCodeOperationVerifyEmail'
case FIRActionCodeOperationRecoverEmail:
^
❌ /Users/vagrant/git/node_modules/react-native-firebase/ios/RNFirebase/auth/RNFirebaseAuth.m:660:75: no visible @interface for 'FIRPhoneAuthProvider' declares the selector 'verifyPhoneNumber:UIDelegate:completion:'
[[FIRPhoneAuthProvider providerWithAuth:[FIRAuth authWithApp:firApp]] verifyPhoneNumber:phoneNumber UIDelegate:nil completion:^(NSString * _Nullable verificationID, NSError * _Nullable error) {
^
❌ /Users/vagrant/git/node_modules/react-native-firebase/ios/RNFirebase/auth/RNFirebaseAuth.m:686:75: no visible @interface for 'FIRPhoneAuthProvider' declares the selector 'verifyPhoneNumber:UIDelegate:completion:'
[[FIRPhoneAuthProvider providerWithAuth:[FIRAuth authWithApp:firApp]] verifyPhoneNumber:phoneNumber UIDelegate:nil completion:^(NSString * _Nullable verificationID, NSError * _Nullable error) {
~~~~~~~~~~~~~~ ^~~~~~~~~~~~~
@alfonsodev Can you check which versions of the Firebase pods are being installed by looking at the Podfile.lock
? Generally this happens when it's installing an old (pre 4.0) version of the Pod.
You can run:
pod outdated
- Run this first to refresh the cache and check which pods are out of date
pod update
- Update all out of date pods
Thanks @chrisbianca for the quick response,
indeed that was the problem, after running pod update
the build worked.
For reference this was the result of running pod outdated
- Crashlytics 3.8.5 -> 3.9.0 (latest version 3.9.0)
- Fabric 1.6.12 -> 1.7.0 (latest version 1.7.0)
- FBSDKCoreKit 4.25.0 -> 4.27.1 (latest version 4.27.1)
- FBSDKLoginKit 4.25.0 -> 4.27.1 (latest version 4.27.1)
- FBSDKShareKit 4.25.0 -> 4.27.1 (latest version 4.27.1)
- Firebase 4.0.4 -> (unused) (latest version 4.3.0)
- FirebaseAnalytics 4.0.2 -> 4.0.4 (latest version 4.0.4)
- FirebaseAuth 4.0.0 -> 4.2.1 (latest version 4.2.1)
- FirebaseCore 4.0.4 -> 4.0.8 (latest version 4.0.8)
- FirebaseDatabase 4.0.0 -> 4.1.0 (latest version 4.1.0)
- FirebaseInstanceID 2.0.0 -> 2.0.4 (latest version 2.0.4)
- FirebaseMessaging 2.0.0 -> 2.0.4 (latest version 2.0.4)
- FirebaseRemoteConfig 2.0.1 -> 2.0.3 (latest version 2.0.3)
- FirebaseStorage 2.0.0 -> 2.0.2 (latest version 2.0.2)
- GoogleToolboxForMac 2.1.1 -> (unused) (latest version 2.1.3)
- GTMSessionFetcher 1.1.11 -> (unused) (latest version 1.1.12)
- Mixpanel 3.1.9 -> 3.2.2 (latest version 3.2.2)
- Protobuf 3.3.0 -> 3.4.0 (latest version 3.4.0)
pod outdated
then pod update
fixed my problem as well. Funny, this was a brand new Cocoapods install only a couple of days ago - I'm somewhat surprised it didn't pick up the newest versions of pods.
@jwrubel welcome to ios development 🔪
Most helpful comment
@alfonsodev Can you check which versions of the Firebase pods are being installed by looking at the
Podfile.lock
? Generally this happens when it's installing an old (pre 4.0) version of the Pod.You can run:
pod outdated
- Run this first to refresh the cache and check which pods are out of datepod update
- Update all out of date pods