Xcode 5 introduced a host of new features, fixes and performance enhancements but it also makes it possible to simplify your Xcode project and discard some maintenance tasks.
Every Xcode project you’ve worked with is likely to have a Frameworks group at the root of the project. If you’re on OS X it might contain things like Cocoa.framework, Foundation.framework and CoreData.framework, on iOS it holds UIKit.framework and friends. One of the improvements that came with Xcode 5 was LLVM Modules. One of the improvements that modules brings is the ability to automatically link any system frameworks that you
#import. This is awesome, and it’s one less thing you now have to look after.
As long as you’re only keeping system frameworks in that group, you can delete it. Yes, delete the entire “Frameworks” group. Just ensure that you’ve enabled Link Frameworks Automatically in your Xcode project’s settings.
If you’re on iOS, you will need to ensure that “Enable Modules (C and Objective-C)” is also set “Yes” or this tip won’t work. OS X works either way. Thanks to Chris Wood for pointing this out
When you open up your project’s schemes menu, do you see a bunch of schemes from third party projects in there?
To clean them up, go to Product → Scheme → Manage Schemes… and uncheck Show for any that you don’t want to see.
The caveat is that unless you check the “Shared” column, these settings will be reset if your user project settings are ever reset. It’s easy enough to reapply.
Older projects often show schemes for any unit test bundles you have in your project — you don’t actually need to show them at all!
It was necessary under Xcode 4 to have separate schemes for your test targets so that CI servers could find and run them (
xcodebuilddidn’t support the “test” action until Xcode 5).
As long as your test targets specify their Target Dependencies properly, you can just go to Product → Scheme → Manage Schemes… and delete any test schemes that are listed.
Wow, what an improvement. And no loss of functionality!
This is a simple one, but manually ordering your classes and groups is one way to waste a lot of time. Why not just right click on a group/project in the Xcode navigator and select Sort Files By Name?
Hopefully these tips have helped you clean up your Xcode project a little. Hopefully you’ve also removed a few things you don’t really need to see from your line of sight, freeing up a little bit of brain power for something else!