我正在开发一个两年前编写的应用程序,所以现在我正试图在Android和iOS上构建代码.当我从iOS文件夹中的vscode执行pod install
,然后我在Xcode中构建iOS代码时,我将面对其中一个Pods项目下的101.
我的努力:
- 已清除 node 模块缓存或将其删除,然后重新安装.
- 我try 删除我的Pods目录,然后运行
pod install
我打开.xcworkspace,就像它在Pod安装时写在日志(log)中一样,我在Xcode上清理项目,然后try 构建,但它不起作用…… - 为所有Pod文件和项目设置相同的iOS构建目标.
以下是我的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 'MyAppName' do
use_modular_headers! // here i have also tried use_frameworks!
pod 'RNPermissions', :path => '../node_modules/react-native-permissions'
permissions_path = '../node_modules/react-native-permissions/ios'
pod 'Permission-Camera', :path => "#{permissions_path}/Camera"
pod 'Permission-LocationAlways', :path => "#{permissions_path}/LocationAlways"
pod 'Permission-LocationWhenInUse', :path => "#{permissions_path}/LocationWhenInUse"
pod 'Permission-Notifications', :path => "#{permissions_path}/Notifications"
pod 'Permission-PhotoLibrary', :path => "#{permissions_path}/PhotoLibrary"
pod 'Permission-Microphone', :path => "#{permissions_path}/Microphone"
# React Native Maps dependencies
# pod 'react-native-google-maps', :path => '../node_modules/react-native-maps'
rn_maps_path = '../node_modules/react-native-maps'
pod 'react-native-google-maps', :path => rn_maps_path
# pod 'GoogleMaps'
# pod 'Google-Maps-iOS-Utils'
#firebase
pod 'Firebase/Core'
pod 'Firebase/Messaging'
use_react_native!(
# :path => config[:reactNativePath],
# to enable hermes on iOS, change `false` to `true` and then install pods
:hermes_enabled => false
)
#pod 'RNFirebase', :path => '../node_modules/react-native-firebase'
#pod 'RNFirebase', :path => '../node_modules/react-native-firebase/ios'
pod 'ReactNativeExceptionHandler', :path => '../node_modules/react-native-exception-handler'
#pod 'react-native-maps', :path => '../node_modules/react-native-maps'
pod 'react-native-maps', path: '../node_modules/react-native-maps'
pod 'react-native-google-maps', path: '../node_modules/react-native-maps'
pod 'GoogleMaps'
pod 'Google-Maps-iOS-Utils'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'RNSVG', :path => '../node_modules/react-native-svg'
target 'MyAppNameTests' do
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.
post_install do |installer|
react_native_post_install(installer)
end
end
Xcode版本:12.0(12A7209),
react :"17.0.1",
REACT-Native:"0.63.4",
如果还需要什么,请让我知道,并帮助我解决这个错误.
UPDATE个
Cannot find protocol declaration for 'RCTInitializing'