【问题标题】:React Native - iOS release build failureReact Native - iOS 发布构建失败
【发布时间】:2021-06-13 00:55:33
【问题描述】:

在发布版本中存档失败并出现以下错误,但这不是调试版本的问题

** ARCHIVE FAILED **

The following build commands failed:

    CompileC .../_appcircle_temp/appcircle_export_archive/DerivedData/Build/Intermediates.noindex/ArchiveIntermediates/project/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/Flipper-Folly.build/Objects-normal/armv7/VirtualEventBase.o .../_appcircle_temp/Repository/ios/Pods/Flipper-Folly/folly/io/async/VirtualEventBase.cpp normal armv7 c++ com.apple.compilers.llvm.clang.1_0.compiler

PodFile

use_flipper!({ 'Flipper-Folly' => '2.5.1' })
  pre_install do |installer|
    $RNMBGL.pre_install(installer)
  end
  post_install do |installer|
    $RNMBGL.post_install(installer)
    flipper_post_install(installer)
    fix_deployment_target(installer)
  end
end

def fix_deployment_target(installer)
  return if !installer
  project = installer.pods_project
  project_deployment_target = project.build_configurations.first.build_settings['IPHONEOS_DEPLOYMENT_TARGET']

  puts "Make sure all pods deployment target is #{project_deployment_target.green}"
  project.targets.each do |target|
    puts "  #{target.name}".blue
    target.build_configurations.each do |config|
      old_target = config.build_settings['IPHONEOS_DEPLOYMENT_TARGET']
      new_target = project_deployment_target
      next if old_target == new_target
      puts "    #{config.name}: #{old_target.yellow} -> #{new_target.green}"
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = new_target
    end
  end
end

【问题讨论】:

  • 你试过删除Pods文件夹和Podfile.lock文件,然后运行pod deintegratepod install吗?

标签: react-native react-native-ios archive


【解决方案1】:

如果您在错误消息中收到有关 DerivedData 的信息,最好删除 DerivedData 中专用于您的应用的完整子文件夹。

之后我会在 Xcode 中执行 pod install 和 Clean 并重试构建应用程序。

【讨论】:

    猜你喜欢
    • 2019-06-06
    • 2019-08-16
    • 1970-01-01
    • 1970-01-01
    • 2016-10-27
    • 2017-09-09
    • 2021-12-16
    • 2021-02-04
    • 1970-01-01
    相关资源
    最近更新 更多