diff --git a/FirebaseMessaging/Sources/FIRMessagingRemoteNotificationsProxy.m b/FirebaseMessaging/Sources/FIRMessagingRemoteNotificationsProxy.m index a73367def7c..8d9de0982a8 100644 --- a/FirebaseMessaging/Sources/FIRMessagingRemoteNotificationsProxy.m +++ b/FirebaseMessaging/Sources/FIRMessagingRemoteNotificationsProxy.m @@ -300,10 +300,10 @@ - (void)swizzleSelector:(SEL)originalSelector IMP originalMethodImplementation = method_setImplementation(originalMethod, swizzledImplementation); - IMP nonexistantMethodImplementation = [self nonExistantMethodImplementationForClass:klass]; + IMP nonexistentMethodImplementation = [self nonExistentMethodImplementationForClass:klass]; if (originalMethodImplementation && - originalMethodImplementation != nonexistantMethodImplementation && + originalMethodImplementation != nonexistentMethodImplementation && originalMethodImplementation != swizzledImplementation) { [self saveOriginalImplementation:originalMethodImplementation forSelector:originalSelector]; } @@ -344,8 +344,8 @@ - (void)unswizzleSelector:(SEL)selector inClass:(Class)klass { // behavior as if the method was not implemented. // See: http://stackoverflow.com/a/8276527/9849 - IMP nonExistantMethodImplementation = [self nonExistantMethodImplementationForClass:klass]; - method_setImplementation(swizzledMethod, nonExistantMethodImplementation); + IMP nonExistentMethodImplementation = [self nonExistentMethodImplementationForClass:klass]; + method_setImplementation(swizzledMethod, nonExistentMethodImplementation); } } @@ -354,10 +354,10 @@ - (void)unswizzleSelector:(SEL)selector inClass:(Class)klass { // This is useful to generate from a stable, "known missing" selector, as the IMP can be compared // in case we are setting an implementation for a class that was previously "unswizzled" into a // non-existent implementation. -- (IMP)nonExistantMethodImplementationForClass:(Class)klass { - SEL nonExistantSelector = NSSelectorFromString(@"aNonExistantMethod"); - IMP nonExistantMethodImplementation = class_getMethodImplementation(klass, nonExistantSelector); - return nonExistantMethodImplementation; +- (IMP)nonExistentMethodImplementationForClass:(Class)klass { + SEL nonExistentSelector = NSSelectorFromString(@"aNonExistentMethod"); + IMP nonExistentMethodImplementation = class_getMethodImplementation(klass, nonExistentSelector); + return nonExistentMethodImplementation; } // A safe, non-leaky way return a property object by its name