- Notifications
You must be signed in to change notification settings - Fork 548
AccessorySetupKit iOS xcode26.1 b1
Rolf Bjarne Kvinge edited this page Sep 25, 2025 · 3 revisions
#AccessorySetupKit.framework https://github.com/dotnet/macios/pull/23897
diff -ruN /Applications/Xcode_26.0.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AccessorySetupKit.framework/Headers/ASAccessory.h /Applications/Xcode_26.1.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AccessorySetupKit.framework/Headers/ASAccessory.h --- /Applications/Xcode_26.0.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AccessorySetupKit.framework/Headers/ASAccessory.h 2025-08-03 02:47:01 +++ /Applications/Xcode_26.1.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AccessorySetupKit.framework/Headers/ASAccessory.h 2025-09-12 23:33:34 @@ -88,4 +88,22 @@ @end +// MARK: - +//=========================================================================================================================== + +AS_EXTERN +API_AVAILABLE( ios( 26.1 ) ) API_UNAVAILABLE(macos, macCatalyst, watchos, tvos, visionos) +NS_SWIFT_SENDABLE +@interface ASDiscoveredAccessory : ASAccessory + +/// The Bluetooth advertisement data from the discovered accessory. +@property (readonly, copy, nullable, nonatomic) NSDictionary *bluetoothAdvertisementData; + +/// The Bluetooth RSSI (Received Signal Strength Indicator) value from the discovered accessory. +/// +/// This value represents the signal strength in dBm when the accessory was discovered. +@property (readonly, copy, nullable, nonatomic) NSNumber *bluetoothRSSI NS_REFINED_FOR_SWIFT; + +@end + NS_ASSUME_NONNULL_END diff -ruN /Applications/Xcode_26.0.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AccessorySetupKit.framework/Headers/ASAccessoryEvent.h /Applications/Xcode_26.1.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AccessorySetupKit.framework/Headers/ASAccessoryEvent.h --- /Applications/Xcode_26.0.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AccessorySetupKit.framework/Headers/ASAccessoryEvent.h 2025-08-03 02:47:01 +++ /Applications/Xcode_26.1.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AccessorySetupKit.framework/Headers/ASAccessoryEvent.h 2025-09-12 21:46:13 @@ -39,6 +39,8 @@ ASAccessoryEventTypeAccessoryRemoved = 31, // [ASAccessoryEvent] Accessory removed from system. /// The properties of an accessory changed. ASAccessoryEventTypeAccessoryChanged = 32, // [ASAccessoryEvent] Accessory properties changed. + /// The session discovered an accessory. + ASAccessoryEventTypeAccessoryDiscovered = 33, // [ASAccessoryEvent] Accessory discovered. /// The discovery session picker appeared. ASAccessoryEventTypePickerDidPresent = 40, // [ASAccessoryEvent] Picker did present. /// The discovery session picker dismissed. diff -ruN /Applications/Xcode_26.0.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AccessorySetupKit.framework/Headers/ASAccessorySession.h /Applications/Xcode_26.1.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AccessorySetupKit.framework/Headers/ASAccessorySession.h --- /Applications/Xcode_26.0.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AccessorySetupKit.framework/Headers/ASAccessorySession.h 2025-08-03 01:55:05 +++ /Applications/Xcode_26.1.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AccessorySetupKit.framework/Headers/ASAccessorySession.h 2025-09-12 23:33:34 @@ -18,6 +18,7 @@ @class ASDiscoveryDescriptor; @class ASAccessoryEvent; @class ASAccessorySession; +@class ASDiscoveredDisplayItem; @class ASMigrationDisplayItem; @class ASPickerDisplayItem; @class ASPickerDisplaySettings; @@ -123,6 +124,29 @@ completionHandler:(void(^)(NSError * _Nullable error)) completionHandler NS_SWIFT_NAME(updateAuthorization(for:descriptor:completionHandler:)) API_AVAILABLE( ios( 26.0 ) ) API_UNAVAILABLE(macos, macCatalyst, watchos, tvos, visionos); + +/// Updates the picker with app-filtered accessories. +/// +/// Call this method to update the picker to show app-filtered accessories with updated assets. +/// +/// - Parameters: +/// - accessories: the app-filtered accessories to show in the picker. +/// - completionHandler: A block or closure that executes after the updatePicker operation completes. The completion handler receives an <doc://com.apple.documentation/documentation/Foundation/NSError> instance if the operation encounters an error. + +- (void) updatePickerShowingDiscoveredDisplayItems:(NSArray<ASDiscoveredDisplayItem *> *)displayItems + completionHandler:(void(^)(NSError * _Nullable error)) completionHandler +NS_SWIFT_NAME(updatePicker(showing:completionHandler:)) +API_AVAILABLE( ios( 26.1 ) ) API_UNAVAILABLE(macos, macCatalyst, watchos, tvos, visionos); + +/// Finish the discovery session in the picker and show a timeout error. +/// +/// Call this method to finish the discovery session in the picker and show a timeout error if no desired accessories were found. Calling this method after picker has been updated with discovered accessories has no effect. +/// +/// - Parameters: +/// - completionHandler: A block or closure that executes after this operation completes. The completion handler receives an <doc://com.apple.documentation/documentation/Foundation/NSError> instance if the operation encounters an error. +- (void) finishPickerDiscovery:(void(^)(NSError * _Nullable error)) completionHandler +NS_SWIFT_NAME(finishPickerDiscovery(completionHandler:)) +API_AVAILABLE( ios( 26.1 ) ) API_UNAVAILABLE(macos, macCatalyst, watchos, tvos, visionos); @end diff -ruN /Applications/Xcode_26.0.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AccessorySetupKit.framework/Headers/ASPickerDisplayItem.h /Applications/Xcode_26.1.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AccessorySetupKit.framework/Headers/ASPickerDisplayItem.h --- /Applications/Xcode_26.0.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AccessorySetupKit.framework/Headers/ASPickerDisplayItem.h 2025-08-03 02:47:01 +++ /Applications/Xcode_26.1.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AccessorySetupKit.framework/Headers/ASPickerDisplayItem.h 2025-09-12 23:33:34 @@ -13,6 +13,7 @@ NS_ASSUME_NONNULL_BEGIN +@class ASDiscoveredAccessory; @class ASDiscoveryDescriptor; //--------------------------------------------------------------------------------------------------------------------------- @@ -81,6 +82,28 @@ /// The Wi-Fi hotspot SSID of the accessory to migrate. @property (readwrite, copy, nullable, nonatomic) NSString *hotspotSSID; +/// The Wi-Fi Aware paired device identififer of the accessory to migrate. +@property (readwrite, assign, nonatomic) ASAccessoryWiFiAwarePairedDeviceID wifiAwarePairedDeviceID +API_AVAILABLE( ios( 26.1 ) ); + +@end + +//=========================================================================================================================== + +AS_EXTERN +API_AVAILABLE( ios( 26.1 ) ) API_UNAVAILABLE(macos, macCatalyst, watchos, tvos, visionos) +NS_SWIFT_SENDABLE +@interface ASDiscoveredDisplayItem : ASPickerDisplayItem + +/// Creates a discovered picker display item with a name and image to display and a descriptor to match discovered accessories. +/// - Parameters: +/// - name: The accessory name to display in the picker. +/// - productImage: An image of the accessory to display in the picker. +/// - accessory: App filtered accessory to display in the picker. +- (instancetype)initWithName:(NSString *) name productImage:(UIImage *) productImage accessory:(ASDiscoveredAccessory *) accessory; + +- (instancetype)initWithName:(NSString *) name productImage:(UIImage *) productImage + descriptor:(ASDiscoveryDescriptor *) descriptor NS_UNAVAILABLE; @end NS_ASSUME_NONNULL_END diff -ruN /Applications/Xcode_26.0.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AccessorySetupKit.framework/Headers/ASPickerDisplaySettings.h /Applications/Xcode_26.1.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AccessorySetupKit.framework/Headers/ASPickerDisplaySettings.h --- /Applications/Xcode_26.0.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AccessorySetupKit.framework/Headers/ASPickerDisplaySettings.h 2025-08-03 02:47:01 +++ /Applications/Xcode_26.1.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AccessorySetupKit.framework/Headers/ASPickerDisplaySettings.h 2025-09-12 23:33:34 @@ -12,6 +12,15 @@ NS_ASSUME_NONNULL_BEGIN +//=========================================================================================================================== +/*! @brief Picker Options +*/ +typedef NS_OPTIONS( NSUInteger, ASPickerDisplaySettingsOptions ) +{ + /// An option to pass discovered accessories to the app for more custom filtering, before they're displayed in the picker for selection. + ASPickerDisplaySettingsOptionFilterDiscoveryResults = ( 1U << 0 ) +} NS_SWIFT_NAME(ASPickerDisplaySettings.Options); + //--------------------------------------------------------------------------------------------------------------------------- /// The type used for the accessory picker's discovery timeout value. @@ -23,6 +32,8 @@ AS_EXTERN ASPickerDisplaySettingsDiscoveryTimeout const ASPickerDisplaySettingsDiscoveryTimeoutMedium API_AVAILABLE( ios( 26.0 ) ); /// A picker discovery timeout value that times out after about five minutes. AS_EXTERN ASPickerDisplaySettingsDiscoveryTimeout const ASPickerDisplaySettingsDiscoveryTimeoutLong API_AVAILABLE( ios( 26.0 ) ); +/// A picker discovery that only times out when the app tells it to. +AS_EXTERN ASPickerDisplaySettingsDiscoveryTimeout const ASPickerDisplaySettingsDiscoveryTimeoutUnbounded API_AVAILABLE( ios( 26.1 ) ); /// A type that contains settings to customize the display of the accessory picker AS_EXTERN @@ -35,6 +46,9 @@ /// Custom timeout for picker. Default is 30 seconds. @property (readwrite, assign, nonatomic) ASPickerDisplaySettingsDiscoveryTimeout discoveryTimeout; + +/// Custom options for the picker. +@property (readwrite, assign, nonatomic) ASPickerDisplaySettingsOptions options API_AVAILABLE( ios( 26.1 ) ) API_UNAVAILABLE(macos, macCatalyst, watchos, tvos, visionos); @end