From bca2aecc462831601de393a293b7880c5a2aa131 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BB=96=E8=B6=85=E8=83=9C?= Date: Fri, 5 Jun 2026 03:50:07 +0800 Subject: [PATCH] feat: enable isiOSAppOnMac bypass controlled by PlaySettings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Uncomment bypass-gated loadEnvironmentBypass in PlayShadow +load - Add isiOSAppOnMac → pm_return_false swizzle in loadEnvironmentBypass - When PlayCover's bypass setting is enabled for an app, isiOSAppOnMac will return NO, making Unity games (e.g. TFT/Golden Spatula S17) think they are running on a real iPad instead of macOS - Fully opt-in per app via existing PlaySettings.bypass plist key - Zero impact on apps with bypass disabled (default) --- PlayTools/MysticRunes/PlayShadow.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PlayTools/MysticRunes/PlayShadow.m b/PlayTools/MysticRunes/PlayShadow.m index b30fdb90..901dee45 100644 --- a/PlayTools/MysticRunes/PlayShadow.m +++ b/PlayTools/MysticRunes/PlayShadow.m @@ -181,7 +181,7 @@ + (void) load { if ([[NSProcessInfo processInfo].environment[@"USE_EXTRA_ANTIJB"] isEqualToString:@"1"]) { [self loadJailbreakBypass]; } - // if ([[PlaySettings shared] bypass]) [self loadEnvironmentBypass]; # disabled as it might be too powerful + if ([[PlaySettings shared] bypass]) [self loadEnvironmentBypass]; // Swizzle ATTrackingManager [objc_getClass("ATTrackingManager") swizzleClassMethod:@selector(requestTrackingAuthorizationWithCompletionHandler:) withMethod:@selector(pm_return_2_with_completion_handler:)]; @@ -338,6 +338,7 @@ + (void) loadEnvironmentBypass { [self debugLogger:@"Environment bypass loading"]; // Completely nuke everything in the environment variables [objc_getClass("NSProcessInfo") swizzleInstanceMethod:@selector(environment) withMethod:@selector(pm_return_empty_dictionary)]; + [objc_getClass("NSProcessInfo") swizzleInstanceMethod:@selector(isiOSAppOnMac) withMethod:@selector(pm_return_false)]; } + (void) debugLogger: (NSString *) message {