Following the release of iOS 6.1, Apple has updated its Xcode developer toolset as well. The new version, Xcode 4.6, includes improvements in code completion heuristics, new compiler warnings, and other coding improvements.
What's new
- Includes SDKs for OS X 10.8 Mountain Lion and iOS 6.1.
- Code completion heuristics are more accurate, and use an optimized default data set.
- New compiler warnings help identify potential bugs when using ARC and weak references.
- C++11 support for ‘user defined literals’ and ‘unrestricted unions’ features.
- Debugger can inspect elements within NSArray or NSDictionary objects.
- Analyze now performs deeper cross-function static analysis of Objective-C and C++ code.
- The number of indexing passes is reduced due to improved dependency checking.
- Additional bug fixes and stability improvements.
Xcode 4.6 is available as a free download from the Mac App Store. [Direct Link]
Top Rated Comments
This should have been in XCode 3! Been needing this for years and has added hours to my life adding logging statements to see the contents of these.
Being able to inspect dictionaries and arrays using the debugger is functionality that a developer would expect to exist.
Here are the changes from 4.5.2 to 4.6:
$ xcrun clang --version
Apple clang version 4.1 (tags/Apple/clang-421.11.66) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin12.2.0
Thread model: posix
$ xcrun clang --version
Apple LLVM version 4.2 (clang-425.0.24) (based on LLVM 3.2svn)
Target: x86_64-apple-darwin12.2.0
Thread model: posix
$ xcrun git --version
git version 1.7.10.2 (Apple Git-33)
$ xcrun git --version
git version 1.7.12.4 (Apple Git-37)
As for bracket autocompletion, the problem is this:
4 + 3
4 + 3 )
(4 + 3 ) now press space...
( )4 + 3 ) why does XCode insert this bracket?!
I like the bracket autocompletion in general, but this one thing just annoys the hell out of me. There's nothing to complete here, the brackets are already closed.
Press Cmd+F to open a find dialog, type some query that gets lots of results, press Enter to select next result, it works fine, but Shift+Enter has a problem - it goes to previous entry, then to next one, effectively looping in place.
On the other hand, Cmd+G and Cmd+Shift+G work fine without the bug.
WooHoo! 2001 here we come!