Skip to content

ThreadNetwork iOS xcode27.3 b1

Alex Soto edited this page Nov 4, 2026 · 1 revision

#ThreadNetwork.framework

diff -ruN /Applications/Xcode_27.2.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ThreadNetwork.framework/Headers/THClient.h /Applications/Xcode_27.3.0-beta1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ThreadNetwork.framework/Headers/THClient.h
--- /Applications/Xcode_27.2.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ThreadNetwork.framework/Headers/THClient.h	2026-10-04 01:03:41
+++ /Applications/Xcode_27.3.0-beta1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ThreadNetwork.framework/Headers/THClient.h	2026-11-04 09:32:25
@@ -7,6 +7,7 @@
 
 #import <Foundation/Foundation.h>
 #import <ThreadNetwork/THCredentials.h>
+#import <ThreadNetwork/THNearbyNetworkCredentials.h>
 
 NS_ASSUME_NONNULL_BEGIN
 
@@ -102,7 +103,37 @@
 /// > ```
 /// >
 /// > For information about concurrency and asynchronous code in Swift, see <doc://com.apple.documentation/documentation/swift/calling-objective-c-apis-asynchronously>.
-- (void)retrieveActiveCredentialsForNearbyNetworksWithCompletion:(void (^)(NSSet<THCredentials*>* _Nullable credentials, NSError* _Nullable error))completion API_AVAILABLE(ios(27.0)) NS_SWIFT_ASYNC_NAME(getter:activeCredentialsForNearbyNetworks());
+///
+/// - Important: Deprecated in iOS 27.3. Use ``retrieveNearbyNetworkCredentialsWithCompletion:`` instead,
+///   which also returns a new data type, where credentials from preferred networks can be differentiated from the rest.
+- (void)retrieveActiveCredentialsForNearbyNetworksWithCompletion:(void (^)(NSSet<THCredentials*>* _Nullable credentials, NSError* _Nullable error))completion API_DEPRECATED_WITH_REPLACEMENT("retrieveNearbyNetworkCredentialsWithCompletion:", ios(27.0, 27.3)) NS_SWIFT_ASYNC_NAME(getter:activeCredentialsForNearbyNetworks());
+
+/// Retrieves credentials for the active Thread networks nearby.
+///
+/// You receive all credentials agnostic to team ID.
+/// Unlike ``retrieveAllActiveCredentials:``, this method returns active credentials
+/// on the device regardless of which app actually stored them.
+///
+/// Check the ``isPreferredNetworkCredentials`` property on each ``THNearbyNetworkCredentials`` instance to
+/// see whether it belongs to the preferred network. It is `NO` on every instance not matching the preferred network.
+///
+/// - Parameters:
+///   - completion: The completion handler the framework calls when the
+///     credentials become available.
+///
+/// - Note: This method asks for user permission to share available credentials.
+///         If user denies the permission then the completion will contain error with code 15.
+///
+/// > Concurrency Note: You can call this method from synchronous code using a completion handler,
+/// > as shown on this page, or you can call it as an asynchronous method that has the
+/// > following declaration:
+/// >
+/// > ```swift
+/// > var nearbyNetworkCredentials: Set<THNearbyNetworkCredentials> { get async throws }
+/// > ```
+/// >
+/// > For information about concurrency and asynchronous code in Swift, see <doc://com.apple.documentation/documentation/swift/calling-objective-c-apis-asynchronously>.
+- (void)retrieveNearbyNetworkCredentialsWithCompletion:(void (^)(NSSet<THNearbyNetworkCredentials*>* _Nullable credentials, NSError* _Nullable error))completion API_AVAILABLE(ios(27.3)) NS_SWIFT_ASYNC_NAME(getter:nearbyNetworkCredentials());
 
 /// Deletes Thread network credentials from the framework database for a Border
 /// Agent.
diff -ruN /Applications/Xcode_27.2.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ThreadNetwork.framework/Headers/THNearbyNetworkCredentials.h /Applications/Xcode_27.3.0-beta1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ThreadNetwork.framework/Headers/THNearbyNetworkCredentials.h
--- /Applications/Xcode_27.2.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ThreadNetwork.framework/Headers/THNearbyNetworkCredentials.h	1970-01-01 01:00:00
+++ /Applications/Xcode_27.3.0-beta1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ThreadNetwork.framework/Headers/THNearbyNetworkCredentials.h	2026-11-04 09:32:25
@@ -0,0 +1,29 @@
+//
+//  THNearbyNetworkCredentials.h
+//  ThreadNetwork
+//
+//  Created by Roman Onyshkevych on 10/1/26.
+//  Copyright © 2026 Apple. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <ThreadNetwork/THCredentials.h>
+
+
+NS_ASSUME_NONNULL_BEGIN
+
+extern __attribute__((visibility ("default")))
+
+/// Credentials for a Thread network discovered nearby
+API_AVAILABLE(ios(27.3))
+@interface THNearbyNetworkCredentials : THCredentials
+
+/// A Boolean value that indicates whether these credentials belong to the preferred network.
+///
+/// `YES` when this nearby network is the user/system-preferred network to join, `NO` otherwise.
+/// - Note: The value is a snapshot and doesn't update if the preferred network changes.
+@property (assign, nonatomic, readonly) BOOL isPreferredNetworkCredentials;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_27.2.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ThreadNetwork.framework/Headers/ThreadNetwork.h /Applications/Xcode_27.3.0-beta1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ThreadNetwork.framework/Headers/ThreadNetwork.h
--- /Applications/Xcode_27.2.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ThreadNetwork.framework/Headers/ThreadNetwork.h	2026-10-04 01:59:21
+++ /Applications/Xcode_27.3.0-beta1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ThreadNetwork.framework/Headers/ThreadNetwork.h	2026-11-04 09:32:25
@@ -7,3 +7,4 @@
 
 #import <Foundation/Foundation.h>
 #import <ThreadNetwork/THClient.h>
+#import <ThreadNetwork/THNearbyNetworkCredentials.h>

Clone this wiki locally