ios XCode:我可以删除测试目标吗?

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

XCode: Can I delete test target?

iosxcodexcode4.5

提问by user1486548

What would happen if I delete the test target for my app? Would this affect my other target? How would I go about properly deleting the target?

如果我删除应用程序的测试目标会发生什么?这会影响我的另一个目标吗?我将如何正确删除目标?

回答by Atul Kaushik

Select '.xcodeproj' file from project navigator, then select 'Show project and targets list' icon, select 'target' to delete and then click '-' at bottom

从项目导航器中选择“ .xcodeproj”文件,然后选择“显示项目和目标列表”图标,选择“目标”删除,然后单击底部的“ -

enter image description here

在此处输入图片说明

回答by Mark Szymczyk

If by test target, you mean a unit test target, then deleting the test target would mean you couldn't unit test the code in your project. Deleting the test target wouldn't affect the other targets in your project. But you can take a snapshot of your project before deleting the test target if you want to be safe. Choose File > Create Snapshot to take a snapshot.

如果测试目标是指单元测试目标,那么删除测试目标将意味着您无法对项目中的代码进行单元测试。删除测试目标不会影响项目中的其他目标。但是如果你想安全的话,你可以在删除测试目标之前拍摄你的项目的快照。选择“文件”>“创建快照”以拍摄快照。

To delete a target select your project from the project navigator to open the project editor. Select the target you want to delete from the left side of the project editor and press the Delete key.

要删除目标,请从项目导航器中选择您的项目以打开项目编辑器。从项目编辑器的左侧选择要删除的目标,然后按 Delete 键。