xcode SDK 'iOS 9.2' 中的产品类型 'Unit Test Bundle' 需要 iOS 代码签名

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/35334617/
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 08:31:31  来源:igfitidea点击:

iOS code signing is required for product type 'Unit Test Bundle' in SDK 'iOS 9.2'

iosxcodecode-signing

提问by Badal Shah

I want to test my application in iPhone 5s. and it have latest ios version. so, I have deleted old Xcode V 7.0.1 and install a new version v 7.2.

我想在 iPhone 5s 中测试我的应用程序。它有最新的ios版本。所以,我删除了旧的 Xcode V 7.0.1 并安装了一个新版本 v 7.2。

After installing v 7.2 I am getting below error.

安装 v 7.2 后,出现以下错误。

CodeSign error: code signing is required for product type 'Unit Test Bundle' in SDK 'iOS 9.2'

CodeSign 错误:SDK“iOS 9.2”中的产品类型“Unit Test Bundle”需要代码签名

I have check this question code-signing-is-required-for-product-type-unit-test-bundle-in-sdk-ios-8-0and try all the answers but still I am getting this problem.

我已经检查了这个问题code-signing-is-required-for-product-type-unit-test-bundle-in-sdk-ios-8-0并尝试了所有的答案,但我仍然遇到这个问题。

I have proper set build target in general as well as info tab. even I am not getting code signin error to fix the issue. but still not able to run application in my testing device.

我一般都有适当的设置构建目标以及信息选项卡。即使我没有收到代码登录错误来解决问题。但仍然无法在我的测试设备中运行应用程序。

enter image description here

在此处输入图片说明

Code signing also set correctly.

代码签名也设置正确。

enter image description here

在此处输入图片说明

Also deleted Test Project from my Application.

还从我的应用程序中删除了测试项目。

回答by Manspof

I found solution for that work for me. in the left panel, go under projectNameTests then in signing choose any development team that has license in ios.

我为我找到了这项工作的解决方案。在左侧面板中,转到 projectNameTests 下,然后在签名中选择任何在 ios 中拥有许可证的开发团队。

回答by No_name_untilRecognised

Actually for every iOS app there will be two targets 1.app target 2.test target. Code signing is required for both targets.In our case,code signing is not set for test target , so click 'app_name'tests under TARGETS sectionand provide same code siging details as given for app target

实际上对于每个 iOS 应用程序都会有两个目标 1.app target 2.test target。两个目标都需要代码签名。在我们的例子中,没有为 test target 设置代码签名,因此单击 TARGETS 部分下的“app_name”tests 并提供与应用目标相同的代码签名详细信息

回答by Edison D'souza

enter image description here

在此处输入图片说明

Change the target on left top to appNameTestsand set signing section accordingly. Now signing error should go.

将左上角的目标更改为 appName Tests并相应地设置签名部分。现在签名错误应该消失。

回答by ZombieMK

For me it was the build device. I had selected my iPhone, when in fact it should have been any simulator. As soon as I changed it to a simulator, the tests ran fine.

对我来说,它是构建设备。我选择了我的 iPhone,而实际上它应该是任何模拟器。我将其更改为模拟器后,测试运行良好。

回答by Nakket

You can simply go to Edit Scheme, then in the Build section, removing any unit test target from being invoked in "Run" and then try again.

您可以简单地转到 Edit Scheme,然后在 Build 部分中,删除在“Run”中调用的任何单元测试目标,然后重试。