自动化打包之fastlane--(9) 常见错误

自动化打包之fastlane–(1) 研究之必须提前了解的几点

自动化打包之fastlane–(2) fastlane init图文教程

自动化打包之fastlane–(3) 安装fir插件图文教程

自动化打包之fastlane–(4) 安装其他插件

自动化打包之fastlane–(5) 自动打包到蒲公英

自动化打包之fastlane–(6) ruby使用小结

自动化打包之fastlane–(7) 常用actons操作

自动化打包之fastlane–(8) 代码签名和项目配置

自动化打包之fastlane–(9) 常见错误

1. Xcode 的错误 - 最常见

Code Sign error: No matching provisioning profiles found: No provisioning profiles with a valid signing identity (i.e. certificate and private key pair) matching the bundle identifier "X" were found.

打包操作的电脑上没有和当前项目appbundle identifier对应的provisioning profiles,确保当前的配置文件类型是和苹果开发者中心中类型(App Store, Development or Ad Hoc)是匹配的,如果不匹配,重新从开发者中心下载设置

No matching codesigning identity found: No codesigning identities (i.e. certificate and private key pairs) matching "iPhone Distribution: X" were found

有可能配置文件provisioning profile没问题,但是电脑本地私钥private key或者证书certificate出了问题,可以从团队的其他电脑拷贝一份过来,或者你之前保存的拷贝过来安装设置下

Error Domain=IDEDistributionErrorDomain Code=1 "The operation couldn’t be completed. (IDEDistributionErrorDomain error 1.)"

这种错误的原因有很多,不太好排查

  • 查看您的钥匙串是否有效,WWDR证书没有过期
  • 验证钥匙串中的证书certificate和配置文件provisioning profile和苹果开发者中心的证书certificate和配置文件provisioning profile是否一致,是否有效,有可能开发者中心中的相关的证书和配置文件失效了
Provisioning profile does not match bundle identifier: The provisioning profile specified in your build settings ("X") has an AppID of "Y" which does not match your bundle identifier "Z"

当前项目APP使用的Provisioning profile和当前APP的bundle identifier不匹配

Your build settings specify a provisioning profile with the UUID "X", however, no such provisioning profile was found.

使用的电脑中没有设置的provisioning profile文件,需要从开发者中心重新生成

CodeSign Error: code signing is required for product type 'Application'...

常见于手动管理代码签名的,需要自己排查手动代码签名是否出了问题

2. fastlane 错误

User interaction is not allowed. Command /usr/bin/codesign failed with exit code 1

确保密码可以访问您的签名私钥。打开钥匙串访问。选择您的签名私钥,右键单击,选择获取信息,切换到访问控制选项卡并选择“允许所有应用程序访问此项目”。

Could not find a matching code signing identity for type 'X'

Apple Developer Portal上没有可用的证书。这可能意味着某人吊销了证书,或者您无权访问它。

3. The archive built successfully, but the export step failed

通常情况下,配置了正确的provisioning profile并且archive页成功了.可以试试检查构建的.xcarchive包来验证xxxxxxx.mobileprovision文件是否真的匹配。

也可以检查Fastfile文件的export_method中设置的是不是对应类型的provisioning profile(默认是development类型的配置文件)

4. 其他gems依赖的错误

查看对应的gem是否安装,及安装的版本是否正确

CFPropertyList
sqlite3
digest

5 . 检查fastlane失败时生成的log日志

sudo find /private/var -name "*.xcdistributionlogs"

6. 其他问题

  • 在生成exportPlist中export_method使用错误或其他错误(例如 - 想做enterprise类型,实际构建的是app store类型)
  • 根苹果WWDR证书已过期; 检查钥匙串过期的证书
  • 环境变量没有被忽略.
  • gym命令中包括bitcode有时会导致(include_bitcode: false可以使用),并检查所有框架是否符合您的bitcode要求
  • Provisioning profiles不匹配.entitlements文件上的功能和测试报告
  • 没有CFPropertyList(等)

猜你喜欢

转载自blog.csdn.net/kuangdacaikuang/article/details/80463858
今日推荐