feat: enable isiOSAppOnMac bypass controlled by PlaySettings#225
Open
XiaoChaoConcise wants to merge 1 commit into
Open
feat: enable isiOSAppOnMac bypass controlled by PlaySettings#225XiaoChaoConcise wants to merge 1 commit into
XiaoChaoConcise wants to merge 1 commit into
Conversation
- 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)
Member
|
@ohaiibuzzle thoughts? |
Member
|
It should be a separate controllable key. The issue is that iirc macOS itself uses some of these keys to determine the behavior of the target app, so setting can break things, hence me commenting it out. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR enables the
isiOSAppOnMacbypass that was already written but commented out in PlayShadow.m. The bypass is gated behind the existingPlaySettings.bypassper-app plist setting, so it has zero impact on apps that do not have bypass enabled.Problem
Some Unity-based iOS games (e.g., Teamfight Tactics / Golden Spatula / 金铲铲之战 S17) call
[NSProcessInfo isiOSAppOnMac]to detect the runtime environment. When this returnstrue, Unity disables touch input simulation, breaking PlayCover's keymapping and mouse support. S16 worked fine, but S17 introduced this check.The original PlayShadow.m code already had the fix written but commented out with the note "disabled as it might be too powerful". This PR re-enables it in a controlled way.
Changes (2 lines)
[[PlaySettings shared] bypass]now controls whetherloadEnvironmentBypassis calledisiOSAppOnMac → pm_return_falseswizzle insideloadEnvironmentBypassHow it works
bypass: trueto the per-app plist (App Settings/com.tencent.jkchess.plist)PlaySettings.shared.bypassPlayShadowLoader.loadchecks bypass → callsloadEnvironmentBypassloadEnvironmentBypassnow hooksisiOSAppOnMacto returnNOSafety
bypassplist key (defaultfalse)pm_return_falsemethod that's already compiled inVerification
Tested on: 金铲铲之战 S17 (com.tencent.jkchess)
🤖 Generated with Claude Code
Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com