简体   繁体   English

OSX应用程序-添加文件而不损坏证书

[英]OSX app - adding file without damaging certificate

I want to add a file to a signed mac app without damaging its signature. 我想在不损坏文件签名的情况下将文件添加到已签名的Mac应用程序。 How do I do that? 我怎么做?

Basically, I have a signed mac app that can be downloaded from my website. 基本上,我有一个签名的Mac应用程序,可以从我的网站下载。 I want to add a few parameters(in a new file say user_data.txt) to my app which is relevant to the users(like his/her email address) when it is downloaded each time. 我想在我的应用程序中添加一些参数(在新文件中称为user_data.txt),该参数在每次下载时都与用户相关(例如他/她的电子邮件地址)。 How do I do that without damaging the signature? 我该怎么做而不损坏签名?

  1. I included a file, say user_data.txt, in the app before codesign. 我在codesign之前的应用程序中包含了一个名为user_data.txt的文件。 While doing codesign, I used --resource-rules to ignore signing of that particular file. 在进行代码签名时,我使用--resource-rules忽略了该特定文件的签名。 This is an one time task 这是一项一次性的任务
  2. Each time when a user attempts to download this file, I modify the user_data.txt and write the modified app file in the output stream as a zip file. 每次用户尝试下载此文件时,我都会修改user_data.txt并将修改后的应用程序文件作为zip文件写入输出流中。

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

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