React-native-firebase: [iOS] [Auth] version v3.0.3 fails to build with RNFirebaseAuth

Created on 16 Oct 2017  ·  4Comments  ·  Source: invertase/react-native-firebase

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) {
~~~~~~~~~~~~~~ ^~~~~~~~~~~~~

Environment

  1. Application Target Platform: iOS
  2. Development Operating System: macOS Sierra 10.12.5 (16F73)
  3. Build Tools: XCode 8.3.3
  4. React Native version: 0.49.3
  5. RNFirebase Version: 3.0.3
  6. Firebase Module: Auth
  7. Pod version: 1.3.1
  8. Podfile: https://gist.github.com/alfonsodev/4ad4798cc5305afdaa18dd4e2287beba

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 date
pod update - Update all out of date pods

All 4 comments

@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 🔪

Was this page helpful?
0 / 5 - 0 ratings