Фреймворк FirebaseFirestoreInternal не найден после установки @react-native-firebase/firestore?

В настоящее время я разрабатываю проект React Native Firebase и недавно установил @react-native-firebase/firestore. Однако я столкнулся с несколькими ошибками сборки.

в Хкоде:

Framework 'FirebaseFirestoreInternal' not found
Linker command failed with exit code 1 (use -v to see invocation)

в Терминале:

...
warning: Run script build phase '[CP-User] [RN]Check rncore' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'React-Fabric' from project 'Pods')
warning: Run script build phase 'Bundle React Native code and images' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'MyProject' from project 'MyProject')
warning: Run script build phase '[CP-User] [RNFB] Core Configuration' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'MyProject' from project 'MyProject')

--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:iOS Simulator, id:8048419F-71CF-4667-84A5-E9AD68D06A56, OS:17.5, name:iPhone 15 Pro }
{ platform:iOS Simulator, id:8048419F-71CF-4667-84A5-E9AD68D06A56, OS:17.5, name:iPhone 15 Pro }
** BUILD FAILED **


The following build commands failed:
        Ld /Users/alexbalinski/Library/Developer/Xcode/DerivedData/MyProject-fvojrknysdvjhsgiaiyvidihehoq/Build/Products/Debug-iphonesimulator/MyProject.app/MyProject normal (in target 'MyProject' from project 'MyProject')
(1 failure)

Он говорит, что FirebaseFirestoreInternal не существует, хотя он существует.

Подфайл (только часть):

target 'TheLifeyApp' do
  config = use_native_modules!
  $RNFirebaseAsStaticFramework = true

  # Firebase modules
  pod 'Firebase', :modular_headers => true
  pod 'FirebaseCore', :modular_headers => true
  pod 'FirebaseFirestore', :modular_headers => true
  pod 'FirebaseCoreInternal', :modular_headers => true
  pod 'FirebaseCoreExtension', :modular_headers => true
  pod 'GoogleUtilities', :modular_headers => true
  pod 'FirebaseFirestoreInternal', :modular_headers => true

  # ...

Шаги, которые я пробовал:

  • Удаление DerivedData и очистка кеша сборки Xcode

  • Бегу pod update

  • Бегу pod deintegrate && pod install

  • Изменение цели развертывания iOS

  • Удаляю все :modular_headers => true

  • Добавление $(inherited) в пути поиска платформы

К сожалению, ничего не решило проблему. Буду очень признателен за любую помощь.


50
1

Ответ:

Решено

Я исправил ошибку, убедившись, что use_frameworks! :linkage => :static используется, и удалил все :modular_headers => true:

Замените это:

if linkage != nil
    Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
    use_frameworks! :linkage => :static
    $RNFirebaseAsStaticFramework = true
end

С этим

Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
use_frameworks! :linkage => :static
$RNFirebaseAsStaticFramework = true