Skip to content

Instantly share code, notes, and snippets.

@level3tjg
Last active November 30, 2023 22:17
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save level3tjg/813f7269a405b00203484382da18d3bf to your computer and use it in GitHub Desktop.
Save level3tjg/813f7269a405b00203484382da18d3bf to your computer and use it in GitHub Desktop.
Disable app thinning
// 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