Adding:
The app also delivers real-time, interactive graphics which puts heavy demands on the CPU and GPU.
Within the ContentView(), there's a view providing a UI via SwiftUI, and a view delivering an MTKView via a NSViewRepresentable.
Inconsistent frame-rates on macOS have been very noticeable to users, so enabling "game mode" should help the user experience considerably.
Developed and tested on a Apple M2 Max running macOS 14.2.1 (23C71)
When the app is modified to run without automatically taking the window into fullscreen mode, and the user follows the instructions found on the "Use Game Mode on Mac" support page (namely: "1. Move your pointer over the green button in the upper-left corner of the game window. 2. Choose Enter Full Screen from the menu that appears.") the 'Game Mode" menu icon does not appear in the menu bar.
Many thanks in advance for your help!
Post
Replies
Boosts
Views
Activity
Hello @adevaykin, @Justin, et al!
I need some help getting the 'Game Mode' enabled and working in a SwiftUI project for macOS (Deployment Target: 14.0; Target minimum deployment: macOS 14.0).
For the Target's identity, the App Category is set to 'Games'. When the app is build and run, the following key appears in the Info.plist: <key>LSApplicationCategoryType</key> <string>public.app-category.games</string>".
The app launches in full-screen with the following SwiftUI structure:
struct AppName: App {
var body: some Scene {
WindowGroup {
ContentView()
.onAppear {
DispatchQueue.main.async {
if let window = NSApplication.shared.windows.last {
window.toggleFullScreen(nil)
}
}
}
}
}
}
When app is launched, the app loads full-screen however the "game controller" icon does not appear in the menu bar.
Any suggestions?
I just created a ticket for this enhancement request via the Feedback Assistant.