Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


RKObjectRequestOperation notifications are handling non-RestKit AFHTTPRequestOperations #1757

jedlinlau opened this Issue · 0 comments

1 participant


Running RestKit 0.20.3.

RKObjectRequestOperation.m registers for notifications for AFNetworkingOperationDidStartNotification and AFNetworkingOperationDidFinishNotification. However, both of these methods have the following check:

    if (![operation isKindOfClass:[AFHTTPRequestOperation class]]) return;

In general, this return isn't going to trigger because notification objects for these notifications should always be AFHTTPRequestOperations.

The side effect of this is that RKObjectRequestOperation will try to process AFHTTPRequestOperations that are not related to RestKit. (In my project, I'm using a separate AFHTTPClient, separate from RKObjectManager's sharedManager, to make HTTP requests for things like image files. The HTTP request operations passed through this separate AFHTTPClient are still being processed by RKObjectRequestOperation.)

I believe the fix should be to change the isKindOfClass: checks to more specifically check for RKHTTPRequestOperation:

    if (![[notification object] isKindOfClass:[RKHTTPRequestOperation class]]) return;

Will submit a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.