是否可以使 fastlane 匹配默认选择苹果分发证书类型

Dol*_*hin 6 ios fastlane

Apple有不同的证书类型,现在当我构建我的项目时,fastlaneiOS distribution默认选择证书。显示错误:

error: No signing certificate "iOS Distribution" found: No "iOS Distribution" signing certificate matching team ID "***" with a private key was found. (in target 'Runner' from project 'Runner')
Run Code Online (Sandbox Code Playgroud)

我检查我的本地机器证书,发现该证书是最新的Apple Distribution证书。

  • 为什么选择快车道iOS distribution
  • 可以让它Apple Distribution默认选择吗?
  • fastlane如何选择证书?

这是我的本地计算机证书(现在我重复使用该证书来签署应用程序):

在此输入图像描述

这是我的 fastlane 比赛配置:

default_platform(:ios)

platform :ios do
  desc "Description of what the lane does"
  lane :beta do
    xcode_select "/Applications/Xcode_12.4.app"

    create_keychain(
        name: ENV['MATCH_KEYCHAIN_NAME'],
        password: ENV["MATCH_KEYCHAIN_PASSWORD"],
        default_keychain: true,
        unlock: true,
        timeout: 3600,
        lock_when_sleeps: false
    )

    match(
          app_identifier: ENV["APP_IDENTIFIER"],
          git_url: ENV["GIT_URL"],
          type: "adhoc",
          readonly: is_ci,
          keychain_name: ENV['MATCH_KEYCHAIN_NAME'],
          keychain_password: ENV["MATCH_KEYCHAIN_PASSWORD"]
    )

    build_app(
        workspace: "Runner.xcworkspace",
        scheme: "Runner",
        export_method: "ad-hoc"
    )

    pgyer(
        api_key: ENV['PGY_API_KEY'],
        user_key: ENV['PGY_USER_KEY']
    )
    # add actions here: https://docs.fastlane.tools/actions
  end
end
Run Code Online (Sandbox Code Playgroud)

Tho*_*ark -1

fastlane比赛有一个选项generate_apple_certs。默认值true将生成“Apple 分发证书”。将其设置为false将生成“iOS 分发证书”。