xcode 使用其他人的开发者证书签署 iOS 应用程序

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/21558065/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 04:37:20  来源:igfitidea点击:

Signing iOS app with someone else's developer certificate

xcodecertificateprovisioning-profile

提问by Can Poyrazo?lu

I am developing an app with my friend and I need to sign with his identity for testing push notification system. Here is what we did:

我正在和我的朋友一起开发一个应用程序,我需要用他的身份签名来测试推送通知系统。这是我们所做的:

  • I've sent my UDID to him, he added my UDID to his devices
  • He created a new provisioning profile for our bundle ID, including my UDID for use with his developer certificate
  • He sent the provisioning profile to me.
  • I've added provisioning profile to my device and Xcode.
  • He exported his developer certificate (with private key) in Keychain access and sent it to me
  • I've imported his certificate successfully
  • I've selected the provisioning profile that he sent at Xcode
  • 我已将我的 UDID 发送给他,他将我的 UDID 添加到他的设备中
  • 他为我们的 bundle ID 创建了一个新的配置文件,包括我的 UDID 用于他的开发者证书
  • 他向我发送了配置文件。
  • 我已将配置文件添加到我的设备和 Xcode。
  • 他在钥匙串访问中导出了他的开发人员证书(带有私钥)并将其发送给我
  • 我已经成功导入了他的证书
  • 我选择了他在 Xcode 发送的配置文件

I've tried to run the app and it said that no valid signing identities were found for that provisioning profile. Then I've tried to type the p12file into the certificate by clicking Other(Xcode couldn't find any certificate valid for that provisioning profile by itself) but it couldn't sign:

我尝试运行该应用程序,但它说没有找到该配置文件的有效签名身份。然后我尝试p12通过单击将文件输入到证书中Other(Xcode 找不到任何对该配置文件本身有效的证书),但它无法签名:

Code Sign error: No codesigning identities found: No codesigning identities
(i.e. certificate and private key pairs) that match the provisioning profile
specified in your build settings (“tanisalim”) were found.
CodeSign error: code signing is required for product type
 'Application' in SDK 'iOS 7.0'

Here is my project configuration:

这是我的项目配置:

enter image description here

在此处输入图片说明

How can I codesign the app with my friend's certificate?

如何使用我朋友的证书对应用程序进行协同设计?

采纳答案by Rhythmic Fistman

First of all, if you're collaborating during development then your friend should add you to his account as a developer and add your certificate to the development provisioning profile.

首先,如果您在开发期间进行协作,那么您的朋友应该将您添加到他的帐户作为开发人员并将您的证书添加到开发配置文件中。

To do this he needs to invite you to his developer account, then you create your certificate. See Apple's App Distribution Guide

为此,他需要邀请您访问他的开发者帐户,然后您创建证书。请参阅 Apple 的应用程序分发指南

However, if you just want to use his identity, I would instead open his p12 file which will import it into your keychain. I don't think typing the path p12 into the Code Signing Identity works.

但是,如果您只想使用他的身份,我会打开他的 p12 文件,将其导入您的钥匙串。我不认为在代码签名标识中输入路径 p12 有效。

Make sure you've got the WWDR certificate installed, check the app bundleID matches that of the the provisioning profile, restart Xcode for good measure and thenyou shouldbe able to select his code signing identity and sign your app.

确保您已经安装WWDR 证书,检查应用程序 bundleID 与配置文件的匹配,重新启动 Xcode 以获得良好的测量,然后应该能够选择他的代码签名身份并签署您的应用程序。