Why does the ARC migrator say that NSInvocation’s -setArgument: is not safe unless the argument is __unsafe_unretained?

This is a complete guess, but might it be something to do with the argument being passed in by reference as a void*? In the case you’ve mentioned, this doesn’t really seem a problem, but if you were to call, eg. getArgument:atIndex: then the compiler wouldn’t have any way of knowing whether the returned argument … Read more

Objective C – Custom setter with ARC?

The strong takes care of itself on the ivar level, so you can merely do – (void)setMyObject:(MyObject *)anObject { _myObject = anObject; // other stuff } and that’s it. Note: if you’re doing this without automatic properties, the ivar would be MyObject *_myObject; and then ARC takes cares of the retains and releases for you … Read more

How do you remove KVO from a weak property?

I find any kind of code required specially for this case really unnecessary as removal can be automated. With the introduction of ARC, Apple should have provide automatic removal of observers that would fix cases like this, but unfortunately they didn’t. But I’ve made my own category that adds this lacking feature: https://github.com/krzysztofzablocki/SFObservers I’ve explained … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)