如何在 Xcode 4.3.1 中删除用户定义的构建设置

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

How to delete user-defined build settings in Xcode 4.3.1

xcodebuild-settings

提问by Pterie Daktyl

I have created several user-defined build settings in Xcode 4.3.1. I no longer need these settings and want to delete them, but there doesn't seem to be a way to delete them!

我在 Xcode 4.3.1 中创建了几个用户定义的构建设置。我不再需要这些设置并想删除它们,但似乎没有办法删除它们!

I am aware that these are stored in the project settings (project.pbxproj) file located within the xcodeproj file. But I don't want to edit these in a text editor as there are all sorts of repetitions and guids which I don't understand.

我知道这些存储在位于 xcodeproj 文件中的项目设置 (project.pbxproj) 文件中。但我不想在文本编辑器中编辑这些,因为有各种我不理解的重复和指导。

Any suggestions on how I can do this within Xcode? (or have they forgotten to add a "delete" button)

关于如何在 Xcode 中执行此操作的任何建议?(或者他们忘记添加“删除”按钮)

回答by Brian D. Calhoun

Just figured this out myself: you need to make sure you're at the right scope to be able to delete the setting. If you defined the setting at the project scope, no amount of key-bashing will remove it if you're looking at the target-scope. Remember, targets inherit settings from project scope. That last bit is what I tripped over :)

我自己只是想通了这一点:您需要确保您处于正确的范围内才能删除设置。如果您在项目范围内定义了设置,那么在查看目标范围时,再多的敲击也不会将其删除。请记住,目标从项目范围继承设置。最后一点是我绊倒的:)

回答by acegs

Try selecting a user-defined setting that you created then hit "Delete" button on your keyboard. That works for me when I encountered the same problem.

尝试选择您创建的用户定义设置,然后点击键盘上的“删除”按钮。当我遇到同样的问题时,这对我有用。

回答by Jay Q.

On Xcode 6:
Select the row and hit Fn+ Delete.

在 Xcode 6 上
选择行并点击Fn+ Delete

回答by user1046037

Follow the steps below:

请按照以下步骤操作:

  1. Select Project
  2. Tap on the Infotab
  3. Select Configurations
  4. Select Configuration to remove
  5. Press the Deletebutton on the keyboard
  1. 选择项目
  2. 点击Info选项卡
  3. 选择 Configurations
  4. 选择配置删除
  5. 按下Delete键盘上的按钮

回答by choofie

Removing User-Defined build settingsdepends on where those settings have been created.

删除用户定义的构建设置取决于创建这些设置的位置。

Lets assume that you've created one already and named it as PROJECT_SETTING. In order to check your PROJECT related User-Defined settings, you have to select your project first on the project and targets list, then you should see something like this:

假设您已经创建了一个并将其命名为PROJECT_SETTING。为了检查您的项目相关的用户定义设置,您必须首先在项目和目标列表中选择您的项目,然后您应该看到如下内容:

enter image description here

在此处输入图片说明

Here you can see only PROJECTrelated settings, and here you have the only ability edit/delete PROJECT_SETTING.

在这里你只能看到PROJECT相关的设置,在这里你只有编辑/删除 PROJECT_SETTING 的能力。

Besides that if you set up a TARGET, so can add new User-Defined settingsthere, that only affects that TARGETscope.

除此之外,如果您设置了TARGET,那么可以在那里添加新的用户定义设置,这只会影响该TARGET范围。

enter image description here

在此处输入图片说明

You can edit/delete TARGET_SETTING_1and TARGET_SETTING_2here, but PROJECT_SETTINGis read-only, as it is inherited from your PROJECT settings.

您可以在此处编辑/删除 TARGET_SETTING_1TARGET_SETTING_2,但 PROJECT_SETTING只读的,因为它是从您的 PROJECT 设置继承的。

Here you will notice that your TARGET contains your PROJECT User-Defined settingsand also your TARGET related User-Defined settingsmarked as bold letters. This helps you to know which setting can be edited on this level.

在这里,您会注意到您的 TARGET 包含您的 PROJECT User-Defined 设置,以及标记为粗体的TARGET 相关User-Defined 设置。这有助于您了解可以在此级别上编辑哪些设置。

You won't be able to delete your settings here if that was created under PROJECT scope, and also editing a PROJECT related User-Defined settingswill result a newly created settings that affects only the selected TARGET.

如果是在 PROJECT 范围下创建的设置,则您将无法在此处删除您的设置,并且编辑与 PROJECT 相关的用户定义设置将导致新创建的设置仅影响选定的 TARGET。

Also if you prefer more visibility on Build Settings, you can select Levelsview instead of Combinedview, so you should see it more separated:

此外,如果您更喜欢Build Settings 的更多可见性,您可以选择Levels视图而不是组合视图,因此您应该看到它更加分离:

enter image description here

在此处输入图片说明

回答by Hamed

Select one of them and press keyboard's delete button.

选择其中之一,然后按键盘的删除按钮。