Generating Xcode Build Configuration Files with BuildSettingExtractor (xcodeproj → xcconfig)

The most recent NSScreencast covered using build configuration files to specify build settings in Xcode. (Episode #154)

Using build configuration files—or xcconfig files as they are known—has some definite benefits.  However, as seen in the screencast, the initial process of copying the current build settings out of an Xcode project into xcconfig files is tedious and potentially error-prone.

Screenshot of Build Setting Extractor 1.0

Nuthin’ fancy. Drop an xcodeproj file on it—it spits out xcconfig files.

To aid in that initial extraction process, I wrote a utility app called BuildSettingExtractor.  It is available on github at https://github.com/dempseyatgithub/BuildSettingExtractor.

The app is a simple droplet utility: drop an xcodeproj file on it, choose a destination folder, BuildSettingExtractor will extract the build settings from the project and generate xcconfig files.

A set of files is generated for each target in the project and for the project itself.  Each set of files includes one xcconfig file per build configuration and one xcconfig file of shared settings. For example, a typical Xcode project will generate nine xcconfig files: three sets of files for the app target, test target, and project with three files for Debug, Release and Shared in each set.

I hope you find BuildSettingExtractor useful. Even if you are just curious about project build settings, this is an easy way to inspect a project’s build settings without fear of accidentally changing them.

A little more about xcconfig files

By default, Xcode stores all build configuration settings in the project file itself. However, you can tell Xcode to base a build configuration’s settings on a build configuration file instead.

A build configuration file is a text file of key-value pairs. An xcconfig file can also contain comments and include other xcconfig files.

//
// Project-Debug.xcconfig
//

#include "Project-Shared.xcconfig” // Include other xcconfig files

// An xcconfig file is a text file of key-value pairs.
// Use comments to record why you are using certain build values.
// The /*comment*/ and #comment styles are not valid in an xcconfig file.

COPY_PHASE_STRIP = NO
GCC_DYNAMIC_NO_PIC = NO
GCC_OPTIMIZATION_LEVEL = 0
GCC_PREPROCESSOR_DEFINITIONS = DEBUG=1 $(inherited)
GCC_SYMBOLS_PRIVATE_EXTERN = NO
MTL_ENABLE_DEBUG_INFO = YES
ONLY_ACTIVE_ARCH = YES

There are some benefits to using xcconfig files:

  • Build settings are not in project file—this removes one source of project file merge conflicts
  • Build settings can be documented using comments
  • An xcconfig file of shared settings can be included in each build configuration

There are also potential drawbacks to using xcconfig files.  One potential pitfall is that the build settings for a configuration are based on the xcconfig file—but settings set in Xcode override the xcconfig file settings. This can leave you with unexpected build behavior because an errant build setting set in Xcode is overriding the xcconfig file setting.

This issue is compounded by the fact that when new Xcode versions update project settings, the settings are added to the project, not to an xcconfig file.  So when using xcconfig files, some vigilance is required to keep an eye out for build settings being added to the project.  These stray build settings should be moved from the project to the appropriate xcconfig file.

What Next?

BuildSettingExtractor generates xcconfig files from a project—it does not set your project up to use them.  Here are few resources that walk through that process:

I was inspired to release BuildSettingExtractor by Episode #154 of NSScreencast. The episode is a step by step demo walking through the process.

By the way, if you aren’t familiar with NSScreencast, I recommend taking a look. Ben Scheirman (@subdigital) presents weekly bite-sized screencasts covering a wide range of development topics. Some screencasts are free and some, like Episode #154, require a subscription. (Ben also plays guitar with James Dempsey and the Breakpoints, but that has yet to be the subject of a screencast.)

The blog post Using xcconfig Files For Your Xcode Project by Jont Olof Lyttkens (@jontolof) explains how to set up a project to use xcconfig files in Xcode 6.

Finally, Building the Build System by Rob Napier (@cocoaphony) is an older post, written for an older version of Xcode, but the overall concepts and explanation of the benefits are still relevant.

In each of these walkthroughs, instead making a bunch of xcconfig files by hand and then copying and pasting from the project into the correct file, you would use BuildSettingExtractor instead. •

Lyrical November

The response to Backtrace has been fantastic, and I wanted to thank everyone who has shown their support by purchasing the album and helping to spread the word. You made Backtrace the #1 comedy album on iTunes in the US, UK, and Canada.  You also made it debut at #5 on the Billboard Comedy Album Chart. I cannot thank you all enough!

Since releasing Backtrace last month, I’ve gotten numerous requests for the lyrics to the songs.

For the rest of November, I’ll post lyrics to a song a day (or thereabouts) and we’ll make our way through the album. I’ll be tweeting when each song page goes live as well as some of my favorite lyrics. You can follow me at @jamesdempsey .

Each song page contains its liner notes—lyrics, song notes, and full credits for the very talented people who brought these songs to life. Below are links to the liner notes for each song – each link will go live as Lyrical November progresses.

And of course, If you haven’t checked out Backtrace on iTunes, I invite you to give it a listen.

Modelin’ Man
Almost Dropped My iPhone
Model View Controller
Gonna Needa Pasteboard
The Accessibility Song
The Liki Song (Minawana Meika La’a Likiko)
The Designated Initializer (Got the Better of Me)
The Fetch Spec Song
Goto Fail
Hold Me, Use Me, Release Me
Endian Reservations
I Love View
Anti-Patterns
Model View Controller (Legacy Mix)
Relationships
The Liki Song (Greybeard Mix)

Album Art for James Dempsey and the Breakpoints Album 'Backtrace'

iOS Device Summary: iPad Air 2 and iPad mini 3 Update

It’s been a busy few weeks with Apple announcements and Backtrace, our new album of iOS and Mac development songs, hitting the Billboard charts. I’ve updated my iOS Device Summary to include the recently announced iPads.

Check out the iOS Device Summary page for the rationale behind the summary as well as PDF downloads—including optimized files for printing.

The new iOS devices introduced this fall presented some challenges for the summary chart:

The iPad mini 2 and iPad mini 3 have identical processors and screens. The devices appear on the chart as a single entry, split to reflect the different supported OS versions.

We have not seen a revised iPod touch in two years. With the traditional Apple fall events behind us, it is unlikely we will see a significant update until next fall at the earliest. Since the iPod touch line ends at the A5 chip and the multiple-model iPhones start at the A6 chip, these have been combined into a single row.

Finally, the new A8X chip pushes the number of columns to the limit, so I’ve dropped the ARM chip and the iPhone 3GS and 3rd Generation iPod touch from the chart.

Since the chart is starting to have trouble cleanly representing devices on a single page, I am looking at more dynamic ways of presenting this information in the future.

Until then, I hope you find this version of the summary chart helpful. •

Chart depicting iOS devices by screen size, processor and supported OS version
Check out the iOS Device Summary page to learn more and download printable PDFs of the summary.
And check out Backtrace, the only album of iOS and Mac development tunes ever on the Billboard charts.

Introducing Backtrace

Album Art for James Dempsey and the Breakpoints Album 'Backtrace'

We are beyond thrilled to announce the release of Backtrace,
the debut album from James Dempsey and the Breakpoints.

It feels great for this to be finally out in the world.

We hope you love every track.

And if you do, please don’t keep it to yourself.

We hope you spread the word.

(tweet, facebook, review and blog like the wind!)

Now available for download worldwide via iTunes

Download on iTunes

Breakpoints in Vegas — Album Preview Jam

Last Friday night, just a stone’s throw away from where Frank Sinatra and The Rat Pack performed their legendary shows, James Dempsey and the Breakpoints made their Las Vegas debut. The jam featured songs from the upcoming album Backtrace.

Album Art for James Dempsey and the Breakpoints Album 'Backtrace'Taking the stage for the first time as Conditional Breakpoints were Jean MacDonald (@macgenie) founder at App Camp for Girls, on guitar for Goto Fail; and Matt Smollinger (@mattsmollinger) of Skaffl on backing vocals for The Liki Song.  Josh Smith (@kognate) of AllTrails made a switch from blues xylophone last month to guitar.  Adding to the excitement, Jonathan Penn (@jonathanpenn), recent hire at everyone’s favorite fruit factory, flew in just in time to don his trademark sunglasses, tune up and jam. Finally, Daniel Steinberg (@dimsumthinking) of Dim Sum Thinking delivered his excellent keynote before jumping in on slide-advance keyboard.


Coming this fall

This fall will see the first album release of James Dempsey and the Breakpoints and Breakpoint Jams from coast to coast. Sign up for updates to keep up with the fun!

Get Email Updates

A Brief Visual History of Apple Home Page Tabs

This week brought announcements of new iPhones, Apple Pay, and Apple Watch, as well as the quiet departure of the iPod classic, the last remaining click-wheel product in the iPod lineup.  It also brought something that happens much less often than new product announcements—changes to the look and lineup of tabs at the top of the page at apple.com.

We can see a few different things by looking at how these have changed over the last fourteen years.

Apple Home Page Tab History

Click for the full-sized image

First, we see how the user interface has evolved.  The tabs begin with the natty pinstripes and bubblicious tabs of the original Aqua interface, appearing on the home page immediately after Aqua was introduced in January 2000.  This was the first production use of Aqua elements by Apple—the release of Mac OS X, 10.0 was over a year away.  Through the next fourteen years, we see the designs become simpler as the candy look becomes more subtle before disappearing entirely.  With the removal of dividing lines between items, the original tabs have finally morphed into a simple menu bar.

This week’s update also ended the reign of Lucida Grande as the font of choice—the honor now belongs to the Apple variant of Myriad.

The content of the tabs shows an interesting progression as well.  The Apple logo, Store, and Support tabs are a common thread throughout with Search appearing surprisingly late in the game in 2007.  These unchanging outer items are like bookends around the changing world of Apple over time.

For the first seven years, the inner tabs mainly focused on software (QuickTime, Mac OS X, iTunes) and different incarnations of online services (iReview, iCards, iTools which became .Mac).  The first hardware to appear on a tab was iPod, but it had to share a tab with iTunes for almost seven years before getting a tab of its own.

With the release of the iPhone in 2007, the tabs became more hardware-centric, with Mac and iPhone getting their own tabs.  With the introduction of the iPad in early 2010, the center of the tabs became all hardware lines, with the exception of iTunes (both software and a service).

And, of course, this week Watch joins the lineup. It seems a little odd not to use the full product name Apple Watch or <Apple logo>Watch, especially since Watch is both a noun and a verb.

Although the appearance and focus of the tabs have changed over time, it is interesting to note that almost all tabs name something that has been an enduring part of the Apple ecosystem (the exceptions being iReview, iCards, and the Switch campaign).  Details may have changed—iTools begat .Mac begat MobileMe begat iCloud, Mac OS X is now OS X—but there are some very consistent through lines.  Here’s hoping the Apple Watch is one of those through lines for a long time to come.•

I used the Internet Wayback Machine to help track these changes down. If I’ve missed any changes, please feel free to let me know!

iOS Device Summary: iPhone 6 Update

I’ve updated my iOS Device Summary to include the new iPhone 6 models.

Check out the iOS Device Summary page for the rationale behind the summary as well as PDF downloads—including optimized files for printing.

At $199, the 16 GB 5th generation iPod touch is still the most affordable compact iOS 8 device.  It allows you to test on the slowest processor supported by iOS 8, with a screen resolution shared by the iPhone 5, iPhone 5c, and iPhone 5s. There is, however, no iPod touch that provides a less expensive way of testing the new screen resolutions on a device.

Of the two new iPhone 6 models, the iPhone 6 Plus seems to be the more important device to have on hand for testing, with both a new scale factor and a greater likelihood of providing a modified user interface to take advantage of all that lovely screen real estate. •

Chart depicting iOS devices by screen size, processor and supported OS version

Check out the iOS Device Summary page to learn more and download printable PDFs of the summary.

An Eclectic Breakpoint Jam in Columbus

The 2014 Fall Tour kicked off at CocoaConf Columbus with the most eclectic collection of instruments ever assembled for a Breakpoint Jam.

It was a night for newcomers to the Breakpoint Jam.

Every breakpoint in the house was conditional except for veteran Breakpoint Daniel Steinberg (@dimsumthinking) of Dim Sum Thinking. Daniel, fresh from the latest revision of his new book, A Swift Kickstart, delivered a fantastic keynote before working his slide-advance magic.

Eric Knapp (@ejknapp) of Madison College introduced the crowd to the Chapman Stick playing a solo song before giving familiar James Dempsey and the Breakpoints songs a new twist.

A jar of Breakpoint Jam

Have you tried the Breakpoint Jam?

CocoaConf mainstay Will LaFrance (@wjlafrance) made his debut as a Conditional Breakpoint on classical guitar.

Reprising his initial performance in Washington DC last March, Mark Dalrymple (@borkware) of Big Nerd Ranch showcased his talents on trombone on Modelin’ Man and vocals on The Liki Song.

Josh Smith (@kognate), co-author of the recently-released Build iOS Games with SpriteKit, arrived at the conference in the midst of transporting a xylophone across state lines, giving Josh a chance to join in the jam as well.

Thanks to everyone in Columbus, we had a great time and hope you did as well!

The Fall Tour continues in at CocoaConf Las Vegas in September, where James Dempsey and the Breakpoints will make their Vegas debut! •

Don’t miss any of the fun, sign up to get email updates!

Get Email Updates

iOS Device Summary: iOS 8 Update

I’ve updated my iOS Device Summary for iOS 8 with the info Apple has publicly posted.

Check out the iOS Device Summary page for the rationale behind the summary plus PDF downloads—including optimized files for printing.

A few things to note:
  • The iPhone 4 is the only device that supports iOS 7 that will not support iOS 8
  • At $199, the 16 GB, 5th generation iPod touch is the most affordable compact iOS 8 device
  • At $299, the 16 GB, WiFi iPad mini is the most affordable iOS iPad

Chart depicting iOS devices by screen size, processor and supported OS version

Update 6/26/14: Updated to reflect new price of 16 GB iPod touch.

Check out the iOS Device Summary page to learn more and download PDFs of the summary.

Breakpoints Recap WWDC 2014

There was no WWDC ticket for me this year, but it was still a very enjoyable and busy week for James Dempsey and the Breakpoints. Here are some of the highlights from last week in San Francisco.

(Interested in the soon-to-be-released James Dempsey and the Breakpoints album?
Sign up for email updates so you don’t miss out on the fun!)

NeXTEVNT Cartoon Art Museum Fundraiser

In its third year, this fundraiser celebrates the heritage and history of NeXT, featuring black hardware as well as OPENSTEP and NeXTSTEP running in virtual machines. Even more fascinating is meeting up with folks who lived and breathed this platform from its early days—building apps with the frameworks that would evolve into Cocoa and Cocoa Touch.

As part of the evening’s entertainment, we played a short set of songs in support of the Cartoon Art Museum. If you are a fan of any sort of comics, cartoons, animations and the like, check it out next time you are in San Francisco. If you couldn’t attend the event during WWDC, you can still donate or join as a member.

 

LIVE near WWDC 2014

We had a great time on Wednesday night at 50 Mason Social House. The house was packed as Breakpoints from six different cities in five different time zones across two continents took to the stage to perform a show chock-full of Cocoa-inspired songs.

The evening served up an acoustic guitar sampler with a flight of Breakpoint guitarists—Nathan Eror (@neror) of Martian Craft, Jonathan Penn (@jonathanpenn) of Cocoa Manifest, and Ben Scheirman (@subdigital) of NSScreencast.

The show marked the debut of The Breakpoint Horns with Sam Davies (@iwantmyrealname) of Shinobi Controls on trombone and Daniel Pasco (@dlpasco) of Black Pixel on trumpet playing on Modelin’ Man.

(Any tenor sax players out there for next year? Please let me know.)

The talented Mr. Pasco also played electric guitar on that modern tale of momentary loss and redemption, Almost Dropped My iPhone. Conditional Breakpoint Uli ‘Object Alloc’ Kusterer (@uliwitness) of Elgato joined in with The Liki Song chorus. And of course, slide-advance keyboard legend Victor Alexander (@victoralexander) was on hand to keep that space bar hoppin’.

Thank you to all of the Breakpoints and also a big thanks to: Luke Scholefield (@lukescholefield), Adam Tow (@atow) and Rae and for taking photos and video; Daniel Steinberg () for recording sound off the board; and James White (@thecolourfool) for running the merch table.

(For more fantastic photos of the show—check out Adam Tow’s photo journal.)

Finally, an enormous thanks to everyone who came out to the show — your support is what keeps this going.  We had a great time this year and hope you all did too!

 

A Look Back at Alt Conf

On Friday, I presented A Look Back—the closing session for Alt Conf 2014.  With the surprise announcement of Swift earlier in the week, the talk took a look back to the beginning of the Objective-C era at Apple, tracing how technologies of that time have evolved into the environment we use today.  To accompany this look back, the talk also featured the first public preview of tracks from the soon-to-be-released James Dempsey and the Breakpoints album.

James Dempsey at podium with blurred hands applauding

James wraps up AltConf 2014 with ‘A Look Back’
Photo by Daniel Doubrovkine (@dblockdotorg)

Thank You

The technology announcements of WWDC 2014 will have repercussions for us as iOS and Mac developers for many years to come.

Beyond learning about new technologies, the week gives us a chance to gather together and talk, to share ideas, some laughs and perhaps one too many drinks.

Thank you so very much to everyone who came out to see the talk and performances. Your support and feedback is greatly appreciated and means a lot to me—it was fantastic to meet so many folks this year.

With WWDC 2014 now in the past, it is time to turn my attention to finishing up the album and getting it out into the world.  Someone we are all familiar with said “Real artists ship” and that is my next order of business. •

(Interested in the soon-to-be-released James Dempsey and the Breakpoints album?
Sign up for email updates so you don’t miss out on the fun!)

Get Email Updates Button