“Provisioning profile “iOS Team Provisioning Profile“ doesn‘t include the currently selected device

mac m1芯片

1、网络上通用的解决方法无效,无效方法举例如下解决方案

在脚本文件中,在xcodebuild的命令后追加相应参数为: -destination 'generic/platform=iOS'

添加前:
xcodebuild archive -workspace ${WORKSPACE_NAME}.xcworkspace -scheme ${SCHEME_NAME} -configuration ${BUILD_CONFIGURATION} -archivePath ${EXPORT_ARCHIVE_PATH}

添加后:
xcodebuild archive -workspace ${WORKSPACE_NAME}.xcworkspace -scheme ${SCHEME_NAME} -configuration ${BUILD_CONFIGURATION} -archivePath ${EXPORT_ARCHIVE_PATH} -destination 'generic/platform=iOS'

2、经过检查后发现,脚本打包出错,是在于证书配置(或者说工程读取证书时出错或没正确读取),表现如下。

“Provisioning profile “iOS Team Provisioning Profile“ doesn‘t include the currently selected device_第1张图片

个人情况是,认真核对证书所有配置后发现证书配置都是正确的,但是Xcode始终无法识别。

此次解决方法:

偶然在自动配置证书和手动配置证书来回切换了一下,然后Xcode证书读取回复正常。个人猜测是工程的一些缓存问题,希望对遇到此类情况的朋友有所启发。

“Provisioning profile “iOS Team Provisioning Profile“ doesn‘t include the currently selected device_第2张图片

你可能感兴趣的:(iOS打包ipa,ios,xcode)