Skip to content

NetworkExtension iOS xcode13.0 beta1

Manuel de la Pena edited this page Aug 5, 2021 · 3 revisions

#NetworkExtension.framework https://github.com/xamarin/xamarin-macios/pull/12352

diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/NetworkExtension.framework/Headers/NEAppPushManager.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/NetworkExtension.framework/Headers/NEAppPushManager.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/NetworkExtension.framework/Headers/NEAppPushManager.h	2021-03-16 08:47:19.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/NetworkExtension.framework/Headers/NEAppPushManager.h	2021-06-02 12:43:57.000000000 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020 Apple Inc.
+ * Copyright (c) 2020-2021 Apple Inc.
  * All rights reserved.
  */
 
@@ -43,6 +43,33 @@
 } API_AVAILABLE(ios(14.0)) API_UNAVAILABLE(macos, tvos) __WATCHOS_PROHIBITED;
 
 /*!
+ * @interface NEPrivateLTENetwork
+ * @discussion The NEPrivateLTENetwork class declares an object that contains the parameters of a private LTE network.
+ */
+API_AVAILABLE(ios(15.0)) API_UNAVAILABLE(macos, tvos) __WATCHOS_PROHIBITED
+@interface NEPrivateLTENetwork : NSObject<NSCopying, NSSecureCoding>
+
+/*!
+ * @property mobileCountryCode
+ * @discussion Mobile Country Code of the private LTE network.
+ */
+@property (copy) NSString *mobileCountryCode API_AVAILABLE(ios(15.0)) API_UNAVAILABLE(macos, tvos) __WATCHOS_PROHIBITED;
+
+/*!
+ * @property mobileNetworkCode
+ * @discussion Mobile Network Code of the private LTE network.
+ */
+@property (copy) NSString *mobileNetworkCode API_AVAILABLE(ios(15.0)) API_UNAVAILABLE(macos, tvos) __WATCHOS_PROHIBITED;
+
+/*!
+ * @property trackingAreaCode
+ * @discussion Tracking Area Code of the private LTE network. This property is only applicable for band 48 private LTE networks.
+ */
+@property (copy, nullable) NSString *trackingAreaCode API_AVAILABLE(ios(15.0)) API_UNAVAILABLE(macos, tvos) __WATCHOS_PROHIBITED;
+
+@end
+
+/*!
  * @interface NEAppPushManager
  * @discussion The NEAppPushManager class declares a programmatic interface to configure NEAppPushProvider.
  *
@@ -57,11 +84,18 @@
 /*!
  * @property matchSSIDs
  * @discussion An array of Wi-Fi SSID strings. If the SSID string of current Wi-Fi network matches with one of these strings then the NEAppPushProvider
- *	is started. It is manadatory to provide at least one SSID to start the provider. The upper limit of number of SSIDs is 10.
+ *	is started. The upper limit of number of SSIDs is 10.
  */
 @property (copy) NSArray<NSString *> *matchSSIDs API_AVAILABLE(ios(14.0)) API_UNAVAILABLE(macos, tvos) __WATCHOS_PROHIBITED;
 
 /*!
+ * @property matchPrivateLTENetworks
+ * @discussion An array of NEPrivateLTENetwork objects. If the properties of current private LTE network match with properties of one of these NEPrivateLTENetwork objects then the
+ * NEAppPushProvider is started. The upper limit of number of private LTE networks is 10. For private LTE networks that are not band 48, the device must be supervised in order to perform the match
+ */
+@property (copy) NSArray<NEPrivateLTENetwork *> *matchPrivateLTENetworks API_AVAILABLE(ios(15.0)) API_UNAVAILABLE(macos, tvos) __WATCHOS_PROHIBITED;
+
+/*!
  * @property providerConfiguration
  * @discussion A dictionary containing vendor-specific key-value pairs, where the data type of values must be one of the data types supported by property list. Values of user defined data
  * 	type are not supported. This dictionary is passed as-is to NEAppPushProvider when is it is started or notified for other specified reasons.
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/NetworkExtension.framework/Headers/NEAppPushProvider.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/NetworkExtension.framework/Headers/NEAppPushProvider.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/NetworkExtension.framework/Headers/NEAppPushProvider.h	2021-03-16 08:47:18.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/NetworkExtension.framework/Headers/NEAppPushProvider.h	2021-06-02 12:46:53.000000000 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020 Apple Inc.
+ * Copyright (c) 2020-2021 Apple Inc.
  * All rights reserved.
  */
 
@@ -37,7 +37,14 @@
  * the subclass' implementation of this method must pass a non-nil NSError object to this block. A value of nil passed to the completion handler indicates that the connection
  * was successfully created.
  */
-- (void)startWithCompletionHandler:(void (^)(NSError * __nullable error))completionHandler API_AVAILABLE(ios(14.0)) API_UNAVAILABLE(macos, tvos) __WATCHOS_PROHIBITED;
+- (void)startWithCompletionHandler:(void (^)(NSError * __nullable error))completionHandler NS_SWIFT_DISABLE_ASYNC API_DEPRECATED_WITH_REPLACEMENT("start", ios(14.0, API_TO_BE_DEPRECATED)) API_UNAVAILABLE(macos, tvos) __WATCHOS_PROHIBITED;
+
+/*!
+ * @method start
+ * @discussion This method is called by the framework when the provider is started. Subclasses must override this method to create a connection with its server.
+ */
+- (void)start API_AVAILABLE(ios(15.0)) API_UNAVAILABLE(macos, tvos) __WATCHOS_PROHIBITED;
+
 
 /*!
  * @method stopWithReason:reason:completionHandler:
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/NetworkExtension.framework/Headers/NEFilterFlow.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/NetworkExtension.framework/Headers/NEFilterFlow.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/NetworkExtension.framework/Headers/NEFilterFlow.h	2021-03-16 05:18:14.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/NetworkExtension.framework/Headers/NEFilterFlow.h	2021-06-02 07:35:45.000000000 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016, 2018, 2020 Apple Inc.
+ * Copyright (c) 2015, 2016, 2018, 2020, 2021 Apple Inc.
  * All rights reserved.
  */
 
