Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

MacRumors

macrumors bot
Original poster
Apr 12, 2001
59,210
23,130



xcode4.6.jpg
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]

Article Link: Xcode Developer Toolset Updated to Version 4.6
 

khirok

macrumors newbie
Jul 10, 2009
21
0
About Time

- Debugger can inspect elements within NSArray or NSDictionary objects.

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.
 

valexa

macrumors member
Nov 3, 2007
53
0
is it just me or is the update really 1.3 GB, pretty much as big as the full 1.5 GB Xcode in the store.
 

ArtOfWarfare

macrumors G3
Nov 26, 2007
9,436
5,793
Great news, all around.

Has Clang been updated? I was finding quirks with it refusing to compile some C++ code a week or two ago... I'm wondering if that code will still not compile.
 

MrCubes

macrumors regular
Dec 21, 2008
159
125
United Kingdom
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.

I'm hoping this is the start of a much-needed and long overdue ramp up of the debugger support. For me, at least, it's the weakest part of the XCode experience by far.

I'm giving them a pass for getting things on track with lldb and see this latest change as a step in the right direction. I'm hoping they'll run with it from here the way they have with the static analysis etc.
 

mdriftmeyer

macrumors 68040
Feb 2, 2004
3,550
1,309
Pacific Northwest
LLVM/Clang 3.3 will be a big update to LLDB, C11, C++11, ObjC [ARC and more] OpenCL, OpenGL and a complete advancement in design modularity.

Both NVPTX [Nvidia] and R600 [AMD GPGPUs] targets and lots of OpenCL work. Not to mention OpenMP support and ARM64 amongst other target additions.
 

yehudah72

macrumors regular
May 4, 2008
208
0
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.



Hey Bro, I understand your frustration, but Apple does have other tasks on hand... give 'em some luv!!!






Love & Peace,
yehudah
 

Stella

macrumors G3
Apr 21, 2003
8,819
6,214
Canada
Hey Bro, I understand your frustration, but Apple does have other tasks on hand... give 'em some luv!!!






Love & Peace,
yehudah

Being able to inspect dictionaries and arrays using the debugger is functionality that a developer would expect to exist.
 

Mr. Retrofire

macrumors 603
Mar 2, 2010
5,050
494
www.emiliana.cl/en
Great news, all around.

Has Clang been updated? I was finding quirks with it refusing to compile some C++ code a week or two ago... I'm wondering if that code will still not compile.
It is usually not the compiler. Your project is probably an old GCC project, which has visible or invisible settings, which are incompatible with other compilers, such as Clang.
 

Saladinos

macrumors 68000
Feb 26, 2008
1,845
2
Hopefully bracket autocomplete is fixed.

Why does it insist on inserting a ')' after every '(', even if there's an unclosed ')' already? God that drives me nuts!
 

Saladinos

macrumors 68000
Feb 26, 2008
1,845
2
Bracket completion hasn't been fixed. Also the dictionary inspector doesn't support CFDictionaryRef or CFMutableDictionaryRef objects :sigh:

You can work around it by telling it to display as an NSDictionary, but that's not really a solution.
 

shurcooL

macrumors 6502a
Jan 24, 2011
934
104
Awesome news, the latest Xcode is quite good. And clang has the best C++11 support to date, much better than MSVC 2012.

Here are the changes from 4.5.2 to 4.6:

Code:
$ 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

Code:
$ xcrun git --version
git version 1.7.10.2 (Apple Git-33)
$ xcrun git --version
git version 1.7.12.4 (Apple Git-37)
 
Last edited:

ChristianVirtual

macrumors 601
May 10, 2010
4,120
282
日本
I didn't touched XCode recently too much. Anyone has a hint for me if the wireless deployment meanwhile is back ? I found the idea of XCode 4.2 to wireless manage devices nice; less dealing with cables. It got removed in 4.3 but never showed up again. Was there any statement from Apple ? Just curious ...
 

ConCat

macrumors 6502a
Bracket completion hasn't been fixed. Also the dictionary inspector doesn't support CFDictionaryRef or CFMutableDictionaryRef objects :sigh:

You can work around it by telling it to display as an NSDictionary, but that's not really a solution.

Apple generally prefers you work with Objective-C style objects. Core Foundation is just there to enhance C compatibility... They haven't even given Core Foundation ARC yet. It's a bit of a second-class citizen in general.
 

D.T.

macrumors G4
Sep 15, 2011
11,050
12,455
Vilano Beach, FL
*Had* to update to 4.6 after updating my iP5 to 6.1 (of course, right in the middle of something), then XC terminated trying to startup after the install, finally got it sorted out, got my 6.1 deployment target up and running again. Fixed some munged up tablecells too (just the visual layout in storyboard).
 

notarysojac

macrumors newbie
Nov 16, 2006
6
0
Santa Fe, NM
Hi Saladinos...

Not sure your point of complaint ever was a behavior - meaning PARENS '(' were auto-balanced.

It's always been the BRACES '{' and BRACKETS '[' which were the added characters, depending on preferences settings as per auto-completion.

Just saying...
 

shurcooL

macrumors 6502a
Jan 24, 2011
934
104
Well, here's one very obvious bug that's still not fixed:

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.
 

Saladinos

macrumors 68000
Feb 26, 2008
1,845
2
Apple generally prefers you work with Objective-C style objects. Core Foundation is just there to enhance C compatibility... They haven't even given Core Foundation ARC yet. It's a bit of a second-class citizen in general.

Yeah but C compatibility is kind of important. Also, unless you're targeting iOS6 (and NSMapTable, which I'm unsure if this new inspector will detail), it's the only way to get a dictionary that doesn't copy its keys or retain its values.

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.
 

Marjamrob1

macrumors regular
Jul 19, 2012
114
0
Yeah but C compatibility is kind of important. Also, unless you're targeting iOS6 (and NSMapTable, which I'm unsure if this new inspector will detail), it's the only way to get a dictionary that doesn't copy its keys or retain its values.

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.

Ya, those brackets are really weird.
 

ConCat

macrumors 6502a
Yeah but C compatibility is kind of important. Also, unless you're targeting iOS6 (and NSMapTable, which I'm unsure if this new inspector will detail), it's the only way to get a dictionary that doesn't copy its keys or retain its values.

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.

I've noticed this quite often too. Sometimes the I realize I need to enclose something in brackets after it's been typed, so I put the end bracket first since i'm already at the end, then go to the beginning, and magically that extraneous bracket appears. Ah well, it's clearly a very simple logic error that would take all of five seconds to fix, they just have to do it...
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.