Reputation: 12693
In XCode 4.0.2 there is a good way to configure the program in Build Settings
when you click in "Levels" format. Like this screen
The levels are in this way:
So the XCode see if the Target
have a config, if not see in project
and if not use the iOS default
.
The problem here is that when you set a config in a low level and than delete it, it's impossible use the config of a upper level.
Like in image. I set all targets to use Google
in Current Project Version
, but in this target I want it use stackOverflow
and it work. But in the other Generated Versioning ...
I first config with stackOverflow
but change my mind and want to use the Project Settings
. Now is impossible delete the Target Settings
and I will have to enter it manually.
How can I delete the target setting to use the project setting?
Upvotes: 5
Views: 2748
Reputation: 4263
In xcode 5 it worked right simple for me. I had the same situation as in the picture in the question. Some data in the project setting and an empty but green setting on target level.
You have to select the line e.g. with the mouse that is marked and afterwards press the delete button the green marking is gone from the target level. In my test it and it will never delete the setting on the highes level, so there is no risk.
Upvotes: 2
Reputation: 3378
I just figured this out. It's a little sketchy, but it works, and does not feel dangerous to me (particularly if you're using version control).
YourProjectName.xcodeproj/project.pbxproj
so you can figure out the code-level name of the setting you just changed. For example, in Xcode, I deleted the text from my target-level configuration for "Other C Flags". My diff showed the OTHER_CFLAGS
setting changing from OTHER_CFLAGS="mytargetlevelsetting"
to OTHER_CFLAGS=""
. If you're using version control (which you should be), it'll be easy to get this diff.YourProjectName.xcodeproj/project.pbxproj
in a text editor. Find all the lines starting with the setting name you found in step 2. Delete all the ones where the value is an empty string, and keep all the rest. For example, I deleted all the lines that said OTHER_CFLAGS=""
, but kept all the lines that said OTHER_CFLAGS="settingiwanttokeep"
. If you don't see any where the value is an empty string, or all their values are empty strings, you probably didn't follow step 1.When you reopen Xcode and look at your target's build settings again, the setting in question should be using the project-level configuration, not the target.
Upvotes: 0
Reputation: 20088
Click the Combined button and change the build setting value. Now when you click the Levels button, you will see the target and project both have the new value for the build setting.
Upvotes: 0