I came across an excellent article by Tony Arnold on some useful yet not-so-well-known tips for working with XCode 5, for devs out there. Some of the tips mentioned I found to be quite ingenious and real time-savers, such as Linking Frameworks Automatically, cleaning up the management of your schemes,and general file management organisational tips. |Resource: http://goo.gl/YOd7Qm|
Link Frameworks Automatically
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.
Tidy your schemes
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.
Schemes for unit tests are unnecessary
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 (xcodebuild didn’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!
Sort your classes
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?
Simple is good
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!