My project hooks viewDidoad, viewWillAppear, Stripe also hooks, when I push or present STPPaymentOptionsViewController which lead to crash as follow: #1711
Crash Info:
-[STPPaymentOptionsViewController viewDidLoad]: unrecognized selector sent to instance
Crash here:(crash place using "------>" pointed out)
// After hooks.
STPAspectInvoke(classContainer.afterAspects, info, &aspectsToRemove);
STPAspectInvoke(objectContainer.afterAspects, info, &aspectsToRemove);
// If no hooks are installed, call original implementation (usually to throw an exception)
if (!respondsToAlias) {
invocation.selector = originalSelector;
SEL originalForwardInvocationSEL = NSSelectorFromString(STPAspectsForwardInvocationSelectorName);
if ([self respondsToSelector:originalForwardInvocationSEL]) {
((void( *)(id, SEL, NSInvocation *))objc_msgSend)(self, originalForwardInvocationSEL, invocation);
}else {
------> [self doesNotRecognizeSelector:invocation.selector];
}
}
// Remove any hooks that are queued for deregistration.
[aspectsToRemove makeObjectsPerformSelector:@selector(remove)];
Crash Info: -[STPPaymentOptionsViewController viewDidLoad]: unrecognized selector sent to instance
Crash here:(crash place using "------>" pointed out) // After hooks. STPAspectInvoke(classContainer.afterAspects, info, &aspectsToRemove); STPAspectInvoke(objectContainer.afterAspects, info, &aspectsToRemove);
Summary
Code to reproduce
iOS version
Installation method
SDK version
Other information