Created
February 4, 2020 22:35
-
-
Save ozcanzaferayan/f35804d03c836da26e72dd9efa0314e7 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
unsigned int methodCount; | |
Method *methods = class_copyMethodList(moduleClass, &methodCount); | |
for (unsigned int i = 0; i < methodCount; i++) { | |
Method method = methods[i]; | |
SEL selector = method_getName(method); | |
if ([NSStringFromSelector(selector) hasPrefix:@"__rct_export__"]) { | |
IMP imp = method_getImplementation(method); | |
NSArray *entries = ((NSArray *(*)(id, SEL))imp)(_moduleClass, selector); | |
//... | |
[moduleMethods addObject:/* Object representing the method */]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment