Aspects icon indicating copy to clipboard operation
Aspects copied to clipboard

Aspects hook firstly and later other AOP framework hook a same method, which will cause crash.

Open WJustin opened this issue 6 years ago • 0 comments

[[UIViewController class] aspect_hookSelector:@selector(viewDidAppear:) withOptions:AspectPositionBefore usingBlock:^(id invoke) { NSLog(@"Aspects viewDidAppear"); } error:NULL];

[AspectsSwizz swizzingInstanceMethodByClass:[UIViewController class]
originSelector:@selector(viewDidAppear:) swizzingSelector:@selector(hook_viewDidAppear:)];

UIViewController *vc = [[UIViewController alloc] init];
[vc viewDidAppear:YES];

the above code will cause exception. My resolution is the https://github.com/steipete/Aspects/pull/142

WJustin avatar Mar 19 '18 06:03 WJustin