-
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
Can't hook class methods #32
Comments
Hmm. Is there any info in the log why this might fail? |
I have figured out that I have to use the 1.5 version for that. |
Never found the time to dig into that. PR's welcome :) |
The version 1.4 works great on arm64 but does not contain Class Hook methods. |
Again, I very much welcome pull requests. Currently 1.4 works for me as I use Apects for testing/mocking only - if this changes I'll put it more work. |
Hello,
I have figured out an issue concerning class method (not instance methods).
I have tried to put this into my code :
[NSJSONSerialization aspect_hookSelector:@selector(JSONObjectWithData:options:error:) withOptions:AspectPositionBefore usingBlock:^(id info, NSData _data, NSJSONReadingOptions opt, NSError *_error){
NSLog(@"JSONObjectWithData:options:error: before | object:%@ | instance:%@ | class:%@",info,[info instance],[[info instance] class]);
} error:NULL];
The Aspects did not intercept class methods examples set in my AppDelegate for example.
Do you know a solution for this issue ?
Thanks
The text was updated successfully, but these errors were encountered: