React-Native0.63.0以后iOS项目pod install 失败原因
程序员文章站
2023-01-31 12:28:03
ReactNative升级0.63.0后项目变更自从ReactNative升级到0.63.0后,大多数人会遇到iOS项目pod 失败,原因是node_modules内很多依赖变更导致pod install 失败无法pod 依赖文件,而解决办法便是 删除原有podfile,因为ReactNative现在改为动态配置pod重新创建新的podfile添加以下代码就即可require_relative '../node_modules/react-native/scripts/react_native_po...
ReactNative升级0.63.0后项目变更
自从ReactNative升级到0.63.0后,大多数人会遇到iOS项目pod 失败,原因是node_modules内很多依赖变更导致pod install 失败无法pod 依赖文件,而解决办法便是 删除原有podfile,因为ReactNative现在改为动态配置pod
重新创建新的podfile
添加以下代码就即可
require_relative '../node_modules/react-native/scripts/react_native_pods'
config = use_native_modules!
use_react_native!(:path => config["reactNativePath"])
另外0.63.0也放弃了对iOS 9的支持
删除Pods文件夹 及podfile.lock 和.xcworkspace 文件
重新pod install
怎么样有没有很方便
下面贴一下本人项目的podfile文件内代码,望有助
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
require_relative '../node_modules/react-native/scripts/react_native_pods'
platform :ios, '10.0'
target 'XXXX' do
config = use_native_modules!
use_react_native!(:path => config["reactNativePath"])
target 'XXXXTests' 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 these next few lines.
use_flipper!
post_install do |installer|
flipper_post_install(installer)
end
end
target 'XXXX-tvOS' do
# Pods for XXXX-tvOS
target 'XXXX-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end
XXXX 代表项目这没啥可说的也就提一嘴
本文地址:https://blog.csdn.net/github_34203934/article/details/108983598
上一篇: KMP韩国影音播放器使用教程