CocoaPods and objc_msgSend

I got this “Too Many arguments to function call, expected 0, have 3” error while compiling a project relies on QuickDialog.

According “”, it is easy to fix, just cast the function to right prototype, like:

int (*action)(id, SEL, int) = (int (*)(id, SEL, int)) objc_msgSend;

But, the invocation is in a pod project which is locked for editing and even if I unlock it, the change will lose at next checking out of the project.

Further peek at objc/message.h shows it is a trick to help compiler ensuring the call is with right frame, the signature is still available with OBJC_OLD_DISPATCH_PROTOTYPES micro. Then I found the:Screen Shot 2015-06-12 at 9.27.25 AM

Set “Enable Strict Checking of objc_msgSend Calls” in QuickDialog target of Pod project, done.

3 Replies to “CocoaPods and objc_msgSend”

  1. I don’t know what you are talking about, but it appears as if you hacked rocket science with a screw driver…

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.