Apple M1芯片 自动打包问题解决方案 Xcode 12 iOS 打包失败

iOS Apple 设备更换为M1芯片后,iOS 项目自动化打包报错

关键词 "Provisioning profile "iOS Team Provisioning Profile" doesn't include the currently selected device "xxx's MacBook Pro"

以下为报错的常见内容,一般是配置文件内不包含打包的 Mac 本机

"Provisioning profile "iOS Team Provisioning Profile" doesn't include the currently selected device "xxx's MacBook Pro" 
"Provisioning profile "iOS Team Provisioning Profile" doesn't include the currently selected device "Mac Mini" 

解决方案

修改 jenkins 脚本 或者 本地打包脚本,在对应的 xcodebuild 命令后添加对应参数

'generic/platform=iOS'

如下所示

xcodebuild archive -workspace $project_name.xcworkspace -scheme $scheme_name -configuration $build_configuration -archivePath $export_archive_path -destination 'generic/platform=iOS'

使用 jenkins 配置参数打包,如下图修改

image.png

完美解决 ~

你可能感兴趣的:(Apple M1芯片 自动打包问题解决方案 Xcode 12 iOS 打包失败)