Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable "Game Mode" on iOS #31363

Merged
merged 2 commits into from
Jan 1, 2025
Merged

Enable "Game Mode" on iOS #31363

merged 2 commits into from
Jan 1, 2025

Conversation

hrfarmer
Copy link
Contributor

Reference for the key in Apple's documentation: https://developer.apple.com/documentation/xcode/build-settings-reference#Supports-Game-Mode

(Sorry for remaking the pr, I have a chronic git skill issue and couldn't figure out how to remove those commits without having weird inexplicable merge conflicts locally, and didn't figure it to be worth that much effort to resolve everything for a two-liner.)

@peppy
Copy link
Member

peppy commented Dec 31, 2024

Please link documentation of this. I can't find much at all.

@hrfarmer
Copy link
Contributor Author

Please link documentation of this. I can't find much at all.

Apart from the link above, this video, and some forum replies from Apple basically restating the same thing from the video, I just can't find anything else concrete from them in their documentation about iOS Game Mode. Considering it's supposed to automatically activate if the app category is set to game (but isn't in this case for some reason), it might just be something they don't want people to think about, because Apple is Apple.

Also as well I can confirm that when building on my phone with the key set (doesn't seem to work on iOS simulators), game mode activates as it should

@frenzibyte
Copy link
Member

This is odd. If you read the Info.plist of the macOS app, you'll notice there is no explicit specification of the GCSupportsGameMode key yet game mode is still enabled (until ppy/osu-deploy#184 because game mode is found to be broken on macOS). This is because of the app category specification pointing the app to be a "game", which makes macOS enable game mode.

Generally, specifying the "games" app category should make the system enable game mode when launching the app, this is corroborated by various threads on a quick Google search, mainly this Apple forum thread.

Anyhow, this PR is fine as is. I've added a note explaining the unusual requirement of this key, but otherwise testing the presence of the key shows game mode correctly being enabled on launch, and I cannot notice any audible/visual issues with it being enabled.

I'm not entirely sure why the key is not documented in Apple, but it's stated in a WWDC and the key is recognised by Xcode as well:

CleanShot 2024-12-31 at 21 04 02

@frenzibyte frenzibyte requested a review from peppy January 1, 2025 02:06
@frenzibyte frenzibyte changed the title Enable iOS 18 Game Mode Enable "Game Mode" on iOS Jan 1, 2025
@peppy peppy merged commit 8196325 into ppy:master Jan 1, 2025
9 checks passed
@hrfarmer hrfarmer deleted the game-mode branch January 1, 2025 02:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants