How to delete user-defined build settings in Xcode 4.3.1

断了今生、忘了曾经 提交于 2019-12-05 08:46:28

问题


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!

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.

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


回答1:


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 :)




回答2:


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.




回答3:


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




回答4:


Follow the steps below:

  1. Select Project
  2. Tap on the Info tab
  3. Select Configurations
  4. Select Configuration to remove
  5. Press the Delete button on the keyboard



回答5:


Removing User-Defined build settings depends 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:

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

Besides that if you set up a TARGET, so can add new User-Defined settings there, that only affects that TARGET scope.

You can edit/delete TARGET_SETTING_1 and TARGET_SETTING_2 here, but PROJECT_SETTING is read-only, as it is inherited from your PROJECT settings.

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

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 settings will result a newly created settings that affects only the selected TARGET.

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




回答6:


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



来源:https://stackoverflow.com/questions/10170410/how-to-delete-user-defined-build-settings-in-xcode-4-3-1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!