Run a virtual iPhone on an Apple Silicon Mac.
Swift
expr -l objc -O --
NSMutableString *vpOut = [NSMutableString string];
NSArray *vpClasses = @[@"FBDisplayManager", @"UIScreen", @"UISApplicationSupportDisplayEdgeInfo", @"_UIScreenDisplayInfoProvider"];
for (NSString *vpName in vpClasses) {
Class vpC = NSClassFromString(vpName);
[vpOut appendFormat:@"=== %@ %p super=%s\n", vpName, vpC, vpC ? class_getName(class_getSuperclass(vpC)) : "-"];
if (!vpC) continue;
unsigned int vpN = 0;
Method *vpM = class_copyMethodList(object_getClass(vpC), &vpN);
for (unsigned int vi = 0; vi < vpN; vi++) [vpOut appendFormat:@"+ %s %.80s\n", sel_getName(method_getName(vpM[vi])), method_getTypeEncoding(vpM[vi])];
free(vpM);
vpM = class_copyMethodList(vpC, &vpN);
for (unsigned int vi = 0; vi < vpN; vi++) [vpOut appendFormat:@"- %s %.80s\n", sel_getName(method_getName(vpM[vi])), method_getTypeEncoding(vpM[vi])];
free(vpM);
Ivar *vpI = class_copyIvarList(vpC, &vpN);
for (unsigned int vi = 0; vi < vpN; vi++) [vpOut appendFormat:@"ivar %s %.120s\n", ivar_getName(vpI[vi]), ivar_getTypeEncoding(vpI[vi])];
free(vpI);
objc_property_t *vpP = class_copyPropertyList(vpC, &vpN);
for (unsigned int vi = 0; vi < vpN; vi++) [vpOut appendFormat:@"prop %s %.100s\n", property_getName(vpP[vi]), property_getAttributes(vpP[vi])];
free(vpP);
}
vpOut
expr -l objc -O --
unsigned int vpN = 0;
Class *vpAll = objc_copyClassList(&vpN);
NSMutableArray *vpHits = [NSMutableArray array];
for (unsigned int vi = 0; vi < vpN; vi++) {
for (NSString *vpSel in @[@"extendedProperties", @"exclusionArea", @"_exclusionArea", @"connectedConfigurations", @"_displayConfiguration"]) {
if (class_getInstanceMethod(vpAll[vi], NSSelectorFromString(vpSel)) && class_getInstanceMethod(class_getSuperclass(vpAll[vi]), NSSelectorFromString(vpSel)) == NULL) [vpHits addObject:[NSString stringWithFormat:@"%s -%@", class_getName(vpAll[vi]), vpSel]];
}
}
free(vpAll);
[vpHits componentsJoinedByString:@"\n"]