Stuntman And Lover Of Cheese

by Dan Bostonweeks

'Base SDK Missing', Hateful Words for Not Much Longer

In a hypothetical future version of developer tools from a well known fruit-based technology company there might never need to be a reason to edit your project or target settings to pick the new SDK that you’ve just installed (for if you don’t you certainly won’t be able to build your project).

In getting ready for that change when it’s potentially released I was experimenting with the settings on the current 4.1 SDK. It turns out that while there’s not a nice GUI selector and the Xcode interface will still complain that the project has the “Base SDK Missing,” you can still compile and your project will pick up the highest numbered SDK available (which may or may not be the way this hypothetical future release will work).

“But Dan, how do you do this today?” you ask? Good question, let me show you.

In your project settings (or target settings, but I’d recommend project-level settings and then let your targets inherit that setting) you goto the selection for Base SDK:


In this case your project was from iOS 4.0 and now you’re running on 4.1. In it’s current state it won’t compile. The simple fix for this is so that you’ll never have to update that setting again is to select the “Other…” option at the bottom:


And when the dialog sheet drops down just remove the SDK version numbers:


When you’re done the Xcode UI will still say the dreaded “Base SDK Missing”:


But running a build will work. The good news is that this works on the xcodebuild command line too. Just pass the -sdk flag “iphoneos” (or “iphonesimulator”) and it will pick up the latest version of the SDK you have installed. Hopefully that hypothetical future version of the tool set will provide better UI support for this, until then have fun not worrying about your Base SDK again.