命令行安装代码签名证书,.p12文件和mobileprovisions [英] Command line installation of Code Signing certificates, .p12 files, and mobileprovisions

查看:272
本文介绍了命令行安装代码签名证书,.p12文件和mobileprovisions的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一家为多家企业进行第三方iOS开发的公司工作.我的任务是研究一种更好的方法来为这些企业构建和部署代码.基于Apple TOS,他们不能使用使用我们的企业证书签名的应用程序(它们不是内部").该代码需要使用其(我们的客户)企业证书进行签名.这是我见过的一些可能的解决方案-

I work at a company who does 3rd party iOS development for various enterprises. I've been tasked with researching a better way to build and deploy code to these enterprises. Based on the Apple TOS, they cannot use an application signed with our Enterprise certificate (they're not "in house"). The code needs to be signed with their (our clients) Enterprise certificate. Here are a few possible solutions I've seen -

1)将代码发送给客户端,并让客户端进行构建. 这是不行事.

1) Send the code to the client, and have the client build it. This is a no-go.

2)使用应用程序代码创建一个库,并将.so文件和标头发送到客户端以进行构建. 我们目前正以这种方式进行操作,但正在考虑在客户端/我们上简化此操作.

2) Create a library with the application code and send the .so file, and the headers, to the client for building. We're currently doing it this way but are looking at making this easier on the client/us.

3)让客户向我们发送其证书,mobileprovision和.p12文件,然后我们使用其证书来构建应用程序. 这可能有效,但可能会成为管理方面的噩梦.

3) Have the client send us their certificate, mobileprovision, and .p12 file and then we build the application using their certificate. This could work but could become a management nightmare.

我们提出了一个混合了这些想法的想法.这个想法涉及建立一个客户门户,客户可以在该门户中将他们的文件(证书,p12,供应)上传到我们的Mac服务器,然后Mac将自动构建经过适当签名的应用程序.但是,我遇到的问题是,我似乎无法找出如何自动安装证书和规定的方法.

We've come up with an idea that is kind of a mix of these ideas. The idea involves building a customer portal where the client can upload their files (cert, p12, provision) to our Mac server and the Mac will automagically build their application, properly signed. The problem I'm having, however, is I can't seem to find out how to automate the installation of certificates and provisions.

这么说,有人知道从命令行安装CodeSign证书(带有.p12文件)和移动供应文件的方法吗?安装完成后,还有一种方法可以从命令行中删除这些项目?

So with that said, does anyone know of a way to install a CodeSign certificate (with a .p12 file) and a mobile provision file from the command line? Once installed is there also a way to remove the items from the command line?

任何帮助,想法和/或意见将不胜感激.谢谢!

Any help, ideas, and/or input would be greatly appreciated. Thanks!

推荐答案

您应该能够使用security( https://gist.github.com/949831

You should be able to manage those resources in the keychain using the security (http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/security.1.html) command. The script I'm using to control command line builds might be a useful reference: https://gist.github.com/949831

这篇关于命令行安装代码签名证书,.p12文件和mobileprovisions的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