Can’t build ios version of my app, due to error raising by firebase-iid dependency of expo-notification

Hi! I use managed workflow and I encounter a problem when building for ios (no problem for android).

eas-cli version: eas-cli/0.54.1 darwin-x64 node-v16.15.0

Error log:


❌  (node_modules/@react-native-firebase/iid/ios/RNFBIid/RNFBIidModule.m:43:7)

  41 |         rejecter:
  42 |         (RCTPromiseRejectBlock) reject) {
> 43 |     [[FIRInstanceID instanceID] getIDWithHandler:^(NSString *_Nullable identity, NSError *_Nullable error) {
     |       ^ use of undeclared identifier 'FIRInstanceID'
  44 |       if (error) {
  45 |         [self rejectErrorWithCode:error reject:reject];
  46 |       } else {


❌  (node_modules/@react-native-firebase/iid/ios/RNFBIid/RNFBIidModule.m:68:7)

  66 |     }
  67 | #endif
> 68 |     [[FIRInstanceID instanceID] tokenWithAuthorizedEntity:authorizedEntity scope:scope options:options handler:^(NSString *_Nullable identity, NSError *_Nullable error) {
     |       ^ use of undeclared identifier 'FIRInstanceID'
  69 |       if (error) {
  70 |         [self rejectErrorWithCode:error reject:reject];
  71 |       } else {


❌  (node_modules/@react-native-firebase/iid/ios/RNFBIid/RNFBIidModule.m:83:7)

  81 |         rejecter:
  82 |         (RCTPromiseRejectBlock) reject) {
> 83 |     [[FIRInstanceID instanceID] deleteIDWithHandler:^(NSError *_Nullable error) {
     |       ^ use of undeclared identifier 'FIRInstanceID'
  84 |       if (error) {
  85 |         [self rejectErrorWithCode:error reject:reject];
  86 |       } else {


❌  (node_modules/@react-native-firebase/iid/ios/RNFBIid/RNFBIidModule.m:102:7)

  100 |         rejecter:
  101 |         (RCTPromiseRejectBlock) reject) {
> 102 |     [[FIRInstanceID instanceID] deleteTokenWithAuthorizedEntity:authorizedEntity scope:scope handler:^(NSError *_Nullable error) {
      |       ^ use of undeclared identifier 'FIRInstanceID'
  103 |       if (error) {
  104 |         [self rejectErrorWithCode:error reject:reject];
  105 |       } else {


❌  (node_modules/@react-native-firebase/iid/ios/RNFBIid/RNFBIidModule.m:121:12)

  119 |     NSString *code = @"iid/unknown";
  120 |     switch (error.code) {
> 121 |       case FIRInstanceIDErrorAuthentication:
      |            ^ use of undeclared identifier 'FIRInstanceIDErrorAuthentication'
  122 |         code = @"iid/failed-gcm-auth";
  123 |         break;
  124 |       case FIRInstanceIDErrorNoAccess:


❌  (node_modules/@react-native-firebase/iid/ios/RNFBIid/RNFBIidModule.m:127:12)

  125 |         code = @"iid/no-access";
  126 |         break;
> 127 |       case FIRInstanceIDErrorTimeout:
      |            ^ use of undeclared identifier 'FIRInstanceIDErrorTimeout'
  128 |         code = @"iid/timeout";
  129 |         break;
  130 |       case FIRInstanceIDErrorNetwork:


❌  (node_modules/@react-native-firebase/iid/ios/RNFBIid/RNFBIidModule.m:130:12)

  128 |         code = @"iid/timeout";
  129 |         break;
> 130 |       case FIRInstanceIDErrorNetwork:
      |            ^ use of undeclared identifier 'FIRInstanceIDErrorNetwork'
  131 |         code = @"iid/no-network";
  132 |         break;
  133 |       case FIRInstanceIDErrorOperationInProgress:


❌  (node_modules/@react-native-firebase/iid/ios/RNFBIid/RNFBIidModule.m:133:12)

  131 |         code = @"iid/no-network";
  132 |         break;
> 133 |       case FIRInstanceIDErrorOperationInProgress:
      |            ^ use of undeclared identifier 'FIRInstanceIDErrorOperationInProgress'
  134 |         code = @"iid/operation-in-progress";
  135 |         break;
  136 |       case FIRInstanceIDErrorInvalidRequest:


❌  (node_modules/@react-native-firebase/iid/ios/RNFBIid/RNFBIidModule.m:136:12)

  134 |         code = @"iid/operation-in-progress";
  135 |         break;
> 136 |       case FIRInstanceIDErrorInvalidRequest:
      |            ^ use of undeclared identifier 'FIRInstanceIDErrorInvalidRequest'
  137 |         code = @"iid/invalid-request";
  138 |         break;
  139 |       default:

› Compiling @react-native-firebase/iid Pods/RNFBIid » RNFBIid-dummy.m

› Compiling @react-native-firebase/auth Pods/RNFBAuth » RNFBAuthModule.m

› Compiling @react-native-firebase/auth Pods/RNFBAuth » RNFBAuth-dummy.m

› Compiling @react-native-firebase/app Pods/RNFBApp » RNFBVersion.m

▸ ** BUILD FAILED **

▸ The following build commands failed:

▸ 	CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler (in target 'FBSDKCoreKit' from project 'Pods')

▸ 	CompileC /Users/expo/workingdir/build/ios/build/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNFBIid.build/Objects-normal/x86_64/RNFBIidModule.o /Users/expo/workingdir/build/node_modules/@react-native-firebase/iid/ios/RNFBIid/RNFBIidModule.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'RNFBIid' from project 'Pods')

▸ (2 failures)

** BUILD FAILED **

The following build commands failed:

	CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler (in target 'FBSDKCoreKit' from project 'Pods')

	CompileC /Users/expo/workingdir/build/ios/build/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNFBIid.build/Objects-normal/x86_64/RNFBIidModule.o /Users/expo/workingdir/build/node_modules/@react-native-firebase/iid/ios/RNFBIid/RNFBIidModule.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'RNFBIid' from project 'Pods')

(2 failures)

Exit status: 65

+-------------+-------------------------+

|           Build environment           |

+-------------+-------------------------+

| xcode_path  | /Applications/Xcode.app |

| gym_version | 2.185.1                 |

| sdk         | iPhoneOS15.0.sdk        |

+-------------+-------------------------+

Looks like fastlane ran into a build/archive error with your project

It's hard to tell what's causing the error, so we wrote some guides on how

to troubleshoot build and signing issues: https://docs.fastlane.tools/codesigning/getting-started/

Before submitting an issue on GitHub, please follow the guide above and make

sure your project is set up correctly.

fastlane uses `xcodebuild` commands to generate your binary, you can see the

the full commands printed out in yellow in the above log.

Make sure to inspect the output above, as usually you'll find more error information there

[stderr] [!] Error building the application - see the log above

Error: Fastlane build failed with unknown error. Please refer to the "Run fastlane" and "Xcode Logs" phases.
Fastlane errors in most cases are not printed at the end of the output, so you may not find any useful information in the last lines of output when looking for an error message.

Thx for your suggestions

I don’t really see the solution you propose. Also why expo-notification has a dependency on an obsolete package? I tried to replace it with firebase-messaging-app but it doesn’t work

+1 - can’t get it to work. I thought upgrading to expo-notifications@0.17.0 would help, but it did not.