Too many arguments to function call, expected 0, have 3

If you think having to do this is annoying and pointless you can disable the check in the build settings by setting 'Enable strict checking of objc_msgSend Calls' to no


Just to spare watching a WWDC video, the answer is you need to strong type objc_msgSend for the compiler to build it:

typedef void (*send_type)(void*, SEL, void*);
send_type func = (send_type)objc_msgSend;
func(anItem.callback_object, NSSelectorFromString(anItem.selector), dict);

Here is another sample when calling instance methods directly, like this:

IMP methodInstance = [SomeClass instanceMethodForSelector:someSelector];
methodInstance(self, someSelector, someArgument);

Use strong type for methodInstance to make LLVM compiler happy:

typedef void (*send_type)(void*, SEL, void*);
send_type methodInstance = (send_type)[SomeClass instanceMethodForSelector:someSelector];
methodInstance(self, someSelector, someArgument);

Do not forget to set send_type's return and argument types according to your specific needs.