Open
Description
Feature Request
Is your feature request related to a problem? Please describe.
When I run the application, only code within it can be swizzled. The code within the frameworks used by the application can't be swizzled/accessed.
Describe the solution you'd like
I used this code to load all frameworks on iOS using dlopen to hook app frameworks, and it can be adapted to MacForge:
NSString *pfpath = [[NSBundle mainBundle] privateFrameworksPath];
for (NSString *dir in [[NSFileManager defaultManager] contentsOfDirectoryAtPath:pfpath error:NULL]) {
NSMutableString *fpath = [pfpath mutableCopy];
NSArray *components = [dir componentsSeparatedByString:@"."];
NSString *fname = components[0];
[fpath appendFormat:@"/%@/%@", dir, fname];
if ([fpath rangeOfString:@"swift"].location == NSNotFound) {
dlopen([fpath UTF8String], RTLD_NOW);
}
}
Describe alternatives you've considered
None.
Teachability, Documentation, Adoption, Migration Strategy
N/A