Renamed the macro ERR to DD_ERR

 and replaced NSError ** with NSError *__autoreleasing*

I was getting a lot of warnings because of the lack of autoreleasing attribute.
Also I got a conflict with your macro ERR and one defined in usr/include/curses.h so I renamed your macro DD_ERR.