React-Native0.63.0以后iOS项目pod install 失败原因

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 代表项目这没啥可说的也就提一嘴

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值