zwaldowski/BlocksKit — Issue #56: Crash on iOS 4.3 in bk_resolveInstanceMethod
Author: nicked
Created: 2012-01-11 06:11:30+00:00
State: open

When I try to set the failureBlock on an NSURLConnection, I get the following crash:

*** NSInvocation: warning: object 0x26b1df8 of class 'Protocol' does not implement methodSignatureForSelector: -- trouble ahead
*** NSInvocation: warning: object 0x26b1df8 of class 'Protocol' does not implement doesNotRecognizeSelector: -- abort

on line 103 of A2BlockDelegate+BlocksKit.m (the line that starts with "[propertyMap allKeysForObject: protocol]").

There are no problems with my iOS 5 devices or simulator, this only happens on the 4.3 simulator (I don't have an iOS 4 device handy to test this on).

All I'm doing to cause this is:

NSURLConnection *connection = [NSURLConnection connectionWithRequest:[NSURLRequest requestWithURL:url]];
connection.failureBlock = ^(NSURLConnection *conn, NSError *error) {
...
};

I'm using the latest version of BlocksKit.

Thanks