You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Get the aspect container and check if there are any hooks remaining. Clean up if there are not.
AspectsContainer *container = aspect_getContainerForObject(self, selector);
if (!container.hasAspects) {
// Destroy the containeraspect_destroyContainerForObject(self, selector);
// Figure out how the class was modified to undo the changes.NSString *className = NSStringFromClass(klass);
if ([className hasSuffix:AspectsSubclassSuffix]) {
Class originalClass = NSClassFromString([className stringByReplacingOccurrencesOfString:AspectsSubclassSuffix withString:@""]);
NSCAssert(originalClass != nil, @"Original class must exist");
object_setClass(self, originalClass);
AspectLog(@"Aspects: %@ has been restored.", NSStringFromClass(originalClass));
it recover the class, but it has another selector hack.....
Shouldn't this be merged into master ? it's fixed bad_access crash for us. Crash happened because we have added/removed some method swizzling on the same class from different places.
Activity
fix AspectToken remove bug
hovox commentedon Mar 3, 2017
Shouldn't this be merged into master ? it's fixed bad_access crash for us. Crash happened because we have added/removed some method swizzling on the same class from different places.