Expo SDK 54 환경에서 @react-native-firebase 의존성 추가 후 iOS 빌드 실패 해결

JUNG MINU·2026년 2월 12일
post-thumbnail

Expo 환경에서 @react-native-firebase 의존성 추가 후 알 수 없는 오류로 인한 빌드 실패 해결

환경

Expo SDK 54
@react-native-firebase/app@^23.8.6
@react-native-firebase/messaging@^23.8.6

문제

Expo React Native 프로젝트에서 Android, iOS Platform의 FCM Push Token을 발급받기 위해 @react-native-firebase 라이브러리를 설치한 이후,

app.config.ts

...
plugins: [
    ...
  '@react-native-firebase/app',
  '@react-native-firebase/messaging',
    ...

추가한 이후 eas build로 빌드 시 오류 발생

로컬 expo prebuild 시에는 문제 없이 빌드 됨.

Error Log

Build failed: The "Run fastlane" step failed because of an error in the Xcode build process. We automatically detected following errors in your Xcode build logs:
- include of non-modular header inside framework module 'RNFBApp.RCTConvert_FIRApp': '/Users/expo/workingdir/build/apps/native/ios/Pods/Headers/Public/React-Core/React/RCTConvert.h' [-Werror,-Wnon-modular-include-in-framework-module]
- include of non-modular header inside framework module 'RNFBApp.RCTConvert_FIROptions': '/Users/expo/workingdir/build/apps/native/ios/Pods/Headers/Public/React-Core/React/RCTConvert.h' [-Werror,-Wnon-modular-include-in-framework-module]
- include of non-modular header inside framework module 'RNFBApp.RNFBAppModule': '/Users/expo/workingdir/build/apps/native/ios/Pods/Headers/Public/React-Core/React/RCTBridgeModule.h' [-Werror,-Wnon-modular-include-in-framework-module]
- include of non-modular header inside framework module 'RNFBApp.RNFBRCTEventEmitter': '/Users/expo/workingdir/build/apps/native/ios/Pods/Headers/Public/React-Core/React/RCTEventEmitter.h' [-Werror,-Wnon-modular-include-in-framework-module]
- include of non-modular header inside framework module 'RNFBApp.RNFBSharedUtils': '/Users/expo/workingdir/build/apps/native/ios/Pods/Headers/Public/React-Core/React/RCTBridgeModule.h' [-Werror,-Wnon-modular-include-in-framework-module]
- include of non-modular header inside framework module 'RNFBApp.RNFBUtilsModule': '/Users/expo/workingdir/build/apps/native/ios/Pods/Headers/Public/React-Core/React/RCTBridgeModule.h' [-Werror,-Wnon-modular-include-in-framework-module]

해결

AI는 buildReactNativeFromSource: true 설정이나, 커스텀 플러그인을 생성해서 ['CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES'] = 'YES'를 설정하는 해결방법을 제시하지만 이렇게는 해결되지 않습니다.

이 문제는 Git Issue에서 알려진 이슈입니다.

이슈: Solved! Build error on expo 54 / react native 0.81 (working build demonstrator script linked in comments now) #8657

해결방법: [SDK 54][iOS] Non-modular header errors when using @react-native-firebase/app + auth with useFrameworks: "static" #39607

요약

app.config.tsexpo-build-properties 플러그인 설정에서 사용중인 모든Firebase PodforceStaticLinking 배열에 추가합니다.

plugins: [
  ...
  [
    'expo-build-properties',
    {
      ios: {
        useFrameworks: 'static',
        forceStaticLinking: ['RNFBApp', 'RNFBMessaging', ... ],
      },
      ...
profile
감각있는 프론트엔드 개발자 정민우입니다.

0개의 댓글