Firebaseauth/Firebaseauth-swift.h 'Файл, не найденный в проекте Native IOS React с аутентификацией FirebaseIOS

Программируем под IOS
Ответить Пред. темаСлед. тема
Anonymous
 Firebaseauth/Firebaseauth-swift.h 'Файл, не найденный в проекте Native IOS React с аутентификацией Firebase

Сообщение Anonymous »

Я работаю над проектом Native CLI React (iOS) и сталкиваюсь с ошибкой сборки в Xcode: 'Firebaseauth/Firebaseauth-swift.h' Файл не найден. Эта проблема возникает при попытке интегрировать аутентификацию Firebase в мой проект. Ниже приведены подробности моей настройки, кода и шагов, которые я пытался решить проблему. [например, 21.0.0, замените на вашу версию от package.json]
`# @react-cnative-firebase/auth: [например, 21.0.0, замените на вашу версию от Package.json]` `
xcode. /> версия MacOS: [например, Ventura 13.5, замените на вашу версию] /> ios /podfile
ruby ​​< /p>
`require Pod::Executable.execute_command('node', ['-p',
'require.resolve("react-native/scripts/react_native_pods.rb", {paths: [process.argv[1]]})',
__dir__
]).strip

platform :ios, '13.0'
use_modular_headers!

prepare_react_native_project!

rn_maps_path = '../node_modules/react-native-maps'

linkage = ENV['USE_FRAMEWORKS']
if linkage
Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
use_frameworks! :linkage => linkage.to_sym
end

target 'AwesomeProject' do
config = use_native_modules!

use_react_native!(
:path => config[:reactNativePath],
:hermes_enabled => false,
:app_path => "#{Pod::Config.instance.installation_root}/.."
)

pod 'GoogleMaps'
pod 'Google-Maps-iOS-Utils'
pod 'react-native-maps', :path => rn_maps_path

# Firebase dependencies (manually added for clarity)
pod 'Firebase', :modular_headers => true
pod 'FirebaseCore', :modular_headers => true
pod 'FirebaseCoreInternal', :modular_headers => true
pod 'GoogleUtilities', :modular_headers => true
pod 'FirebaseAuth', :modular_headers => true
pod 'FirebaseCoreExtension', :modular_headers => true
pod 'FirebaseAuthInterop', :modular_headers => true

target 'AwesomeProjectTests' do
inherit! :complete
end

post_install do |installer|
react_native_post_install(
installer,
config[:reactNativePath],
:mac_catalyst_enabled => false
)

min_ios_version_supported = '13.0'
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = min_ios_version_supported
end
end
end
end
ios/AwesomeProject/AppDelegate.mm
objc
< /code>
#import "AppDelegate.h"
#import
#import
#import

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[GMSServices provideAPIKey:@"AIzaSyCaCSJ0BZItSyXqBv8vpD1N4WBffJeKhLQ"];
[FIRApp configure];

self.moduleName = @"AwesomeProject";
self.initialProps = @{};

return [super application:application didFinishLaunchingWithOptions:launchOptions];
}

- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
{
return [self bundleURL];
}

- (NSURL *)bundleURL
{
#if DEBUG
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
#else
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
#endif
}

@end
< /code>
Steps Taken to Resolve
I’ve tried the following to fix the error, but the issue persists:
Added use_modular_headers! in the Podfile to support static libraries and avoid conflicts with React Native.
Added Firebase dependencies explicitly in the Podfile with :modular_headers => true.
Ran pod deintegrate, deleted Podfile.lock and Pods/, then ran pod install --repo-update.
Cleaned the Xcode build folder (Cmd + Shift + K) and deleted Derived Data (~/Library/Developer/Xcode/DerivedData).
Ensured GoogleService-Info.plist is added to the Xcode project and included in the target’s "Build Phases > Copy Bundle Resources".
Set Enable Bitcode to NO in Xcode Build Settings.
Added a dummy Swift file and bridging header to enable Swift support:
Created Dummy.swift in the project.
Set Objective-C Bridging Header to AwesomeProject-Bridging-Header.h in Build Settings.
Added #import to AwesomeProject-Bridging-Header.h.
Verified Header Search Paths includes $(inherited) and is not overridden.
Ran npx react-native run-ios and built directly in Xcode.
Error Details
When building in Xcode, I get the following error:
n file included from /path/to/project/ios/AwesomeProject/AppDelegate.mm:3:
/path/to/project/ios/Pods/Headers/Public/Firebase/Firebase.h:40:15: fatal error: 'FirebaseAuth/FirebaseAuth-Swift.h' file not found
#import
Additional Context
The project uses react-native-maps with Google Maps, which is working fine.
I’m initializing Firebase in AppDelegate.mm with [FIRApp configure].
My package.json includes:
json
< /code>
"@react-native-firebase/app": "^21.0.0",
"@react-native-firebase/auth": "^21.0.0",
"react-native-maps": "^1.8.0"
< /code>
I’ve ensured the Firebase iOS SDK requirements are met (Xcode 15.2+, macOS 13.5+).

Подробнее здесь: https://stackoverflow.com/questions/796 ... project-wi
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение

Вернуться в «IOS»