-
Notifications
You must be signed in to change notification settings - Fork 543
AccessorySetupKit iOS xcode26.0 b1
Alex Soto edited this page Jun 9, 2025
·
1 revision
#AccessorySetupKit.framework
diff -ruN /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AccessorySetupKit.framework/Headers/ASAccessory.h /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AccessorySetupKit.framework/Headers/ASAccessory.h
--- /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AccessorySetupKit.framework/Headers/ASAccessory.h 2025-04-19 08:32:05
+++ /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AccessorySetupKit.framework/Headers/ASAccessory.h 2025-05-29 03:31:14
@@ -16,13 +16,15 @@
@class ASPickerDisplayItem;
//---------------------------------------------------------------------------------------------------------------------------
-/*! @brief Authorized Accessory State
-*/
+/// A type that defines values for the state of an accessory.
typedef NS_ENUM( NSInteger, ASAccessoryState )
{
- ASAccessoryStateUnauthorized = 0, // Invalid or Unauthorized Accessory.
- ASAccessoryStateAwaitingAuthorization = 10, // Selected by user but pending for full authorization.
- ASAccessoryStateAuthorized = 20, // Authorized and available Accessory.
+ /// The accessory is invalid or unauthorized.
+ ASAccessoryStateUnauthorized = 0,
+ /// The accessory is selected, but full authorization is still pending.
+ ASAccessoryStateAwaitingAuthorization = 10,
+ /// The accessory is authorized and available.
+ ASAccessoryStateAuthorized = 20,
} NS_SWIFT_NAME(ASAccessory.AccessoryState);
//---------------------------------------------------------------------------------------------------------------------------
@@ -49,6 +51,9 @@
ASAccessorySupportBluetoothHID API_AVAILABLE( ios( 18.4 ) ) = ( 1U << 3 ),
} NS_SWIFT_NAME(ASAccessory.SupportOptions);
+API_AVAILABLE( ios( 26.0 ) ) API_UNAVAILABLE(macos, macCatalyst, watchos, tvos, visionos)
+typedef uint64_t ASAccessoryWiFiAwarePairedDeviceID NS_SWIFT_NAME(ASAccessory.WiFiAwarePairedDeviceID);
+
AS_EXTERN
API_AVAILABLE( ios( 18.0 ) ) API_UNAVAILABLE(macos, macCatalyst, watchos, tvos, visionos)
NS_SWIFT_SENDABLE
@@ -72,6 +77,11 @@
///
/// Use this identifier to establish a connection to the accessory.
@property (readonly, copy, nullable, nonatomic) NSString *SSID;
+
+/// The accessory's Wi-Fi Aware Pairing Identifier.
+///
+/// Use this identifier to establish a connection to the accessory using Wi-Fi Aware Framework.
+@property (readonly, assign, nonatomic) ASAccessoryWiFiAwarePairedDeviceID wifiAwarePairedDeviceID API_AVAILABLE( ios( 26.0 ) );
/// The descriptor used to discover the accessory.
@property (readonly, copy, nonatomic) ASDiscoveryDescriptor *descriptor;
diff -ruN /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AccessorySetupKit.framework/Headers/ASAccessorySession.h /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AccessorySetupKit.framework/Headers/ASAccessorySession.h
--- /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AccessorySetupKit.framework/Headers/ASAccessorySession.h 2025-04-19 07:59:55
+++ /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AccessorySetupKit.framework/Headers/ASAccessorySession.h 2025-05-29 03:32:51
@@ -20,6 +20,7 @@
@class ASAccessorySession;
@class ASMigrationDisplayItem;
@class ASPickerDisplayItem;
+@class ASPickerDisplaySettings;
//===========================================================================================================================
/// Manages accessories.
@@ -33,6 +34,12 @@
/// To monitor for changes in this list, use your event handler to watch for the events ``ASAccessoryEventType/accessoryAdded``, ``ASAccessoryEventType/accessoryChanged``, and ``ASAccessoryEventType/accessoryRemoved``.
@property (readonly, copy, nonatomic) NSArray<ASAccessory *> *accessories;
+/// Settings that affect the display of the accessory picker.
+///
+/// Use this property to configure settings like the picker timeout.
+@property (readwrite, copy, nullable, nonatomic) ASPickerDisplaySettings *pickerDisplaySettings
+API_AVAILABLE( ios( 26.0 ) ) API_UNAVAILABLE(macos, macCatalyst, watchos, tvos, visionos);
+
/// Activate the session and start delivering events to an event handler.
/// - Parameters:
/// - queue: The dispatch the session uses to deliver events to `eventHandler`.
@@ -102,6 +109,20 @@
options:(ASAccessoryRenameOptions) renameOptions
completionHandler:(void(^)(NSError * _Nullable error)) completionHandler
NS_SWIFT_NAME(renameAccessory(_:options:completionHandler:));
+
+/// Displays a view to upgrade an accessory with additional technology permissions.
+///
+/// Call this method to upgrade previously-added SSID-based accessories to use WiFi Aware.
+///
+/// - Parameters:
+/// - accessory: The accessory to update.
+/// - descriptor: An updated descriptor that the picker uses to add new technology authorization for the provided accessory.
+/// - completionHandler: A block or closure that executes after the picker is shown. The completion handler receives an <doc://com.apple.documentation/documentation/Foundation/NSError> instance if the upgrade operation encounters an error. In Swift, you can omit the completion handler by calling the method asynchronously and catching any error thrown by the method.
+- (void) updateAuthorization:(ASAccessory *) accessory
+ descriptor:(ASDiscoveryDescriptor *) descriptor
+ 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);
@end
diff -ruN /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AccessorySetupKit.framework/Headers/ASCommon.h /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AccessorySetupKit.framework/Headers/ASCommon.h
--- /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AccessorySetupKit.framework/Headers/ASCommon.h 2025-04-19 08:32:04
+++ /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AccessorySetupKit.framework/Headers/ASCommon.h 2025-05-29 03:31:14
@@ -34,7 +34,35 @@
// MARK: == Constants and Types ==
+/// The type used to identify a Bluetooth accessory provider.
typedef uint16_t ASBluetoothCompanyIdentifier NS_TYPED_EXTENSIBLE_ENUM;
+
+// MARK: - Interfaces
+//===========================================================================================================================
+
+/// A type that specifies how to filter a property against a given string and comparison options.
+AS_EXTERN
+API_AVAILABLE( ios( 26.0 ) ) API_UNAVAILABLE(macos, macCatalyst, watchos, tvos, visionos)
+NS_SWIFT_SENDABLE
+@interface ASPropertyCompareString : NSObject <NSCopying, NSSecureCoding>
+
+/// The string to compare against.
+@property (readonly, copy, nonatomic) NSString *string;
+
+/// Comparison options to apply when comparing strings.
+@property (readonly, assign, nonatomic) NSStringCompareOptions compareOptions;
+
+/// Creates a property compare string instance with the given string and comparison options.
+/// - Parameters:
+/// - string: The string to compare against.
+/// - compareOptions: Options to apply when comparing strings.
+- (instancetype)initWithString:(NSString *) string compareOptions:(NSStringCompareOptions) compareOptions
+ NS_DESIGNATED_INITIALIZER;
+
+- (instancetype) init NS_UNAVAILABLE;
+- (instancetype) new NS_UNAVAILABLE;
+
+@end
#ifdef __cplusplus
}
diff -ruN /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AccessorySetupKit.framework/Headers/ASDiscoveryDescriptor.h /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AccessorySetupKit.framework/Headers/ASDiscoveryDescriptor.h
--- /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AccessorySetupKit.framework/Headers/ASDiscoveryDescriptor.h 2025-04-19 08:32:05
+++ /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AccessorySetupKit.framework/Headers/ASDiscoveryDescriptor.h 2025-05-29 03:32:51
@@ -28,6 +28,16 @@
ASDiscoveryDescriptorRangeImmediate = 10,
} NS_SWIFT_NAME(ASDiscoveryDescriptor.Range);
+//---------------------------------------------------------------------------------------------------------------------------
+/// A type that defines service roles for Wi-Fi Aware accessories.
+typedef NS_ENUM( NSInteger, ASDiscoveryDescriptorWiFiAwareServiceRole )
+{
+ /// The subscriber service role.
+ ASDiscoveryDescriptorWiFiAwareServiceRoleSubscriber = 10,
+ /// The publisher service role.
+ ASDiscoveryDescriptorWiFiAwareServiceRolePublisher = 20,
+} NS_SWIFT_NAME(ASDiscoveryDescriptor.WiFiAwareServiceRole);
+
AS_EXTERN
API_AVAILABLE( ios( 18.0 ) ) API_UNAVAILABLE(macos, macCatalyst, watchos, tvos, visionos)
NS_SWIFT_SENDABLE
@@ -69,6 +79,24 @@
/// The prefix string of SSID of the accessory's Wi-Fi network.
@property (readwrite, copy, nullable, nonatomic) NSString *SSIDPrefix;
+
+/// The accessory's Wi-Fi Aware's service name if available.
+@property (readwrite, copy, nullable, nonatomic) NSString *wifiAwareServiceName
+API_AVAILABLE( ios( 26.0 ) ) API_UNAVAILABLE(macos, macCatalyst, watchos, tvos, visionos);
+
+/// The role of the accessory's Wi-Fi Aware's service.
+///
+/// This property defaults to ``ASDiscoveryDescriptor/WiFiAwareServiceRole/subscriber``
+@property (readwrite, assign, nonatomic) ASDiscoveryDescriptorWiFiAwareServiceRole wifiAwareServiceRole
+API_AVAILABLE( ios( 26.0 ) ) API_UNAVAILABLE(macos, macCatalyst, watchos, tvos, visionos);
+
+/// The accessory's Wi-Fi Aware model name and matching options.
+@property (readwrite, copy, nullable, nonatomic) ASPropertyCompareString *wifiAwareModelNameMatch
+API_AVAILABLE( ios( 26.0 ) ) API_UNAVAILABLE(macos, macCatalyst, watchos, tvos, visionos);
+
+/// The accessory's Wi-Fi Aware vendor name and matching options.
+@property (readwrite, copy, nullable, nonatomic) ASPropertyCompareString *wifiAwareVendorNameMatch
+API_AVAILABLE( ios( 26.0 ) ) API_UNAVAILABLE(macos, macCatalyst, watchos, tvos, visionos);
@end
diff -ruN /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AccessorySetupKit.framework/Headers/ASPickerDisplayItem.h /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AccessorySetupKit.framework/Headers/ASPickerDisplayItem.h
--- /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AccessorySetupKit.framework/Headers/ASPickerDisplayItem.h 2025-04-19 08:32:05
+++ /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AccessorySetupKit.framework/Headers/ASPickerDisplayItem.h 2025-05-29 03:31:14
@@ -81,6 +81,10 @@
/// 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.0 ) );
+
@end
NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AccessorySetupKit.framework/Headers/ASPickerDisplaySettings.h /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AccessorySetupKit.framework/Headers/ASPickerDisplaySettings.h
--- /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AccessorySetupKit.framework/Headers/ASPickerDisplaySettings.h 1969-12-31 19:00:00
+++ /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AccessorySetupKit.framework/Headers/ASPickerDisplaySettings.h 2025-05-29 03:31:14
@@ -0,0 +1,41 @@
+/*
+ Copyright (C) 2025 Apple Inc. All Rights Reserved.
+*/
+
+#pragma once
+
+#ifndef ACCESSORY_SETUP_KIT_INDIRECT_INCLUDES
+#error "Please #import <AccessorySetupKit/AccessorySetupKit.h> instead of this file directly."
+#endif
+
+#import <Foundation/Foundation.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+//---------------------------------------------------------------------------------------------------------------------------
+
+/// The type used for the accessory picker's discovery timeout value.
+typedef NSTimeInterval ASPickerDisplaySettingsDiscoveryTimeout NS_TYPED_ENUM NS_SWIFT_NAME(ASPickerDisplaySettings.DiscoveryTimeout) API_AVAILABLE( ios( 26.0 ) );
+
+/// A picker discovery timeout value that times out after about about 60 seconds.
+AS_EXTERN ASPickerDisplaySettingsDiscoveryTimeout const ASPickerDisplaySettingsDiscoveryTimeoutShort API_AVAILABLE( ios( 26.0 ) );
+/// A picker discovery timeout value that times out after about two minutes.
+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 type that contains settings to customize the display of the accessory picker
+AS_EXTERN
+API_AVAILABLE( ios( 26.0 ) ) API_UNAVAILABLE(macos, macCatalyst, watchos, tvos, visionos)
+NS_SWIFT_SENDABLE
+@interface ASPickerDisplaySettings : NSObject
+
+/// An empty settings object.
+@property (class, readonly, nonatomic) ASPickerDisplaySettings *defaultSettings;
+
+/// Custom timeout for picker. Default is 30 seconds.
+@property (readwrite, assign, nonatomic) ASPickerDisplaySettingsDiscoveryTimeout discoveryTimeout;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AccessorySetupKit.framework/Headers/AccessorySetupKit.h /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AccessorySetupKit.framework/Headers/AccessorySetupKit.h
--- /Applications/Xcode_16.4.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AccessorySetupKit.framework/Headers/AccessorySetupKit.h 2025-04-19 08:32:04
+++ /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/AccessorySetupKit.framework/Headers/AccessorySetupKit.h 2025-05-29 03:31:14
@@ -16,5 +16,6 @@
#import <AccessorySetupKit/ASAccessorySettings.h>
#import <AccessorySetupKit/ASDiscoveryDescriptor.h>
#import <AccessorySetupKit/ASPickerDisplayItem.h>
+#import <AccessorySetupKit/ASPickerDisplaySettings.h>
#undef ACCESSORY_SETUP_KIT_INDIRECT_INCLUDES