-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trouble hooking a class method #20
Comments
Oh we don't yet support hooking class-methods. Might come in the future ! |
That's fine, thanks for the clarification. Keep up the good work :) |
Hey I added that feature and made it even cooler! Just return the object instead of fighting with the invocation. [WebServiceClient aspect_hookSelector:@selector(sharedClient)
withOptions:AspectPositionInstead
usingBlock:^id {
return webServiceClient;
} error:&error]; |
Awesome. You sir are a legend! |
Ha, thanks! Right now it's just on a branch, since we don't yet have 64bit simulator support, but that will come soon, once I prep up my assembly-foo :) |
I'm am trying to swizzle a class method which ordinarily returns a singleton instance of a
AFHTTPSessionManager
subclass. My class is as follows:I am swizzling like this:
The
error
gives the following description:Aspects: Blog signature <NSMethodSignature: 0x8e2bec0> doesn't match (null).
Any ideas what I am doing wrong? Thanks for the great library, I think I am going to be using it a lot in my unit tests to simplify dependency injection.
The text was updated successfully, but these errors were encountered: