Last active
January 28, 2019 09:24
-
-
Save Gringox/b9ff1eaadc40bf686d1df2b27b68d0a7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ (void)initialize { | |
if (!MACUSER) { | |
return; | |
} | |
Class class = [self class]; | |
NSArray<NSString *> *originalSelectors = @[ | |
@"doStuffOnSuccess:onFailure:", | |
@"doStuff1OnSuccess:onFailure:", | |
@"doStuff2OnSuccess:onFailure:", | |
@"doStuff3:onSuccess:onFailure:" | |
]; | |
NSArray<NSString *> *swizzledSelectors = @[ | |
@"appleReview_doStuffOnSuccess:onFailure:", | |
@"appleReview_doStuff1OnSuccess:onFailure:", | |
@"appleReview_doStuff2OnSuccess:onFailure:", | |
@"appleReview_doStuff3:onSuccess:onFailure:" | |
]; | |
NSUInteger selectorsLength = originalSelectors.count; | |
for (int i = 0; i < selectorsLength; i++) { | |
SEL originalSelector = NSSelectorFromString(originalSelectors[i]); | |
SEL swizzledSelector = NSSelectorFromString(swizzledSelectors[i]); | |
Method originalMethod = class_getInstanceMethod(class, originalSelector); | |
Method swizzledMethod = class_getInstanceMethod(class, swizzledSelector); | |
method_exchangeImplementations(originalMethod, swizzledMethod); | |
} | |
} |
How do you find when app is in review?
Apple didn’t approve my app because it had a login screen and they were asking for credentials to test what was behind that screen. So, I knew the app was on review because they log in with the credentials I gave them. I check this in the line if (!MACUSER) {}
.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How do you find when app is in review?