M1打包 xxxx.xcodeproj: error: Provisioning profile “xxx“ doesn‘t include the currentlyselected device

最近在M1芯片上执行xcodebuild archive命令,提示下面的错误:
/Users/xxxx.xcodeproj: error: Provisioning profile “xxxxx” doesn’t include the currently selected device “xxx的Mac mini” (identifier xxxx-xxxx-xxxx-xxxx). (in target ‘xxxx’ from project ‘xxxx’)。

后面的device是本机M1电脑,理论上构建只给手机安装的ipa,按道理是不应该提示。

解决方法(兼容):
在xcodebuild命令后面增加参数 -destination ‘generic/platform=iOS’

xcodebuild archive -workspace ${WORKSPACE_FILE_NANE} -configuration clean -scheme ${SCHEME_NAME} -archivePath ${ARCHIVE_PATH} -destination ‘generic/platform=iOS’

猜你喜欢

转载自blog.csdn.net/tongwei117/article/details/131823152