我有这段代码可以在一台计算机上运行,但是当我将它发送到我的笔记本电脑时,它会中断。我相信这与我正在运行的 firebase 版本有关,但我不确定。这是下面的 pod 文件。
最初(是这样的):
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
platform :ios, '11.0'
target 'rnFirebasePhoneAuth' do
pod 'Firebase/Core', '~> 6.13.0'
pod 'Firebase/Auth', '~> 6.13.0'
pod 'Firebase/Analytics'
config = use_native_modules!
use_react_native!(
:path => config[:reactNativePath],
# to enable hermes on iOS, change `false` to `true` and then install pods
:hermes_enabled => false
)
target 'rnFirebasePhoneAuthTests' do
pod 'Firebase/Core', '~> 6.13.0'
pod 'Firebase/Auth', '~> 6.13.0'
pod 'Firebase/Analytics'
inherit! :complete
# Pods for testing
end
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable the next line.
use_flipper!()
post_install do |installer|
react_native_post_install(installer)
end
end
在运行失败后,我调试了升位并得到了这个:
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
platform :ios, '11.0'
target 'rnFirebasePhoneAuth' do
pod 'Firebase/CoreOnly'
pod 'Firebase/Auth'
pod 'Firebase/Analytics'
config = use_native_modules!
use_react_native!(
:path => config[:reactNativePath],
# to enable hermes on iOS, change `false` to `true` and then install pods
:hermes_enabled => false
)
target 'rnFirebasePhoneAuthTests' do
pod 'Firebase/CoreOnly'
pod 'Firebase/Auth'
pod 'Firebase/Analytics'
inherit! :complete
# Pods for testing
end
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable the next line.
use_flipper!()
post_install do |installer|
react_native_post_install(installer)
end
end
现在我之后
吊舱安装
并运行(在主文件夹中不是 ios)
npx react-native run-ios
我收到以下错误:
CompileC /Users/ronarel/Library/Developer/Xcode/DerivedData/rnFirebasePhoneAuth-gjiffihevtujemfslmcvcpdzuqnc/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNFirebase.build/Objects-normal/x86_64/RNFirebaseAnalytics.o /Users/ronarel/Documents/GitHub/taggoz/rnFirebasePhoneAuth\ (working)/node_modules/react-native-firebase/ios/RNFirebase/analytics/RNFirebaseAnalytics.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
我该如何解决?是否还有更多代码需要提供?提前致谢。我已经为此工作了好几天。