-
Notifications
You must be signed in to change notification settings - Fork 542
GameController macOS xcode26.0 b1
Alex Soto edited this page Jun 9, 2025
·
1 revision
#GameController.framework
diff -ruN /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/GameController.framework/Headers/GCButtonElement.h /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/GameController.framework/Headers/GCButtonElement.h
--- /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/GameController.framework/Headers/GCButtonElement.h 2025-04-19 03:05:57
+++ /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/GameController.framework/Headers/GCButtonElement.h 2025-05-24 22:42:04
@@ -34,6 +34,15 @@
*/
@property (readonly, nullable) id<GCTouchedStateInput> touchedInput;
+/**
+ Get the input containing the measured force applied to the button.
+
+ Some buttons feature load cells (also known as button force transducers)
+ capable of measuring applied mechanical force.
+ */
+@property (readonly, nullable) id<GCLinearInput> forceInput;
+
+
@end
NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/GameController.framework/Headers/GCController.h /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/GameController.framework/Headers/GCController.h
--- /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/GameController.framework/Headers/GCController.h 2025-04-19 03:05:57
+++ /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/GameController.framework/Headers/GCController.h 2025-05-24 22:42:04
@@ -18,7 +18,6 @@
@class GCMotion;
@class CHHapticEngine;
-@class GCDeviceHaptics;
@class GCDeviceLight;
@class GCDeviceBattery;
@class GCGamepad;
@@ -250,9 +249,9 @@
/**
Gets the haptics for the controller, if one exists.
- Use this property to create CHHapticEngine instances according to your needs.
+ Use this property to create CHHapticEngine instances according to your needs.
- @note Haptics are a drain on the controller's battery, and can be distracting when used excessively.
+ @note Haptics are a drain on the controller's battery, and can be distracting when used excessively.
*/
@property (nonatomic, retain, readonly, nullable) GCDeviceHaptics *haptics API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0));
diff -ruN /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/GameController.framework/Headers/GCDevice.h /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/GameController.framework/Headers/GCDevice.h
--- /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/GameController.framework/Headers/GCDevice.h 2025-04-19 03:05:57
+++ /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/GameController.framework/Headers/GCDevice.h 2025-05-24 22:42:04
@@ -9,7 +9,10 @@
#import <GameController/GCProductCategories.h>
@class GCPhysicalInputProfile;
+@class GCDeviceHaptics;
+@protocol GCDevicePhysicalInput;
+
NS_ASSUME_NONNULL_BEGIN
API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0))
@@ -49,6 +52,8 @@
@see GCController.extendedGamepad
*/
@property (nonatomic, strong, readonly) GCPhysicalInputProfile *physicalInputProfile API_DEPRECATED("Use the physicalInputProfile property on GCController instead. For GCKeyboard, use the keyboardInput property. For GCMouse, use the mouseInput property.", macos(11.0, 13.0), ios(14.0, 16.0), tvos(14.0, 16.0));
+
+
@end
diff -ruN /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/GameController.framework/Headers/GCEventViewController.h /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/GameController.framework/Headers/GCEventViewController.h
--- /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/GameController.framework/Headers/GCEventViewController.h 2025-04-19 03:05:56
+++ /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/GameController.framework/Headers/GCEventViewController.h 2025-05-24 22:42:03
@@ -1,14 +1,16 @@
-//
+//
// GCEventViewController.h
// GameController
//
-// Copyright © 2018 Apple Inc. All rights reserved.
+// Copyright © 2024 Apple Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <AppKit/NSViewController.h>
+NS_ASSUME_NONNULL_BEGIN
+
/**
A view controller subclass that allows fine grained control of the user interface system's handling
of game controller events. Set an instance of this class as your root view controller if you intend
@@ -35,9 +37,10 @@
Note that unlike UIView.userInteractionEnabled this only controls the flow of game controller events.
- @see GCController
@see UIView.userInteractionEnabled
*/
@property (nonatomic) BOOL controllerUserInteractionEnabled;
@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/GameController.framework/Headers/GCInputNames.h /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/GameController.framework/Headers/GCInputNames.h
--- /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/GameController.framework/Headers/GCInputNames.h 2025-04-19 03:31:41
+++ /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/GameController.framework/Headers/GCInputNames.h 2025-05-24 05:28:40
@@ -56,13 +56,22 @@
GAMECONTROLLER_EXPORT GCInputButtonName GCInputButtonY API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0)) NS_SWIFT_NAME(y);
GAMECONTROLLER_EXPORT GCInputDirectionPadName GCInputDirectionPad API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0)) NS_SWIFT_NAME(directionPad);
+
+GAMECONTROLLER_EXPORT GCInputDirectionPadName GCInputThumbstick API_AVAILABLE(macos(26.0), ios(26.0), tvos(26.0), visionos(26.0));
GAMECONTROLLER_EXPORT GCInputDirectionPadName GCInputLeftThumbstick API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0));
GAMECONTROLLER_EXPORT GCInputDirectionPadName GCInputRightThumbstick API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0));
+GAMECONTROLLER_EXPORT GCInputButtonName GCInputThumbstickButton API_AVAILABLE(macos(26.0), ios(26.0), tvos(26.0), visionos(26.0));
GAMECONTROLLER_EXPORT GCInputButtonName GCInputLeftThumbstickButton API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0));
GAMECONTROLLER_EXPORT GCInputButtonName GCInputRightThumbstickButton API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0));
/*
+ * Grip Buttons
+ */
+
+GAMECONTROLLER_EXTERN GCInputButtonName GCInputGripButton API_AVAILABLE(macos(26.0), ios(26.0), tvos(26.0), visionos(26.0));
+
+/*
* Shoulder Buttons
*/
@@ -76,6 +85,7 @@
GAMECONTROLLER_EXPORT GCInputButtonName GCInputLeftBumper API_AVAILABLE(macos(14.4), ios(17.4), tvos(17.4), visionos(1.1));
GAMECONTROLLER_EXPORT GCInputButtonName GCInputRightBumper API_AVAILABLE(macos(14.4), ios(17.4), tvos(17.4), visionos(1.1));
+GAMECONTROLLER_EXPORT GCInputButtonName GCInputTrigger API_AVAILABLE(macos(26.0), ios(26.0), tvos(26.0), visionos(26.0));
GAMECONTROLLER_EXPORT GCInputButtonName GCInputLeftTrigger API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0));
GAMECONTROLLER_EXPORT GCInputButtonName GCInputRightTrigger API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0));
@@ -152,3 +162,13 @@
/// Gets the name of an arcade button at a certain position.
GAMECONTROLLER_EXPORT GCInputButtonName GCInputArcadeButtonName(NSInteger row, NSInteger column) NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0));
+
+
+#pragma mark - (Spatial) Stylus Buttons
+
+/** The stylus tip button used to detect contact with a surface. */
+GAMECONTROLLER_EXPORT GCInputButtonName GCInputStylusTip API_AVAILABLE(visionos(26.0)) API_UNAVAILABLE(macos, ios, tvos);
+/** The stylus button used for interacting with virtual objects. */
+GAMECONTROLLER_EXPORT GCInputButtonName GCInputStylusPrimaryButton API_AVAILABLE(visionos(26.0)) API_UNAVAILABLE(macos, ios, tvos);
+/** The stylus button used for drawing and writing in air. */
+GAMECONTROLLER_EXPORT GCInputButtonName GCInputStylusSecondaryButton API_AVAILABLE(visionos(26.0)) API_UNAVAILABLE(macos, ios, tvos);
diff -ruN /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/GameController.framework/Headers/GCKeyboard.h /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/GameController.framework/Headers/GCKeyboard.h
--- /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/GameController.framework/Headers/GCKeyboard.h 2025-04-19 03:05:57
+++ /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/GameController.framework/Headers/GCKeyboard.h 2025-05-24 22:42:04
@@ -10,7 +10,6 @@
#import <GameController/GCExtern.h>
#import <GameController/GCDevice.h>
-@class GCKeyboard;
@class GCKeyboardInput;
NS_ASSUME_NONNULL_BEGIN
diff -ruN /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/GameController.framework/Headers/GCLinearInput.h /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/GameController.framework/Headers/GCLinearInput.h
--- /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/GameController.framework/Headers/GCLinearInput.h 2025-04-19 03:05:56
+++ /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/GameController.framework/Headers/GCLinearInput.h 2025-05-24 22:42:03
@@ -10,6 +10,7 @@
@protocol GCPhysicalInputElement;
@protocol GCPhysicalInputSource;
+
NS_ASSUME_NONNULL_BEGIN
/**
@@ -74,6 +75,8 @@
the device before the event was transmitted to the host.
*/
@property (readonly) NSTimeInterval lastValueLatency;
+
+
/**
An object describing the physical action(s) the user performs to manipulate
diff -ruN /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/GameController.framework/Headers/GCMouse.h /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/GameController.framework/Headers/GCMouse.h
--- /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/GameController.framework/Headers/GCMouse.h 2025-04-19 03:05:57
+++ /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/GameController.framework/Headers/GCMouse.h 2025-05-24 22:42:04
@@ -5,10 +5,12 @@
// Copyright © 2020 Apple Inc. All rights reserved.
//
-#import <GameController/GameController.h>
+#import <Foundation/Foundation.h>
+
#import <GameController/GCExtern.h>
+#import <GameController/GCDevice.h>
-#import <Foundation/Foundation.h>
+@class GCMouseInput;
NS_ASSUME_NONNULL_BEGIN
diff -ruN /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/GameController.framework/Headers/GCPhysicalInputExtents.h /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/GameController.framework/Headers/GCPhysicalInputExtents.h
--- /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/GameController.framework/Headers/GCPhysicalInputExtents.h 1969-12-31 19:00:00
+++ /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/GameController.framework/Headers/GCPhysicalInputExtents.h 2025-05-24 22:42:02
@@ -0,0 +1,12 @@
+//
+// GCPhysicalInputExtents.h
+// GameController
+//
+// Copyright © 2025 Apple Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/GameController.framework/Headers/GCProductCategories.h /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/GameController.framework/Headers/GCProductCategories.h
--- /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/GameController.framework/Headers/GCProductCategories.h 2025-04-19 03:05:56
+++ /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/GameController.framework/Headers/GCProductCategories.h 2025-05-24 22:42:04
@@ -24,7 +24,10 @@
GAMECONTROLLER_EXPORT NSString *const GCProductCategoryXboxOne API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0));
GAMECONTROLLER_EXPORT NSString *const GCProductCategoryHID API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0));
+/** The category for game controller products that support 6DoF tracking on visionOS. */
+GAMECONTROLLER_EXPORT NSString *const GCProductCategorySpatialController API_AVAILABLE(macos(26.0), ios(26.0), tvos(26.0), visionos(26.0));
+
GAMECONTROLLER_EXPORT NSString *const GCProductCategoryArcadeStick API_AVAILABLE(macos(14.0), ios(17.0), tvos(17.0));
@@ -58,3 +61,9 @@
GAMECONTROLLER_EXPORT NSString *const GCProductCategoryMouse API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0));
GAMECONTROLLER_EXPORT NSString *const GCProductCategoryKeyboard API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0));
+
+
+/// Stylus product categories
+
+/** The category for stylus products that support 6DoF tracking on visionOS. */
+GAMECONTROLLER_EXPORT NSString *const GCProductCategorySpatialStylus API_AVAILABLE(visionos(26.0)) API_UNAVAILABLE(macos, ios, tvos);
diff -ruN /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/GameController.framework/Headers/GCSpatialAccessory.h /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/GameController.framework/Headers/GCSpatialAccessory.h
--- /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/GameController.framework/Headers/GCSpatialAccessory.h 1969-12-31 19:00:00
+++ /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/GameController.framework/Headers/GCSpatialAccessory.h 2025-05-24 22:42:02
@@ -0,0 +1,13 @@
+//
+// GCSpatialAccessory.h
+// GameController
+//
+// Copyright © 2025 Apple Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import <GameController/GCExtern.h>
+#import <GameController/GCDevice.h>
+
+
diff -ruN /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/GameController.framework/Headers/GCStylus.h /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/GameController.framework/Headers/GCStylus.h
--- /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/GameController.framework/Headers/GCStylus.h 1969-12-31 19:00:00
+++ /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/GameController.framework/Headers/GCStylus.h 2025-05-24 05:34:19
@@ -0,0 +1,170 @@
+//
+// GCStylus.h
+// GameController
+//
+// Copyright © 2025 Apple Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import <GameController/GCExtern.h>
+#import <GameController/GCDevice.h>
+
+
+@class GCDeviceHaptics;
+@protocol GCDevicePhysicalInput;
+
+NS_ASSUME_NONNULL_BEGIN
+
+/**
+ * A notification that posts after a stylus accessory connects to the device.
+ *
+ * Use this constant with `NSNotificationCenter` to listen to for stylus
+ * connection events.
+ *
+ * Connections of stylus accessories will be reflected in the `styli` array
+ * of the `GCStylus` class when the notification posts.
+ *
+ * The `object` property of the notification will contain the `GCStylus` that
+ * was connected.
+ */
+GAMECONTROLLER_EXPORT NSString * const GCStylusDidConnectNotification API_AVAILABLE(visionos(26.0)) API_UNAVAILABLE(macos, ios, tvos);
+
+/**
+ * A notification that posts after a stylus accessory disconnects from the
+ * device.
+ *
+ * Use this constant with `NSNotificationCenter` to listen to for stylus
+ * disconnection events.
+ *
+ * The `object` property of the notification will contain the `GCStylus` that
+ * was disconnected.
+ */
+GAMECONTROLLER_EXPORT NSString * const GCStylusDidDisconnectNotification API_AVAILABLE(visionos(26.0)) API_UNAVAILABLE(macos, ios, tvos);
+
+
+/**
+ * An object that represents a physical stylus connected to the device.
+ *
+ * Use the `styli` property to get the currently connect stylus accessories
+ * when your application starts. Register for `GCStylusDidConnectNotification`
+ * and `GCStylusDidDisconnectNotification` to get notified when a stylus
+ * connects of disconnects while your application is running.
+ *
+ * ```
+ * // Register for notifications
+ * NotificationCenter.default.addObserver(self, selector: #selector(stylus(didConnect:)), name: NSNotification.Name.GCStylusDidConnect, object: nil)
+ * NotificationCenter.default.addObserver(self, selector: #selector(stylus(didDisconnect:)), name: NSNotification.Name.GCStylusDidConnect, object: nil)
+ *
+ * // Query current stylus devices
+ * for stylus in GCStylus.styluses {
+ * ...
+ * }
+ *
+ * // Later, handle connection
+ * @objc func stylus(didConnect notification: Notification) {
+ * guard let stylus = notification.object as? GCStylus else { return }
+ * ...
+ * }
+ * ```
+ *
+ * Check the `productCategory` to determine the type of stylus. A spatial
+ * stylus - capable of 6DoF tracking by Apple Vision Pro - has a
+ * `GCProductCategorySpatialStylus` category.
+ *
+ * Use the `input` property to get the input profile of the stylus. A spatial
+ * stylus includes a pressure sensitive tip and an input cluster composed of
+ * two buttons.
+ *
+ * - The primary button (`GCInputStylusPrimaryButton`) is the front button
+ * (closest to the stylus tip) in the input cluster of the stylus. This
+ * button is frequently used grab virtual objects.
+ *
+ * - The secondary button (`GCInputStylusSecondaryButton`) is the middle
+ * button in the input cluster. It can measures pressure/force levels.
+ * It's intended to be used for controlling in-air drawing, selection,
+ * and generic interactions.
+ *
+ * - The tip is also represented as a button (`GCInputStylusTip`).
+ *
+ * ```
+ * guard let input = stylus.input else { return }
+ * input.inputStateQueueDepth = 20
+ * input.inputStateAvailableHandler = { input in
+ * // This block will be enqueued for execution when the state of
+ * // any stylus input changes.
+ *
+ * // Iterate through all input state changes since last execution of
+ * // the block.
+ * while let nextState = input.nextInputState() {
+ * // Use the value of `pressedInput.isPressed` for binary
+ * // interactions, such as object selection.
+ * let primaryButtonPressed = nextState.buttons[.stylusPrimaryButton]?.pressedInput.isPressed
+ * let secondaryButtonPressed = nextState.buttons[.stylusSecondaryButton]?.pressedInput.isPressed
+ * // Use the normalized press value for analog actions such as
+ * // controlling virtual ink flow.
+ * let secondaryButtonPressure = nextState.buttons[.stylusSecondaryButton]?.pressedInput.value
+ * let tipPressure = nextState.buttons[.stylusTip]?.pressedInput.value
+ *
+ * ...
+ * }
+ * }
+ * ```
+ *
+ * Use the `haptics` property to get the haptics profile of the stylus. A
+ * spatial stylus may optionally support haptic feedback to a single
+ * locality - `GCHapticsLocalityDefault`.
+ */
+API_AVAILABLE(visionos(26.0)) API_UNAVAILABLE(macos, ios, tvos)
+@interface GCStylus : NSObject <GCDevice>
+
+
+
+/**
+ * Gets the input profile for the stylus.
+ *
+ * The input profile is represented as an object conforming to the
+ * `GCDevicePhysicalInput` protocol. Use this object to discover available
+ * inputs on the stylus, including buttons and pressure sensors, and get
+ * notified when the state of those inputs change.
+ */
+@property (readonly, strong, nullable) id<GCDevicePhysicalInput> input;
+
+/**
+ * Gets the haptics profile for the stylus, if supported.
+ *
+ * The haptics profile is represented as a `GCDeviceHaptics` instance, from
+ * which you can create `CHHapticEngine` instances targeting the haptic
+ * actuator(s) in the accessory.
+ *
+ * Not all stylus accessories support haptic feedback. If the accessory
+ * does not support haptic feedback, this property is `nil`.
+ *
+ * @note
+ * Haptics are a drain on the accessory's battery, and can be distracting when
+ * used excessively. Use haptic feedback judiciously and in response to
+ * meaningful user interactions.
+ */
+@property (readonly, strong, nullable) GCDeviceHaptics *haptics;
+
+@end
+
+
+@interface GCStylus (Discovery)
+
+/**
+ * Get the collection of stylus accessories currently connected to the device.
+ *
+ * This property returns an array of all currently connected stylus accessories.
+ * The array is empty when no stylus accessories are connected. The array
+ * updates automatically as stylus accessories connect and disconnect.
+ *
+ * To be notified when the array changes, register for the
+ * `GCStylusDidConnectNotification` and `GCStylusDidDisconnectNotification`.
+ */
+@property (readonly, class) NSArray<GCStylus*> *styli;
+@property (readonly, class) NSArray<GCStylus*> *styluses API_DEPRECATED_WITH_REPLACEMENT("styli", visionos(26.0, 26.0));
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/GameController.framework/Headers/GameController.h /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/GameController.framework/Headers/GameController.h
--- /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/GameController.framework/Headers/GameController.h 2025-04-19 03:05:55
+++ /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/GameController.framework/Headers/GameController.h 2025-05-24 22:42:02
@@ -14,11 +14,13 @@
#import <GameController/GCProductCategories.h>
+
#import <GameController/GCDevice.h>
-#import <GameController/GCDevicePhysicalInput.h>
+#import <GameController/GCDevicePhysicalInput.h>
#import <GameController/GCPhysicalInputElement.h>
#import <GameController/GCPhysicalInputSource.h>
+#import <GameController/GCPhysicalInputExtents.h>
#import <GameController/GCLinearInput.h>
#import <GameController/GCAxisInput.h>
#import <GameController/GCAxis2DInput.h>
@@ -67,6 +69,9 @@
#import <GameController/GCDirectionalGamepad.h>
#import <GameController/GCController.h>
+#import <GameController/GCSpatialAccessory.h>
+#import <GameController/GCStylus.h>
+
#import <GameController/GCKeyboard.h>
#import <GameController/GCMouse.h>
@@ -77,13 +82,7 @@
#import <GameController/GCDeviceHaptics.h>
-
#import <GameController/GCEventViewController.h>
-#if __has_include(<UIKit/UIKit.h>)
-#import <GameController/GCEventInteraction.h>
-#import <GameController/GCGameControllerActivationContext.h>
-#import <GameController/GCGameControllerSceneDelegate.h>
-#endif
#if __has_include(<GameController/GCVirtualController.h>)
#import <GameController/GCVirtualController.h>
#endif