is it possible to make fastlane match to choose apple distribution certificate type by default

Viewed 228

Apple have different certificate type, now when I am build my project, the fastlane chooose iOS distribution certificate by default. Shows error:

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')

and I check my local machine certificate and found the certificate was the newest Apple Distribution certificate.

  • Why the fastlane choose iOS distribution?
  • Is it possible to make it choose Apple Distribution by defualt?
  • How the fastlane choose certificate?

this is my local machine certificate(now I am reuse the certificate to sign app):

enter image description here

this is my fastlane match config:

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
0 Answers
Related