Click here for the new  weblog.
I guess, this is the best error I’ve ever seen… (via)

I guess, this is the best error I’ve ever seen…

(via)

Text from Xcode

@textfromxcode

-fno-objc-arc

As recently discovered – the iCloud and the sandboxing do not work without enabling ARC; or at least not when GC is enabled. Of course this is sometimes only a little bit of work, in most cases a lot of work and sometimes simply impossible for some resources or frameworks yet.

But there is a solution. One can simply disable ARC for those files:

Add compiler flag -fno-objc-arc in Targets > Build Phases > Compile Sources.

Xcode and the Notification Center

Just discovered that Xcode uses the new Notification Center in Mountain Lion as well. Not sure yet, that I like that…

No iCloud for you, Garbage Collection!

Sometimes I just want to bang my head against all available walls – when it comes to Apple.

I have been trying to enable Write for the iCloud for days now and it just doesn’t work. No matter what I’ve tried.

As it turns out – you simply can’t use iCloud for GC enabled Apps. Period.

But Apple does not tell you that. And probably never will.

And in addition – most Sandbox related (and frustrating) bugs have also to do with it.

So, the bottom line is: In order to have working iCloud enabled Apps playing nice in their sandbox – you have to refactor them. As soon as possible.

So Apple, just out of curiosity
– ARC will be obsolete when? In 2014 or 2015?

MGPreferencePanel Revised

I just revised my very often downloaded MGPreferencePanel code. I guess calling it the Cocoa Preference Window for the lazy ones made it that popular in the first place :–)

The MGPreferencePanel is now ready for Mountain Lion and ARC, so no more retained and autoreleased objects and I’ve also simplified the usage.

Drop the files into your project, provide titles and icons for views and that’s it. As always you can do whatever you want with it – Copyleft and WTFPL, you know.

About the MGPreferencePanel – The Cocoa Preference Window for the lazy ones

There is nothing more annoying than programming a preference-window with selectable toolbar-buttons and automatic resizing.

Most of the solutions you find today are either close to the one programmed by Matt Ball or base on it. Indeed, there are even more complicated ways, doing it.

They are all more or less understandable and customizable. But all have in common that it is annoying and time consuming to add each single subview via a separate nib-file or a separate plists. I know some disagree but I believe that more nibs aren‘t always the best solution. Because more nibs lead to more controller, that leads to more work customizing them, that leads to a more enraged programmer.

This is why I programmed my own solution.

Sure, it is far from being perfect, but you have customized everything in less than thirty two seconds!

You can use it as an inspector-view as well. Best of all: just one nib.

Anything left to be desired? Not for me.

Download MGPreferencePanel (Xcode Project | 10.7+)

Content Hugging Priority - what the heck?

Rest assured – I was as confused as most of you.

What happened to the size inspector? How to edit ScrollViews, and TextViews? But there is a simple trick, to get the old and much more useful behavior back.

Xcode 4.3 and above automatically creates projects with the new Cocoa Autolayout API enabled now. The moment you disable it in the XIB settings – everything will be fine again.

There is also a small example on that new API available from Apple:

Cocoa Autolayout Demos

Xcode 4 exception breakpoint

Don’t complain about Flash

Currently the only App that is driving me (and the fans) nuts is Xcode 4 and sometimes Dropbox because of their unbelievable heavy use of system resources…