Last active
November 30, 2023 22:17
-
-
Save level3tjg/813f7269a405b00203484382da18d3bf to your computer and use it in GitHub Desktop.
Disable app thinning
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
// Inject into appstored and itunesstored | |
#import <MobileGestalt/MobileGestalt.h> | |
NSString *deviceClass; | |
%hook XDCDevice | |
- (NSString *)productType { | |
return deviceClass; | |
} | |
%end | |
%hook Device | |
- (NSArray<NSString *> *)productVariants { | |
return @[ deviceClass ]; | |
} | |
%end | |
%hook SSDevice | |
- (NSString *)productType { | |
return deviceClass; | |
} | |
- (NSString *)compatibleProductType { | |
return deviceClass; | |
} | |
%end | |
%hook AMSDevice | |
+ (NSString *)productType { | |
return deviceClass; | |
} | |
+ (NSString *)compatibleProductType { | |
return deviceClass; | |
} | |
+ (NSString *)_lib_compatibleProductType { | |
return deviceClass; | |
} | |
%end | |
%ctor { | |
deviceClass = (__bridge NSString *)MGCopyAnswer(kMGDeviceClass, NULL); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment