Skip to content

Commit eb0ba37

Browse files
authored
[NetworkExtension] Update to Xcode 26 beta 1-6. (#23698)
1 parent d2088eb commit eb0ba37

File tree

8 files changed

+107
-55
lines changed

8 files changed

+107
-55
lines changed

src/NetworkExtension/NEEnums.cs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,15 @@ public enum NEVpnIkeAuthenticationMethod : long {
6161
public enum NEVpnIke2EncryptionAlgorithm : long {
6262
/// <summary>To be added.</summary>
6363
[NoTV]
64+
[Deprecated (PlatformName.iOS, 26, 0, "Not supported anymore.")]
65+
[Deprecated (PlatformName.MacOSX, 26, 0, "Not supported anymore.")]
66+
[Deprecated (PlatformName.MacCatalyst, 26, 0, "Not supported anymore.")]
6467
DES = 1,
6568
/// <summary>To be added.</summary>
6669
[NoTV]
70+
[Deprecated (PlatformName.iOS, 26, 0, "Not supported anymore.")]
71+
[Deprecated (PlatformName.MacOSX, 26, 0, "Not supported anymore.")]
72+
[Deprecated (PlatformName.MacCatalyst, 26, 0, "Not supported anymore.")]
6773
TripleDES = 2,
6874
/// <summary>To be added.</summary>
6975
AES128 = 3,
@@ -87,9 +93,15 @@ public enum NEVpnIke2EncryptionAlgorithm : long {
8793
public enum NEVpnIke2IntegrityAlgorithm : long {
8894
/// <summary>Indicates the SHA-1 96-bit algorithm.</summary>
8995
[NoTV]
96+
[Deprecated (PlatformName.iOS, 26, 0, "Not supported anymore.")]
97+
[Deprecated (PlatformName.MacOSX, 26, 0, "Not supported anymore.")]
98+
[Deprecated (PlatformName.MacCatalyst, 26, 0, "Not supported anymore.")]
9099
SHA96 = 1,
91100
/// <summary>Indicates the SHA-1 160-bit algorithm.</summary>
92101
[NoTV]
102+
[Deprecated (PlatformName.iOS, 26, 0, "Not supported anymore.")]
103+
[Deprecated (PlatformName.MacOSX, 26, 0, "Not supported anymore.")]
104+
[Deprecated (PlatformName.MacCatalyst, 26, 0, "Not supported anymore.")]
93105
SHA160 = 2,
94106
/// <summary>Indicates the SHA-2 256-bit algorithm.</summary>
95107
SHA256 = 3,
@@ -125,12 +137,21 @@ public enum NEVpnIke2DiffieHellman : long {
125137
Group0 = Invalid,
126138
/// <summary>To be added.</summary>
127139
[NoTV]
140+
[Deprecated (PlatformName.iOS, 26, 0, "Groups less than 14 are not supported anymore.")]
141+
[Deprecated (PlatformName.MacOSX, 26, 0, "Groups less than 14 are not supported anymore.")]
142+
[Deprecated (PlatformName.MacCatalyst, 26, 0, "Groups less than 14 are not supported anymore.")]
128143
Group1 = 1,
129144
/// <summary>To be added.</summary>
130145
[NoTV]
146+
[Deprecated (PlatformName.iOS, 26, 0, "Groups less than 14 are not supported anymore.")]
147+
[Deprecated (PlatformName.MacOSX, 26, 0, "Groups less than 14 are not supported anymore.")]
148+
[Deprecated (PlatformName.MacCatalyst, 26, 0, "Groups less than 14 are not supported anymore.")]
131149
Group2 = 2,
132150
/// <summary>To be added.</summary>
133151
[NoTV]
152+
[Deprecated (PlatformName.iOS, 26, 0, "Groups less than 14 are not supported anymore.")]
153+
[Deprecated (PlatformName.MacOSX, 26, 0, "Groups less than 14 are not supported anymore.")]
154+
[Deprecated (PlatformName.MacCatalyst, 26, 0, "Groups less than 14 are not supported anymore.")]
134155
Group5 = 5,
135156
/// <summary>To be added.</summary>
136157
Group14 = 14,

src/networkextension.cs

Lines changed: 67 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -700,6 +700,10 @@ interface NEDnsSettings : NSSecureCoding, NSCopying {
700700
[Notification]
701701
[Field ("NEDNSSettingsConfigurationDidChangeNotification")]
702702
NSString ConfigurationDidChangeNotification { get; }
703+
704+
[TV (26, 0), MacCatalyst (26, 0), Mac (26, 0), iOS (26, 0)]
705+
[Export ("allowFailover")]
706+
bool AllowFailover { get; set; }
703707
}
704708

705709
/// <summary>Provides filter flow control information to a <see cref="NetworkExtension.NEFilterDataProvider" />.</summary>
@@ -1408,6 +1412,8 @@ interface NEFlowMetaData : NSCopying, NSSecureCoding {
14081412
[NoMac]
14091413
[MacCatalyst (13, 1)]
14101414
[BaseType (typeof (NSObject))]
1415+
[Deprecated (PlatformName.iOS, 26, 0, message: "Use 'NEHotspotManager' instead.")] // NEHotspotManager is swift only :/
1416+
[Deprecated (PlatformName.MacCatalyst, 26, 0, message: "Use 'NEHotspotManager' instead.")] // NEHotspotManager is swift only :/
14111417
interface NEHotspotHelper {
14121418
[Static]
14131419
[Internal]
@@ -1553,7 +1559,9 @@ interface NEHotspotHelperResponse {
15531559
void SetNetworkList (NEHotspotNetwork [] networkList);
15541560

15551561
/// <summary>Delivers the response.</summary>
1556-
/// <remarks>To be added.</remarks>
1562+
// deprecated, but the replacment API is Swift-only :/
1563+
[Deprecated (PlatformName.iOS, 26, 0, message: "Use 'NEHotspotEvaluationProvider.HandleCommand' or 'NEHotspotAuthenticationProvider.HandleCommand' instead.")]
1564+
[Deprecated (PlatformName.MacCatalyst, 26, 0, message: "Use 'NEHotspotEvaluationProvider.HandleCommand' or 'NEHotspotAuthenticationProvider.HandleCommand' instead.")]
15571565
[Export ("deliver")]
15581566
void Deliver ();
15591567
}
@@ -2604,7 +2612,11 @@ interface NEVpnProtocolIpSec {
26042612
/// <related type="externalDocumentation" href="https://developer.apple.com/library/ios/documentation/NetworkExtension/Reference/NEVPNIKEv2SecurityAssociationParametersClassRef/index.html">Apple documentation for <c>NEVPNIKEv2SecurityAssociationParameters</c></related>
26052613
[MacCatalyst (13, 1)]
26062614
[BaseType (typeof (NSObject), Name = "NEVPNIKEv2SecurityAssociationParameters")]
2615+
#if XAMCORE_5_0
2616+
interface NEVpnIkev2SecurityAssociationParameters : NSSecureCoding, NSCopying {
2617+
#else
26072618
interface NEVpnIke2SecurityAssociationParameters : NSSecureCoding, NSCopying {
2619+
#endif
26082620

26092621
/// <summary>Gets or sets the encryption algorithm for the Security Association.</summary>
26102622
/// <value>To be added.</value>
@@ -2629,14 +2641,23 @@ interface NEVpnIke2SecurityAssociationParameters : NSSecureCoding, NSCopying {
26292641
/// <remarks>To be added.</remarks>
26302642
[Export ("lifetimeMinutes")]
26312643
int LifetimeMinutes { get; set; } /* int32_t */
2644+
2645+
[TV (26, 0), MacCatalyst (26, 0), Mac (26, 0), iOS (26, 0)]
2646+
[Export ("postQuantumKeyExchangeMethods", ArgumentSemantic.Copy)]
2647+
[BindAs (typeof (NEVpnIkev2PostQuantumKeyExchangeMethod []))]
2648+
NSNumber [] PostQuantumKeyExchangeMethods { get; set; }
26322649
}
26332650

26342651
/// <summary>IKEv2 protocol information for VPN connections</summary>
26352652
/// <remarks>To be added.</remarks>
26362653
/// <related type="externalDocumentation" href="https://developer.apple.com/library/ios/documentation/NetworkExtension/Reference/NEVPNProtocolIKEv2ClassRef/index.html">Apple documentation for <c>NEVPNProtocolIKEv2</c></related>
26372654
[MacCatalyst (13, 1)]
26382655
[BaseType (typeof (NEVpnProtocolIpSec), Name = "NEVPNProtocolIKEv2")]
2656+
#if XAMCORE_5_0
2657+
interface NEVpnProtocolIkev2 {
2658+
#else
26392659
interface NEVpnProtocolIke2 {
2660+
#endif
26402661

26412662
/// <summary>Gets or sets the rate at which the IKEv2 client will attempt to detect dead peers.</summary>
26422663
/// <value>To be added.</value>
@@ -2753,6 +2774,10 @@ interface NEVpnProtocolIke2 {
27532774
[TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
27542775
[Export ("ppkConfiguration", ArgumentSemantic.Copy), NullAllowed]
27552776
NEVpnIkev2PpkConfiguration PpkConfiguration { get; set; }
2777+
2778+
[TV (26, 0), MacCatalyst (26, 0), Mac (26, 0), iOS (26, 0)]
2779+
[Export ("allowPostQuantumKeyExchangeFallback")]
2780+
bool AllowPostQuantumKeyExchangeFallback { get; set; }
27562781
}
27572782

27582783
/// <summary>Subclasses define rules for automatic connection to VPNs.</summary>
@@ -4663,6 +4688,10 @@ interface NEAppPushManager {
46634688
[NoTV, NoMac, iOS (15, 0), MacCatalyst (15, 0)]
46644689
[Export ("matchPrivateLTENetworks", ArgumentSemantic.Copy)]
46654690
NEPrivateLteNetwork [] MatchPrivateLteNetworks { get; set; }
4691+
4692+
[MacCatalyst (26, 0), NoTV, NoMac, iOS (26, 0)]
4693+
[Export ("matchEthernet")]
4694+
bool MatchEthernet { get; set; }
46664695
}
46674696

46684697
[NoTV, NoMac, iOS (14, 0)]
@@ -4697,6 +4726,10 @@ interface NEAppPushProvider {
46974726
[NoTV, NoMac, iOS (15, 0), MacCatalyst (15, 0)]
46984727
[Export ("start")]
46994728
void Start ();
4729+
4730+
[MacCatalyst (26, 0), NoTV, NoMac, iOS (26, 0)]
4731+
[Export ("unmatchEthernet")]
4732+
void UnmatchEthernet ();
47004733
}
47014734

47024735
[iOS (14, 0), TV (17, 0)]
@@ -4913,6 +4946,10 @@ interface NERelayManager {
49134946
[Export ("UIToggleEnabled")]
49144947
[TV (18, 4), Mac (15, 4), iOS (18, 4), MacCatalyst (18, 4)]
49154948
bool UIToggleEnabled { [Bind ("isUIToggleEnabled")] get; set; }
4949+
4950+
[TV (26, 0), MacCatalyst (26, 0), Mac (26, 0), iOS (26, 0)]
4951+
[Export ("allowDNSFailover")]
4952+
bool AllowDNSFailover { [Bind ("isDNSFailoverAllowed")] get; set; }
49164953
}
49174954

49184955
[TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
@@ -4946,4 +4983,33 @@ interface NEVpnIkev2PpkConfiguration : NSCopying {
49464983
[Export ("isMandatory")]
49474984
bool IsMandatory { get; set; }
49484985
}
4986+
4987+
4988+
[MacCatalyst (26, 0), NoTV, Mac (26, 0), iOS (26, 0)]
4989+
[Native]
4990+
[NativeName ("NEURLFilterVerdict")]
4991+
public enum NEUrlFilterVerdict : long {
4992+
Unknown = 1,
4993+
Allow = 2,
4994+
Deny = 3,
4995+
}
4996+
4997+
[MacCatalyst (26, 0), NoTV, Mac (26, 0), iOS (26, 0)]
4998+
[BaseType (typeof (NSObject), Name = "NEURLFilter")]
4999+
[DisableDefaultCtor]
5000+
interface NEUrlFilter {
5001+
[Async]
5002+
[Static]
5003+
[Export ("verdictForURL:completionHandler:")]
5004+
void GetVerdict (NSUrl url, Action<NEUrlFilterVerdict> completionHandler);
5005+
}
5006+
5007+
[MacCatalyst (26, 0), TV (26, 0), Mac (26, 0), iOS (26, 0)]
5008+
[Native]
5009+
[NativeName ("NEVPNIKEv2PostQuantumKeyExchangeMethod")]
5010+
public enum NEVpnIkev2PostQuantumKeyExchangeMethod : long {
5011+
None = 0,
5012+
Method36 = 36,
5013+
Method37 = 37
5014+
}
49495015
}

tests/cecil-tests/Documentation.KnownFailures.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5473,6 +5473,9 @@ F:NetworkExtension.NETrafficDirection.Any
54735473
F:NetworkExtension.NETrafficDirection.Inbound
54745474
F:NetworkExtension.NETrafficDirection.Outbound
54755475
F:NetworkExtension.NETunnelProviderRoutingMethod.NetworkRule
5476+
F:NetworkExtension.NEUrlFilterVerdict.Allow
5477+
F:NetworkExtension.NEUrlFilterVerdict.Deny
5478+
F:NetworkExtension.NEUrlFilterVerdict.Unknown
54765479
F:NetworkExtension.NEVpnConnectionError.AuthenticationFailed
54775480
F:NetworkExtension.NEVpnConnectionError.ClientCertificateExpired
54785481
F:NetworkExtension.NEVpnConnectionError.ClientCertificateInvalid
@@ -5497,6 +5500,9 @@ F:NetworkExtension.NEVpnIke2CertificateType.Rsapss
54975500
F:NetworkExtension.NEVpnIke2DiffieHellman.Group31
54985501
F:NetworkExtension.NEVpnIke2DiffieHellman.Group32
54995502
F:NetworkExtension.NEVpnIke2EncryptionAlgorithm.ChaCha20Poly1305
5503+
F:NetworkExtension.NEVpnIkev2PostQuantumKeyExchangeMethod.Method36
5504+
F:NetworkExtension.NEVpnIkev2PostQuantumKeyExchangeMethod.Method37
5505+
F:NetworkExtension.NEVpnIkev2PostQuantumKeyExchangeMethod.None
55005506
F:ObjCRuntime.Dlfcn.Mode.First
55015507
F:ObjCRuntime.Dlfcn.Mode.Global
55025508
F:ObjCRuntime.Dlfcn.Mode.Lazy
@@ -15357,6 +15363,7 @@ M:NetworkExtension.NEAppPushProvider.Start(System.Action{Foundation.NSError})
1535715363
M:NetworkExtension.NEAppPushProvider.StartAsync
1535815364
M:NetworkExtension.NEAppPushProvider.Stop(NetworkExtension.NEProviderStopReason,System.Action)
1535915365
M:NetworkExtension.NEAppPushProvider.StopAsync(NetworkExtension.NEProviderStopReason)
15366+
M:NetworkExtension.NEAppPushProvider.UnmatchEthernet
1536015367
M:NetworkExtension.NEDnsProxyProvider.HandleNewUdpFlow(NetworkExtension.NEAppProxyUdpFlow,NetworkExtension.NWEndpoint)
1536115368
M:NetworkExtension.NEDnsProxyProvider.HandleNewUdpFlowWithInitialFlowEndPoint(NetworkExtension.NEAppProxyUdpFlow,Network.NWEndpoint)
1536215369
M:NetworkExtension.NEDnsSettingsManager.LoadFromPreferences(System.Action{Foundation.NSError})
@@ -15408,6 +15415,8 @@ M:NetworkExtension.NETransparentProxyManager.LoadAllFromPreferences(System.Actio
1540815415
M:NetworkExtension.NETransparentProxyManager.LoadAllFromPreferencesAsync
1540915416
M:NetworkExtension.NETunnelProviderManager.CopyAppRules
1541015417
M:NetworkExtension.NETunnelProviderManager.CreatePerAppVpn
15418+
M:NetworkExtension.NEUrlFilter.GetVerdict(Foundation.NSUrl,System.Action{NetworkExtension.NEUrlFilterVerdict})
15419+
M:NetworkExtension.NEUrlFilter.GetVerdictAsync(Foundation.NSUrl)
1541115420
M:NetworkExtension.NEVpnConnection.FetchLastDisconnectError(System.Action{Foundation.NSError})
1541215421
M:NetworkExtension.NEVpnConnection.FetchLastDisconnectErrorAsync
1541315422
M:NetworkExtension.NEVpnIkev2PpkConfiguration.#ctor(System.String,Foundation.NSData)
@@ -23769,6 +23778,7 @@ P:NetworkExtension.NEAppPushManager.Active
2376923778
P:NetworkExtension.NEAppPushManager.Delegate
2377023779
P:NetworkExtension.NEAppPushManager.Enabled
2377123780
P:NetworkExtension.NEAppPushManager.LocalizedDescription
23781+
P:NetworkExtension.NEAppPushManager.MatchEthernet
2377223782
P:NetworkExtension.NEAppPushManager.MatchPrivateLteNetworks
2377323783
P:NetworkExtension.NEAppPushManager.MatchSsids
2377423784
P:NetworkExtension.NEAppPushManager.ProviderBundleIdentifier
@@ -23780,6 +23790,7 @@ P:NetworkExtension.NEDnsOverHttpsSettings.IdentityReference
2378023790
P:NetworkExtension.NEDnsOverHttpsSettings.ServerUrl
2378123791
P:NetworkExtension.NEDnsOverTlsSettings.IdentityReference
2378223792
P:NetworkExtension.NEDnsOverTlsSettings.ServerName
23793+
P:NetworkExtension.NEDnsSettings.AllowFailover
2378323794
P:NetworkExtension.NEDnsSettings.DnsProtocol
2378423795
P:NetworkExtension.NEDnsSettingsManager.DnsSettings
2378523796
P:NetworkExtension.NEDnsSettingsManager.Enabled
@@ -23839,6 +23850,7 @@ P:NetworkExtension.NERelay.IdentityDataPassword
2383923850
P:NetworkExtension.NERelay.RawPublicKeys
2384023851
P:NetworkExtension.NERelay.SyntheticDnsAnswerIPv4Prefix
2384123852
P:NetworkExtension.NERelay.SyntheticDnsAnswerIPv6Prefix
23853+
P:NetworkExtension.NERelayManager.AllowDNSFailover
2384223854
P:NetworkExtension.NERelayManager.Enabled
2384323855
P:NetworkExtension.NERelayManager.ExcludedDomains
2384423856
P:NetworkExtension.NERelayManager.ExcludedFqdns
@@ -23857,6 +23869,7 @@ P:NetworkExtension.NETunnelProviderManager.ContactsDomains
2385723869
P:NetworkExtension.NETunnelProviderManager.ExcludedDomains
2385823870
P:NetworkExtension.NETunnelProviderManager.MailDomains
2385923871
P:NetworkExtension.NETunnelProviderManager.SafariDomains
23872+
P:NetworkExtension.NEVpnIke2SecurityAssociationParameters.PostQuantumKeyExchangeMethods
2386023873
P:NetworkExtension.NEVpnIkev2PpkConfiguration.Identifier
2386123874
P:NetworkExtension.NEVpnIkev2PpkConfiguration.IsMandatory
2386223875
P:NetworkExtension.NEVpnIkev2PpkConfiguration.KeychainReference
@@ -23867,6 +23880,7 @@ P:NetworkExtension.NEVpnProtocol.ExcludeDeviceCommunication
2386723880
P:NetworkExtension.NEVpnProtocol.ExcludeLocalNetworks
2386823881
P:NetworkExtension.NEVpnProtocol.IncludeAllNetworks
2386923882
P:NetworkExtension.NEVpnProtocol.SliceUuid
23883+
P:NetworkExtension.NEVpnProtocolIke2.AllowPostQuantumKeyExchangeFallback
2387023884
P:NetworkExtension.NEVpnProtocolIke2.EnableFallback
2387123885
P:NetworkExtension.NEVpnProtocolIke2.Mtu
2387223886
P:NetworkExtension.NEVpnProtocolIke2.PpkConfiguration
@@ -28683,7 +28697,10 @@ T:NetworkExtension.NETrafficDirection
2868328697
T:NetworkExtension.NETransparentProxyManager
2868428698
T:NetworkExtension.NETransparentProxyNetworkSettings
2868528699
T:NetworkExtension.NETransparentProxyProvider
28700+
T:NetworkExtension.NEUrlFilter
28701+
T:NetworkExtension.NEUrlFilterVerdict
2868628702
T:NetworkExtension.NEVpnConnectionError
28703+
T:NetworkExtension.NEVpnIkev2PostQuantumKeyExchangeMethod
2868728704
T:NetworkExtension.NEVpnIkev2PpkConfiguration
2868828705
T:NetworkExtension.NEVpnIkev2TlsVersion
2868928706
T:NotificationCenter.NCWidgetListViewController

tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-NetworkExtension.todo

Lines changed: 0 additions & 15 deletions
This file was deleted.

tests/xtro-sharpie/api-annotations-dotnet/iOS-NetworkExtension.todo

Lines changed: 0 additions & 17 deletions
This file was deleted.

tests/xtro-sharpie/api-annotations-dotnet/macOS-NetworkExtension.todo

Lines changed: 0 additions & 12 deletions
This file was deleted.

tests/xtro-sharpie/api-annotations-dotnet/tvOS-NetworkExtension.ignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@
66

77
!unknown-field! NEAppProxyErrorDomain bound
88

9+
# headers are clear that NEURLFilter isn't available on tvOS, not sure why xtro thinks otherwise.
10+
!missing-type! NEURLFilter not bound

tests/xtro-sharpie/api-annotations-dotnet/tvOS-NetworkExtension.todo

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)