2025 Graphics & Games
WWDC25 · 23 min · Graphics & Games
Level up your games
Learn how to make your games shine on the unified gaming platform. We’ll give you a map of the technologies you can use to level up your game and further improve your player experience. Get an overview of the fundamental tools essential to build, debug, and profile your game.
Watch at developer.apple.com ↗Chapters
Code shown on screen · 2 snippets
React to Low Power Mode state
static let NSProcessInfoPowerStateDidChange: NSNotification.Name
var isLowPowerModeEnabled: Bool { get } GameSave code sample
// Objective-C GameSave code sample
NSString* containerIdentifier = ///… container entitlement string, nil specifies the first in the entitlement array
GSSyncedDirectory* directory = [GSSyncedDirectory openDirectoryForContainerIdentifier:containerIdentifier];
/// Where statusDisplay is an NSWindow or UIWindow where the alert will be anchored to
[directory finishSyncing:statusDisplay completionHandler:^{
}];
GSSyncedDirectoryState* directoryState = [directory directoryState];
switch (directoryState.state) {
case GSSyncStateError:
error = directoryState.error;
break;
default:
NSLog(@"Sync has finished");
}
NSURL* saveURL = directoryState.url; Resources
Related sessions
-
24 min -
27 min -
25 min -
32 min -
30 min -
21 min -
25 min -
24 min -
30 min