fastlane 自动打包遇到的问题

昨天尝试用fastlane导出一个 ad-hoc 类型的 ipa.

第一种错误提示:

Could not find a matching code signing identity for type 'AdHoc'. It is recommended to use match to manage code signing for you, more information on https://codesigning.guide.If you don't want to do so, you can also use cert to generate a new one: https://fastlane.tools/cert

当时lane的内容

lane: beta do
  match
   gym
      (scheme: "秀加加",
        clean: true,
        export_method: "ad-hoc",
        output_name: "showjiajia.ipa",
        output_directory: "./build"
        ) 
end

错误原因: 没有理解match的真正用法,match是用来同步git repo 里的签名和证书文件.证书没有放在远程仓库不能用match.

第二次提示失败,如下

Error Domain=IDEDistributionErrorDomain Code=3 "(null)" UserInfo={IDEDistributionErrorSigningIdentityToItemToUnderlyingErrorKey={ xxxx

当时的lane 写法

  lane: beta do
    cert
    sigh
     gym
      (scheme: "秀加加",
        clean: true,
        export_method: "ad-hoc",
        output_name: "showjiajia.ipa",
        output_directory: "./build"
        ) 
  end

查阅资料分析:
fastlane 依次查看cert,sigh,gym 每个action 的用法,发现sigh 默认不是导出ad-hoc的包,而gym却指定了ad-hoc的包,sigh用dis 的 provising profile签名了.导包时却需要ad-hoc的provising profile,就产生了如上的错误提示;

知道了错误原因,解决就很简单
将sigh 改为 sigh(ad-hoc: true)

再次打包,成功


fastlane 自动打包遇到的问题_第1张图片
成功提示.png

你可能感兴趣的:(fastlane 自动打包遇到的问题)