Xcodebuild构建归档失败,错误信息为“PhaseScriptExecution Jenkins”。

4

我正在尝试从Jenkins创建iOS存档。在构建PC上,构建命令可以正常工作,但是当我从Jenkins运行相同的命令时,出现了这个问题。这是一个React Native项目。

命令:

sh 'xcrun xcodebuild archive -workspace AppName.xcworkspace -scheme Test -sdk iphoneos -configuration release -allowProvisioningUpdates -destination "generic/platform=iOS" arch=x86_64  -archivePath "/Users/ali/Desktop/Test_bulds"'

错误:

    /Users/ali/jenkins/workspace/Mobile/MobileAppBuild/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.2.99. (in target 'react-native-blur' from project 'Pods')
** ARCHIVE FAILED **


The following build commands failed:
    PhaseScriptExecution [CP]\ Embed\ Pods\ Frameworks /Users/ali/Library/Developer/Xcode/DerivedData/Appname-hamnkyelypjutaefdzwfxmvlwith/Build/Intermediates.noindex/ArchiveIntermediates/Test/IntermediateBuildFilesPath/Appname.build/Release-iphoneos/Appname.build/Script-CF1348D5D60844C3DD63C481.sh (in target 'AppName' from project 'AppNAme')

Jenkins Mac 可能缺失或配置错误了某些命令行工具。请检查详细日志,即 Logs/Build 中的 xcactivitylog 文件,将其重命名为 .gzip 并解压缩。同时也可以在 https://dev59.com/2FEG5IYBdhLWcg3wZcdh 进行查看。 - Christos Koninis
1个回答

0

在你的 podfile 中,你大多需要将这一行改成一个更高的版本:

#Change this to something like '12'
platform :ios, '12'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
  'Debug' => :debug,
  'Profile' => :release,
  'Release' => :release,
}

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接