Post

Replies

Boosts

Views

Activity

Reply to GKLocalPlayer save and fetch data to iCloud issue
Same here, [GKLocalPlayer saveGameData: withName: completionHandler:] reported successed [GKLocalPlayer fetchSavedGamesWithCompletionHandler:] got 0 data Tried to call “[GKLocalPlayer.localPlayer fetchSavedGamesWithCompletionHandler:nil];” first, still the same. Try to make thread wait 2sec before fetch, still the same.
Topic: Graphics & Games SubTopic: GameKit Tags:
Feb ’25
Reply to GCDualSenseAdaptiveTrigger API set trigger mode not working
Any one got any idea? I got a simplest sample here, followed the code from this video: https://developer.apple.com/videos/play/wwdc2021/10081/ But still not working. #import "AppDelegate.h" #import <GameController/GameController.h> @implementation AppDelegate - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { // Insert code here to initialize your application [ [ NSNotificationCenter defaultCenter ] addObserver:self selector:@selector( controllerDidConnect: ) name:GCControllerDidConnectNotification object:nil ]; [ [ NSNotificationCenter defaultCenter ] addObserver:self selector:@selector( controllerDidDisconnect: ) name:GCControllerDidDisconnectNotification object:nil ]; [ GCController startWirelessControllerDiscoveryWithCompletionHandler:^ { NSLog( @"Finished finding controllers" ); } ]; } -(void)controllerDidConnect:( NSNotification * )notification { GCController *controller = notification.object; [ controller.extendedGamepad.buttonA setValueChangedHandler:^( GCControllerButtonInput * button, float value, BOOL pressed ) { NSLog(@"controller Button A pressed."); if ([[[GCController current] physicalInputProfile] isKindOfClass:[GCDualSenseGamepad class]]) { GCDualSenseGamepad *dualSense = (GCDualSenseGamepad *)[[GCController current] physicalInputProfile]; GCDualSenseAdaptiveTrigger * rightTrigger = dualSense.rightTrigger; [rightTrigger setModeFeedbackWithStartPosition:0 resistiveStrength:0.9]; } } ]; [ controller.extendedGamepad.buttonB setValueChangedHandler:^( GCControllerButtonInput * button, float value, BOOL pressed ) { NSLog(@"controller Button B pressed."); if ([[[GCController current] physicalInputProfile] isKindOfClass:[GCDualSenseGamepad class]]) { GCDualSenseGamepad *dualSense = (GCDualSenseGamepad *)[[GCController current] physicalInputProfile]; GCDualSenseAdaptiveTrigger * rightTrigger = dualSense.rightTrigger; [ rightTrigger setModeVibrationWithStartPosition:0 amplitude:0.5 frequency:0.03 ]; } } ]; [ controller.extendedGamepad.buttonX setValueChangedHandler:^( GCControllerButtonInput * button, float value, BOOL pressed ) { NSLog(@"controller Button X pressed."); if ([[[GCController current] physicalInputProfile] isKindOfClass:[GCDualSenseGamepad class]]) { GCDualSenseGamepad *dualSense = (GCDualSenseGamepad *)[[GCController current] physicalInputProfile]; GCDualSenseAdaptiveTrigger * rightTrigger = dualSense.rightTrigger; [ rightTrigger setModeOff ]; } } ]; } -(void)controllerDidDisconnect:( NSNotification * )notification { } @end
Topic: Graphics & Games SubTopic: GameKit Tags:
Jan ’25
Reply to Game Center save game data to iCloud
Found the reason, the same file name have a "/" in it, which cause the save progress thought it finished, but maybe saved to some invalid path? Don't know, but that's the reason.
Topic: Graphics & Games SubTopic: GameKit Tags:
Replies
Boosts
Views
Activity
Mar ’25
Reply to GKLocalPlayer save and fetch data to iCloud issue
Same here, [GKLocalPlayer saveGameData: withName: completionHandler:] reported successed [GKLocalPlayer fetchSavedGamesWithCompletionHandler:] got 0 data Tried to call “[GKLocalPlayer.localPlayer fetchSavedGamesWithCompletionHandler:nil];” first, still the same. Try to make thread wait 2sec before fetch, still the same.
Topic: Graphics & Games SubTopic: GameKit Tags:
Replies
Boosts
Views
Activity
Feb ’25
Reply to GCDualSenseAdaptiveTrigger API set trigger mode not working
Any one got any idea? I got a simplest sample here, followed the code from this video: https://developer.apple.com/videos/play/wwdc2021/10081/ But still not working. #import "AppDelegate.h" #import <GameController/GameController.h> @implementation AppDelegate - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { // Insert code here to initialize your application [ [ NSNotificationCenter defaultCenter ] addObserver:self selector:@selector( controllerDidConnect: ) name:GCControllerDidConnectNotification object:nil ]; [ [ NSNotificationCenter defaultCenter ] addObserver:self selector:@selector( controllerDidDisconnect: ) name:GCControllerDidDisconnectNotification object:nil ]; [ GCController startWirelessControllerDiscoveryWithCompletionHandler:^ { NSLog( @"Finished finding controllers" ); } ]; } -(void)controllerDidConnect:( NSNotification * )notification { GCController *controller = notification.object; [ controller.extendedGamepad.buttonA setValueChangedHandler:^( GCControllerButtonInput * button, float value, BOOL pressed ) { NSLog(@"controller Button A pressed."); if ([[[GCController current] physicalInputProfile] isKindOfClass:[GCDualSenseGamepad class]]) { GCDualSenseGamepad *dualSense = (GCDualSenseGamepad *)[[GCController current] physicalInputProfile]; GCDualSenseAdaptiveTrigger * rightTrigger = dualSense.rightTrigger; [rightTrigger setModeFeedbackWithStartPosition:0 resistiveStrength:0.9]; } } ]; [ controller.extendedGamepad.buttonB setValueChangedHandler:^( GCControllerButtonInput * button, float value, BOOL pressed ) { NSLog(@"controller Button B pressed."); if ([[[GCController current] physicalInputProfile] isKindOfClass:[GCDualSenseGamepad class]]) { GCDualSenseGamepad *dualSense = (GCDualSenseGamepad *)[[GCController current] physicalInputProfile]; GCDualSenseAdaptiveTrigger * rightTrigger = dualSense.rightTrigger; [ rightTrigger setModeVibrationWithStartPosition:0 amplitude:0.5 frequency:0.03 ]; } } ]; [ controller.extendedGamepad.buttonX setValueChangedHandler:^( GCControllerButtonInput * button, float value, BOOL pressed ) { NSLog(@"controller Button X pressed."); if ([[[GCController current] physicalInputProfile] isKindOfClass:[GCDualSenseGamepad class]]) { GCDualSenseGamepad *dualSense = (GCDualSenseGamepad *)[[GCController current] physicalInputProfile]; GCDualSenseAdaptiveTrigger * rightTrigger = dualSense.rightTrigger; [ rightTrigger setModeOff ]; } } ]; } -(void)controllerDidDisconnect:( NSNotification * )notification { } @end
Topic: Graphics & Games SubTopic: GameKit Tags:
Replies
Boosts
Views
Activity
Jan ’25
Reply to GCDualSenseAdaptiveTrigger API set trigger mode not working
Yes, I've debugged it step by step, and checked the value one by one. One thing I've notice is that after the setModeWeaponWithStartPosition (or setModeFeedbackWithStartPosition), the mode is still 0 (GCDualSenseAdaptiveTriggerModeOff), I don't know if this is normal. By the way: MacOS: Sequoia 15.2 Chip: Apple M1 Ultra If it metters.
Topic: Graphics & Games SubTopic: GameKit Tags:
Replies
Boosts
Views
Activity
Jan ’25
Reply to Generic Xcode Archive issue
Found out why. We need to set the Skip install for all the static libraries.
Replies
Boosts
Views
Activity
Oct ’24