@@ -59,7 +59,7 @@
 
 /*!
  *	@property direction
- *	@discussion Initial direciton of the flow (outgoing or incoming flow)
+ *	@discussion Initial direction of the flow (outgoing or incoming flow)
  */
 @property (readonly) NETrafficDirection direction API_AVAILABLE(macos(10.15), ios(13.0)) API_UNAVAILABLE(tvos) __WATCHOS_PROHIBITED;
 
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/NetworkExtension.framework/Headers/NEHotspotNetwork.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/NetworkExtension.framework/Headers/NEHotspotNetwork.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/NetworkExtension.framework/Headers/NEHotspotNetwork.h	2021-03-16 08:47:18.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/NetworkExtension.framework/Headers/NEHotspotNetwork.h	2021-06-02 12:46:53.000000000 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020 Apple Inc.
+ * Copyright (c) 2020-2021 Apple Inc.
  * All rights reserved.
  */
 
@@ -10,6 +10,24 @@
 NS_ASSUME_NONNULL_BEGIN
 
 /*!
+ * @typedef NEHotspotNetworkSecurityType
+ * @abstract Wi-Fi network security type
+ */
+typedef NS_ENUM(NSInteger, NEHotspotNetworkSecurityType) {
+	/*! @const NEHotspotNetworkSecurityTypeOpen Open security type */
+	NEHotspotNetworkSecurityTypeOpen = 0,
+	/*! @const NEHotspotNetworkSecurityTypeWEP WEP security type */
+	NEHotspotNetworkSecurityTypeWEP = 1,
+	/*! @const NEHotspotNetworkSecurityTypeWPA WPA/WPA2/WPA3 using pre-shared secret */
+	NEHotspotNetworkSecurityTypePersonal = 2,
+	/*! @const NEHotspotNetworkSecurityTypeEnterprise WPA/WPA2/WPA3 using enterprise level security */
+	NEHotspotNetworkSecurityTypeEnterprise = 3,
+	/*! @const NEHotspotNetworkSecurityTypeUnknown Unknown security type*/
+	NEHotspotNetworkSecurityTypeUnknown = 4
+} API_AVAILABLE(ios(15.0), watchos(8.0), macCatalyst(15.0)) API_UNAVAILABLE(macos, tvos);
+
+
+/*!
  * @file NEHotspotNetwork.h
  * @discussion This file declares the NEHotspotNetwork API. The NEHotspotNetwork API is used to find SSID and BSSID of the current Wi-Fi network.
  */
@@ -27,21 +45,28 @@
 
 /*!
  * @property SSID
- * @discussion The SSID for the Wi-Fi network.
+ * @discussion The SSID of the Wi-Fi network.
  */
 @property (readonly) NSString * SSID
 API_AVAILABLE(ios(9.0), watchos(7.0), macCatalyst(14.0)) API_UNAVAILABLE(macos, tvos);
 
 /*!
  * @property BSSID
- * @discussion The BSSID for the Wi-Fi network.
+ * @discussion The BSSID of the Wi-Fi network.
  */
 @property (readonly) NSString * BSSID
 API_AVAILABLE(ios(9.0), watchos(7.0), macCatalyst(14.0)) API_UNAVAILABLE(macos, tvos);
 
 /*!
+ * @property securityType
+ * @discussion The security type of the Wi-Fi network.
+ */
+@property (readonly) NEHotspotNetworkSecurityType securityType
+API_AVAILABLE(ios(15.0), watchos(8.0), macCatalyst(15.0)) API_UNAVAILABLE(macos, tvos);
+
+/*!
  * @method fetchCurrentWithCompletionHandler:completionHandler:
- * @discussion This method returns SSID and BSSID of the current Wi-Fi network when the
+ * @discussion This method returns SSID, BSSID and security type of the current Wi-Fi network when the
  *   requesting application meets one of following 4 requirements -.
  *   1. application is using CoreLocation API and has user's authorization to access precise location.
  *   2. application has used NEHotspotConfiguration API to configure the current Wi-Fi network.
@@ -52,7 +77,7 @@
  * @param completionHandler A block that will be executed when current Wi-Fi network details are
  *   obtained from the system. The NEHotspotNetwork object passed to this block will be nil if the requesting
  *   application fails to meet above requirements, non-nil otherwise. NEHotspotNetwork object contains only valid
- *   SSID and BSSID values, when the block is passed non-nil object.This block is executed on application's
+ *   SSID, BSSID and security type values, when the block is passed non-nil object.This block is executed on application's
  *   main queue.
  */
 + (void)fetchCurrentWithCompletionHandler:(void (^)(NEHotspotNetwork * __nullable currentNetwork))completionHandler API_AVAILABLE(ios(14.0), watchos(7.0), macCatalyst(14.0)) API_UNAVAILABLE(macos, tvos);
Clone this wiki locally