简体   繁体   English

如何让 Fastlane Match 在证书存储库中创建和存储 MacOS 应用程序的 mac_installer_distribution 证书?

[英]How do I get Fastlane Match to create & store the mac_installer_distribution certificate for a MacOS app in the certs repo?

I've been using Fastlane to build, test, and distribute iOS apps for a few years now but I'm trying for the first time with a MacOS app.几年来,我一直在使用 Fastlane 构建、测试和分发 iOS 应用程序,但我第一次尝试使用 MacOS 应用程序。

For MacOS Apps , the certificates needed to sign the app for distribution are slightly different.对于 MacOS 应用程序,签署应用程序以进行分发所需的证书略有不同。 Basically each MacOS app need 2 distribution certificates:基本上每个 MacOS 应用程序都需要 2 个分发证书:

  • 1 for signing the app itself 1 用于签署应用程序本身
  • 1 for signing the installer package the app will be bundled in. 1 用于签署安装程序 package 应用程序将被捆绑。

After spending couple of days trying a number of things and looking at every doc and tutorial I can find, I still can't manage to get Fastlane Match to store the app-installer-distribution certificate in the certs repo for me so it can be installed automatically on the CI or when another teammate picks the app repo for example.在花了几天时间尝试了很多事情并查看了我能找到的每一个文档和教程之后,我仍然无法让 Fastlane Match 为我在 certs repo 中存储app-installer-distribution证书,所以它可以是例如,自动安装在 CI 上或当另一个队友选择应用程序存储库时。

Note that after I gave up on Match because none of the "mac_installer_distribution" commands / arguments seemed to work.请注意,在我放弃 Match 之后,因为“mac_installer_distribution”命令 / arguments 似乎都不起作用。 I eventually:我最终:

  • created the “Mac Installer Distribution” Certificate manually on the apple developer portal.在苹果开发者门户上手动创建了“Mac Installer Distribution”证书。
  • installed it manually in my keychain.在我的钥匙串中手动安装它。 And was able to get a successful Mac build of the app.并且能够成功构建应用程序的 Mac 版本。 But that's all done manually on my development build machine.但这一切都是在我的开发构建机器上手动完成的。 I was unable to get Fastlane Match to automatically create this certificate for us or import it to our certs repo.我无法让 Fastlane Match 自动为我们创建此证书或将其导入我们的证书存储库。 So it is not in our Match certificates and provisioning profiles repo which makes it difficult for CI and team work.因此,它不在我们的匹配证书和配置文件存储库中,这使得 CI 和团队工作变得困难。

Anybody know a way to do this?有人知道这样做的方法吗? Is this / should it be a feature request to add this functionality to Fastlane Match?这是/是否应该是将此功能添加到 Fastlane Match 的功能请求?

You can do this by passing additional_cert_types: "mac_installer_distribution" to match .您可以通过将additional_cert_types: "mac_installer_distribution"传递给match来做到这一点。 Eg例如

match(
      type: "appstore",
      additional_cert_types: "mac_installer_distribution"
    )

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM