简体   繁体   English

XCode不接受“ iOS Distribution”代码签名实体设置

[英]XCode doesn't honor the “iOS Distribution” Code Signing Entity setting

I want correctly understand the Code Signing Identity setting: I want to use the automatic setting in Xcode and not specify a specific identity. 我想正确理解“代码签名身份”设置:我想在Xcode中使用自动设置,而不指定特定的身份。 The automatic setting has 2 choices: iOS Developer and iOS Distribution. 自动设置有2个选择:iOS Developer和iOS Distribution。 Based on which one you use, it's supposed to switch to choose a developer or a distribution signing identity from your keychain. 根据您使用的是哪个,应该切换为从钥匙串中选择开发人员或发行签名身份。

I have my build settings configured as follow, in order to use an "iOS Distribution" identity on build: 我将构建设置配置如下,以便在构建中使用“ iOS Distribution”身份:

构建设置

When I Archive my app (the Archive scheme is correctly set to use the Release build configuration), I see that Xcode is not using the correct code signing identity: 当我存档我的应用程序(将存档方案正确设置为使用Release构建配置)时,我看到Xcode没有使用正确的代码签名身份:

构建日志

Anyone would know why this is the case? 有人会知道为什么会这样吗? I'm looking for an explanation and not a workaround solution (I know I can work around the problem by directly setting the Code Signing Identity to my iPhone Distribution: Company Name identity from the keychain) 我正在寻找说明,而不是解决方法(我知道我可以通过直接将代码签名身份设置为我的iPhone发行版来解决此问题钥匙串中的公司名称身份)

Thanks! 谢谢!

So interestingly this doesn't actually matter in the latest Xcode as long as the profile you are eventually going to sign with is for the same bundle identifier as the one its signing with now... 因此有趣的是,只要您最终将要使用的配置文件具有与现在使用其签名的包标识符相同的包标识符,在最新的Xcode中这实际上并不重要...

As long as the team setting is set Xcode is capable of generating the profile you need automatically. 只要设置了团队设置,Xcode就能自动生成您需要的配置文件。 Don't try to fight it. 不要试图与之抗争。

Here is the Team setting from the Target's General settings screen: 这是“目标”的“常规”设置屏幕中的“团队”设置: 团队环境

Then when you archive Xcode puts the archive in the organiser. 然后,当您存档Xcode时,将存档放入组织器中。 When you click distribute on the archive in the organiser window it prompts you to select a new signing identity and actually re-signs the app. 当您在管理器窗口中的存档上单击“分发”时,它会提示您选择一个新的签名身份,并实际上重新签署了该应用程序。

It actually works to sign apps with the team provisioning profiles generated by Xcode. 它实际上可以使用Xcode生成的团队配置文件对应用进行签名。 You also don't need to make an ad-hoc specific provisioning profile as your testers can now install apps signed using the development provisioning profiles with no issues. 您也不需要创建特定的临时配置文件,因为您的测试人员现在可以安装使用开发配置文件签名的应用程序,而不会出现任何问题。 The only time you will need to make your own provisioning profile is if you are using any of the concrete bundle id features like push notifications, game centre, data protection, iCloud, inter-app audio, passbook, keychain access groups or in-app purchase. 唯一需要制作自己的配置文件的时间是,如果您使用任何具体的捆绑包ID功能,例如推送通知,游戏中心,数据保护,iCloud,应用间音频,存折,钥匙串访问组或应用内采购。

If you make your own provisioning profiles for specific bundle ids then Xcode will either automatically select, or have available for selection, the relevant provisioning profile at the point of choosing the identity in the organiser window. 如果您为特定的捆绑包ID设置自己的配置文件,则Xcode会在选择组织者窗口中的身份时自动选择相关的配置文件,或者可供选择。

从管理器窗口中选择一个配置文件

You can refresh Xcode's cache of provisioning profiles from the Accounts pane of Xcode's settings. 您可以从Xcode设置的“帐户”窗格中刷新Xcode的配置文件缓存。 Click on your team, Click "View Details" and then click the tiny refresh button in the bottom left corner 单击您的团队,单击“查看详细信息”,然后单击左下角的小刷新按钮

Xcode首选项的帐户窗格

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

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