【问题标题】:Can fastlane match command potentially revoke certificatesfastlane match 命令是否可以潜在地撤销证书
【发布时间】:2019-02-15 11:01:50
【问题描述】:

fastlane match [environment](不使用 --readonly 标志)是否可以撤销证书,或者仅影响配置文件?我查看了official docs,但我不清楚证书是否受此命令影响。

我不想撤销我们在 Apple 开发者中心中的任何现有证书,因为我们有多个企业应用程序同时使用它们。

【问题讨论】:

    标签: ios fastlane fastlane-match


    【解决方案1】:

    单独运行fastlane match [environment] 命令不会撤销您的任何证书。

    您必须在命令中添加 nuke 才能撤销证书和配置文件。

    以下代码为taken from here

     command "nuke" do |c|
        # We have this empty command here, since otherwise the normal `match` command will be executed
        c.syntax = "fastlane match nuke"
        c.description = "Delete all certificates and provisioning profiles from the Apple Dev Portal"
        c.action do |args, options|
          FastlaneCore::UI.user_error!("Please run `fastlane match nuke [type], allowed values: development, distribution and enterprise. For the 'adhoc' type, please use 'distribution' instead.")
        end
      end
    
      ["development", "distribution", "enterprise"].each do |type|
        command "nuke #{type}" do |c|
          c.syntax = "fastlane match nuke #{type}"
          c.description = "Delete all certificates and provisioning profiles from the Apple Dev Portal of the type #{type}"
    
          FastlaneCore::CommanderGenerator.new.generate(Match::Options.available_options, command: c)
    
          c.action do |args, options|
            params = FastlaneCore::Configuration.create(Match::Options.available_options, options.__hash__)
            params.load_configuration_file("Matchfile")
            Match::Nuke.new.run(params, type: type.to_s)
          end
        end
      end
    

    nuke 参数是您在答案中链接到的页面上的documented here

    您还可以通过其源文件found here 查看nuke 参数的作用。

    【讨论】:

    • 因此使用 match 而不使用 nuke 只会影响配置文件(如果需要,生成新的配置文件)。签名证书将不受影响。这是我所期望的,但只需要确保。谢谢!
    • @oyvindhauge 没问题,这是你不想犯错的事情。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-03-26
    • 2018-01-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-09-25
    相关资源
    最近更新 更多