From d64bd0a4d03aaed250facde4910979b576535251 Mon Sep 17 00:00:00 2001 From: Nikos Bitoulas Date: Mon, 26 Sep 2016 12:52:11 +0200 Subject: [PATCH 1/2] Potential app rejection reason fixed --- JRSwizzle.m | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/JRSwizzle.m b/JRSwizzle.m index 4e582bf..ef03c48 100644 --- a/JRSwizzle.m +++ b/JRSwizzle.m @@ -89,14 +89,22 @@ + (BOOL)jr_swizzleMethod:(SEL)origSel_ withMethod:(SEL)altSel_ error:(NSError**) if (!directOriginalMethod) { inheritedOriginalMethod = class_getInstanceMethod(self, origSel_); if (!inheritedOriginalMethod) { - SetNSError(error_, @"original method %@ not found for class %@", NSStringFromSelector(origSel_), [self className]); +#if TARGET_OS_IPHONE + SetNSError(error_, @"original method %@ not found for class %@", NSStringFromSelector(origSel_), [self class]); +#else + SetNSError(error_, @"original method %@ not found for class %@", NSStringFromSelector(origSel_), [self className]); +#endif return NO; } } if (!directAlternateMethod) { inheritedAlternateMethod = class_getInstanceMethod(self, altSel_); if (!inheritedAlternateMethod) { - SetNSError(error_, @"alternate method %@ not found for class %@", NSStringFromSelector(altSel_), [self className]); +#if TARGET_OS_IPHONE + SetNSError(error_, @"alternate method %@ not found for class %@", NSStringFromSelector(altSel_), [self class]); +#else + SetNSError(error_, @"alternate method %@ not found for class %@", NSStringFromSelector(altSel_), [self className]); +#endif return NO; } } From cdc5cec597737e4da81f0bdf38ce951b0ae51b26 Mon Sep 17 00:00:00 2001 From: Nikos Bitoulas Date: Mon, 26 Sep 2016 12:52:23 +0200 Subject: [PATCH 2/2] Bumped version to 1.0.1 --- JRSwizzle.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/JRSwizzle.podspec b/JRSwizzle.podspec index e460ac3..0d1cd77 100644 --- a/JRSwizzle.podspec +++ b/JRSwizzle.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'JRSwizzle' - s.version = '1.0' + s.version = '1.0.1' s.license = 'MIT' s.summary = 'one-stop-shop for all your method swizzling needs' s.homepage = 'https://github.com/rentzsch/jrswizzle'