Productsigned Mac应用程序不安装在非我的计算机上

 我恨数学忆万年丶 发布于 2023-01-31 22:38

我有一个Mac应用程序,我使用终端的'productsign'命令签名

productsign --sign "3rd Party Mac Developer Installer: My company (dasdfjkaj)" InstallerUnsigned.pkg InstallerSigned.pkg

productsign: signing product with identity "3rd Party Mac Developer Installer: My company (dasdfjkaj)" from keychain /Users/me/Library/Keychains/login.keychain
productsign: adding intermediate certificate "Apple Worldwide Developer Relations Certification Authority"
productsign: Wrote signed product archive to InstallerSigned.pkg

然后我运行了评估命令

spctl -a -v --type install  InstallerSigned.pkg
InstallerSigned.pkg: accepted

我还检查了签名

pkgutil --check-signature InstallerSigned.pkg 
Package "InstallerSigned.pkg":
Status: signed by a developer certificate issued by Apple
   Certificate Chain:
    1. 3rd Party Mac Developer Installer: My company (dasdfjkaj)
    2. Apple Worldwide Developer Relations Certification Authority
    3. Apple Root CA

当我从我的机器运行安装程序(将Gatekeeper设置为"Mac App store并确定开发人员")时,它运行正常.在我将其部署到我的网站后下载相同的pkg时,它也正确安装.

但是......当我在另一台机器上下载pkg时,它无法安装.它无法识别我的开发者ID.当我在失败的机器上运行spctl命令时,我得到了

spctl -a -v --type install  InstallerSigned.pkg
InstallerSigned.pkg: rejected

有谁知道为什么它在我自己的机器上运行良好但在pkg在另一台机器上运行时失败?我真是出于想法:/

编辑:这是我得到的

spctl --list --type execute
3[Apple System] P0 allow execute
    anchor apple
4[Mac App Store] P0 allow execute
    anchor apple generic and certificate leaf[field.] exists
5[Developer ID] P0 allow execute
    anchor apple generic and certificate 1[field.] exists and certificate leaf[field.] exists
7[GKE] P0 allow execute [(gke)]
    cdhash H""
10[GKE] P0 allow execute [(gke)]
    cdhash H""
14[GKE] P0 allow execute [(gke)]
    cdhash H""
15[GKE] P0 allow execute [(gke)]
    cdhash H""
18[GKE] P0 allow execute [(gke)]

l'L'l.. 5

证书很重要

这些是您需要一起使用以进行代码签名的证书:

开发者ID安装程序

开发者ID申请

第三方Mac Developer Installer(通常仅用于AppStore应用程序).

如果没有提交到AppStore,您将使用" 开发人员ID安装程序 "证书.对于具体的代码签名部分,您需要使用" 开发者ID应用程序 "证书.

Apple Developer Codeigning工作流程指南

1 个回答
  • 证书很重要

    这些是您需要一起使用以进行代码签名的证书:

    开发者ID安装程序

    开发者ID申请

    第三方Mac Developer Installer(通常仅用于AppStore应用程序).

    如果没有提交到AppStore,您将使用" 开发人员ID安装程序 "证书.对于具体的代码签名部分,您需要使用" 开发者ID应用程序 "证书.

    Apple Developer Codeigning工作流程指南

    2023-01-31 23:06 回答
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有