我找到了解决自己问题的方法。添加到“Podfile”这2行:
pod ‘ReactNativeLocalization’,
:path => “../node_modules/react-native-localization”
这是我完整的“PodFile”示例。
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'Transit' do
project 'Transit.xcodeproj'
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
# use_frameworks!
pod ‘Firebase/Core’
pod ‘Firebase/Messaging’
pod ‘ReactNativeLocalization’,
:path => “../node_modules/react-native-localization”
end
$
然后执行命令
pod install
安装必要的组件。