{"id":70,"date":"2005-06-10T23:31:00","date_gmt":"2005-06-11T07:31:00","guid":{"rendered":"http:\/\/eschatologist.net\/blog\/?p=70"},"modified":"2009-01-25T21:16:20","modified_gmt":"2009-01-26T05:16:20","slug":"xcode-configurations","status":"publish","type":"post","link":"https:\/\/eschatologist.net\/blog\/?p=70","title":{"rendered":"Xcode: Configurations"},"content":{"rendered":"<p>In case anyone hasn&#8217;t noticed, <a href=\"http:\/\/developer.apple.com\/tools\/xcode\/\">Xcode 2.1<\/a> shipped at <a href=\"http:\/\/developer.apple.com\/wwdc\/\">WWDC<\/a> on Monday.  It includes a whole slew of new features.  First and foremost is, of course, <a href=\"http:\/\/www.apple.com\/pr\/library\/2005\/jun\/06intel.html\">Intel<\/a> support.  Lots of people have said a whole lot about this so I won&#8217;t repeat it here.<\/p>\n<p>The new feature that will have the most significant and immediate impact on developers&#8217; lives is the switch from <strong>build styles<\/strong> to <strong>configurations<\/strong>.<\/p>\n<p>In Xcode 2.0 and earlier, a <strong>build style<\/strong> was a collection of project-level settings that were <em>overlaid<\/em> on the settings for all targets in the project.  For example, if you specified <code>OTHER_CFLAGS=\"-DFOO=1\"<\/code> in a build style and <code>OTHER_CFLAGS=\"-DFOO=0\"<\/code> in a target, the build style would take precedence when it was active and the compiler would be passed <code>\"-DFOO=0\"<\/code>.<\/p>\n<p>This was confusing:  Build styles were edited by inspecting the target, and the <code>OTHER_CFLAGS<\/code> entry in the target settings showed up with a strikethrough when it was overridden in the active build style.  This also caused problems for some developers who didn&#8217;t want settings from build styles overlaid on all targets in a project, and they particularly didn&#8217;t want settings from a build style in a project to override settings in targets in subprojects.<\/p>\n<p>Configurations in Xcode 2.1 are just collections of settings.  Settings in a target configuration override settings in the matching project configuration.  Also, target configurations are by default self-contained, while project configurations default to being empty, which means by default you don&#8217;t have to worry about overriding at all.  What&#8217;s more, configurations are applied <strong>by name<\/strong> when building subprojects \u00e2\u20ac\u201d settings in the project you&#8217;re building don&#8217;t override subproject settings.<\/p>\n<p>Editing build settings in Xcode 2.1 is a lot like editing build settings in Xcode 2.0 and earlier: You just select a target or the project and bring up its inspector, and build settings show up in the Build tab.  You can select a configuration to edit, and you can even edit all configurations at once.  This is very, very useful \u00e2\u20ac\u201d often most of the settings for a target will be identical across Debug and Release configurations.  The ones that aren&#8217;t show up in a mixed state.<\/p>\n<p>(Did you notice I referred to Debug and Release configurations?  That&#8217;s because Development and Deployment have been retired.)<\/p>\n<p>You can even specify that a configuration is based on a text file of key\/value pairs with the &#8220;.xcconfig&#8221; extension.  So if you have collections of settings that you want to standardize on \u00e2\u20ac\u201d for example, a suite of compiler error and warning flags \u00e2\u20ac\u201d you can store them in files and check them into your source code control system separately from any projects.  You can even copy or drag directly from the target\/project inspector in Xcode and paste or drop in an xcconfig file!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In case anyone hasn&#8217;t noticed, Xcode 2.1 shipped at WWDC on Monday. It includes a whole slew of new features. First and foremost is, of course, Intel support. Lots of people have said a whole lot about this so I won&#8217;t repeat it here. The new feature that will have the most significant and immediate&hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[3],"tags":[25,71,24,17],"class_list":["post-70","post","type-post","status-publish","format-standard","hentry","category-technology","tag-apple","tag-configurations","tag-wwdc","tag-xcode"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p74loH-18","_links":{"self":[{"href":"https:\/\/eschatologist.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/70","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eschatologist.net\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eschatologist.net\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eschatologist.net\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/eschatologist.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=70"}],"version-history":[{"count":1,"href":"https:\/\/eschatologist.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/70\/revisions"}],"predecessor-version":[{"id":71,"href":"https:\/\/eschatologist.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/70\/revisions\/71"}],"wp:attachment":[{"href":"https:\/\/eschatologist.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=70"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eschatologist.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=70"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eschatologist.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=70"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}