栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 面试经验 > 面试问答

适用于OS X Gatekeeper的代码签名Java应用

面试问答 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

适用于OS X Gatekeeper的代码签名Java应用

您不能使用

--deep
。这听起来像是正确使用的选项,因为您还需要对嵌入式JRE进行签名,但是它将无法正常工作。从苹果的文档:

重要提示:虽然–deep选项可以应用于签名操作,但不建议这样做。我们建议您在各个阶段内外对代码进行签名(就像Xpre会自动进行签名一样)。使用–
deep签名仅用于紧急维修和临时调整。

经过大量的梳理后,我从各种教程中将它们拼凑在一起。
这是最有帮助的。这是我作为Ant脚本的最终解决方案:

<!-- pre sign --><exec executable="chmod">    <arg line="a+w ${build.dir}/Mac/MyApp.app/Contents/PlugIns/jre"/></exec><apply executable="presign"> <!-- note: this loops through the contents of dir -->    <arg line="-f -s 'Developer ID Application: My Organization'"/>    <fileset dir="${build.dir}/Mac/MyApp.app/Contents/PlugIns/jre" /></apply><exec executable="presign" dir="${build.dir}/Mac">     <arg line="-f -s 'Developer ID Application: My Organization' MyApp.app/Contents/PlugIns/jre"/></exec><exec executable="presign" dir="${build.dir}/Mac">     <arg line="-f -s 'Developer ID Application: My Organization' MyApp.app/Contents/PlugIns/jre/Contents/_CodeSignature/CodeResources"/></exec><!-- also presign anything else in _CodeSignature (see comments) --><exec executable="presign" dir="${build.dir}/Mac">    <arg line="-f -s 'Developer ID Application: My Organization' MyApp.app"/></exec><!-- verify presign --><exec executable="presign" dir="${build.dir}/Mac" failonerror="true">    <arg line="-vv MyApp.app"/></exec><!-- verify gatekeeper --><exec executable="spctl" dir="${build.dir}/Mac" failonerror="true">    <arg line="-vv --assess --type execute MyApp.app"/></exec>

需要注意的另一件事是

zip
在签名后不要使用命令行来打包应用程序,因为这会破坏应用程序的代码签名。您应该使用
productbuild
,PackageMaker
xip
或dmg 将其打包。



转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/414144.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号