Skip to content

Commit

Permalink
[NetworkExtension] Add support for Xcode 15 (#19059)
Browse files Browse the repository at this point in the history
Support for TVOS was added

---------

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
  • Loading branch information
haritha-mohan and GitHub Actions Autoformatter authored Oct 2, 2023
1 parent 50309fe commit 5f905f2
Show file tree
Hide file tree
Showing 29 changed files with 250 additions and 961 deletions.
29 changes: 28 additions & 1 deletion src/NetworkExtension/NEEnums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ public enum NEVpnIkeAuthenticationMethod : long {
[MacCatalyst (13, 1)]
[Native ("NEVPNIKEv2EncryptionAlgorithm")]
public enum NEVpnIke2EncryptionAlgorithm : long {
[NoTV]
DES = 1,
[NoTV]
TripleDES = 2,
AES128 = 3,
AES256 = 4,
Expand All @@ -52,7 +54,9 @@ public enum NEVpnIke2EncryptionAlgorithm : long {
[MacCatalyst (13, 1)]
[Native ("NEVPNIKEv2IntegrityAlgorithm")]
public enum NEVpnIke2IntegrityAlgorithm : long {
[NoTV]
SHA96 = 1,
[NoTV]
SHA160 = 2,
SHA256 = 3,
SHA384 = 4,
Expand All @@ -73,8 +77,11 @@ public enum NEVpnIke2DeadPeerDetectionRate : long {
public enum NEVpnIke2DiffieHellman : long {
Invalid = 0,
Group0 = Invalid,
[NoTV]
Group1 = 1,
[NoTV]
Group2 = 2,
[NoTV]
Group5 = 5,
Group14 = 14,
Group15 = 15,
Expand All @@ -87,6 +94,8 @@ public enum NEVpnIke2DiffieHellman : long {
[iOS (13, 0)]
[MacCatalyst (13, 1)]
Group31 = 31,
[TV (17, 0), NoWatch, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)]
Group32 = 32,
}

[MacCatalyst (13, 1)]
Expand All @@ -104,6 +113,7 @@ public enum NEOnDemandRuleInterfaceType : long {
Any = 0,
Ethernet = 1,
WiFi = 2,
[NoTV]
Cellular = 3
}

Expand All @@ -121,12 +131,16 @@ public enum NEVpnIke2CertificateType : long {
ECDSA256 = 2,
ECDSA384 = 3,
ECDSA521 = 4,
[NoTV]
[iOS (13, 0)]
[MacCatalyst (13, 1)]
Ed25519 = 5,
[TV (17, 0), NoWatch, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)]
Rsapss = 6,
}

// in Xcode7 SDK but marked as 8.0
[NoTV]
[MacCatalyst (13, 1)]
[ErrorDomain ("NEFilterErrorDomain")]
[Native]
Expand Down Expand Up @@ -225,6 +239,7 @@ public enum NWUdpSessionState : long {
Cancelled = 5
}

[NoTV]
[MacCatalyst (13, 1)]
[Native]
public enum NETunnelProviderRoutingMethod : long {
Expand All @@ -236,6 +251,7 @@ public enum NETunnelProviderRoutingMethod : long {
}

#if !MONOMAC
[NoTV]
[NoMac]
[MacCatalyst (13, 1)]
[Native]
Expand All @@ -249,6 +265,7 @@ public enum NEHotspotHelperCommandType : long {
Logoff = 6
}

[NoTV]
[NoMac]
[MacCatalyst (13, 1)]
[Native]
Expand All @@ -258,6 +275,7 @@ public enum NEHotspotHelperConfidence : long {
High = 2
}

[NoTV]
[NoMac]
[MacCatalyst (13, 1)]
[Native]
Expand All @@ -283,7 +301,7 @@ public enum NEAppPushManagerError : long {
InactiveSession = 4,
}

[NoWatch, NoTV, Mac (11, 0), iOS (14, 0)]
[NoWatch, Mac (11, 0), iOS (14, 0)]
[MacCatalyst (14, 0)]
[Native ("NEDNSProtocol")]
public enum NEDnsProtocol : long {
Expand All @@ -303,4 +321,13 @@ public enum NEDnsSettingsManagerError : long {
CannotBeRemoved = 4,
}

[TV (17, 0), NoWatch, Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)]
[Native]
public enum NERelayManagerError : long {
Invalid = 1,
Disabled = 2,
Stale = 3,
CannotBeRemoved = 4,
}

}
2 changes: 1 addition & 1 deletion src/NetworkExtension/NEHotspotConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#nullable enable

#if !MONOMAC
#if !MONOMAC && !TVOS

using Foundation;

Expand Down
4 changes: 3 additions & 1 deletion src/NetworkExtension/NEHotspotEapSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@

#nullable enable

#if !MONOMAC
#if !MONOMAC && !TVOS
using System;
using Foundation;
using ObjCRuntime;

namespace NetworkExtension {

public partial class NEHotspotEapSettings {

public NEHotspotConfigurationEapType [] SupportedEapTypes {
Expand Down
2 changes: 1 addition & 1 deletion src/NetworkExtension/NEHotspotHelperOptions.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#nullable enable

#if !MONOMAC
#if !MONOMAC && !TVOS

using Foundation;

Expand Down
1 change: 1 addition & 0 deletions src/NetworkExtension/NEPacketTunnelFlow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ namespace NetworkExtension {
[SupportedOSPlatform ("ios")]
[SupportedOSPlatform ("maccatalyst")]
[SupportedOSPlatform ("macos")]
[SupportedOSPlatform ("tvos17.0")]
#endif
public class NEPacketTunnelFlowReadResult {

Expand Down
1 change: 1 addition & 0 deletions src/NetworkExtension/NEVpnConnectionStartOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ namespace NetworkExtension {
[SupportedOSPlatform ("ios")]
[SupportedOSPlatform ("maccatalyst")]
[SupportedOSPlatform ("macos")]
[SupportedOSPlatform ("tvos17.0")]
#endif
public class NEVpnConnectionStartOptions : DictionaryContainer {

Expand Down
1 change: 1 addition & 0 deletions src/build/generator-frameworks.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,7 @@ partial class Frameworks {
"MultipeerConnectivity",
"NaturalLanguage",
"Network",
"NetworkExtension",
"OpenGLES",
"OSLog",
"Photos",
Expand Down
1 change: 1 addition & 0 deletions src/frameworks.sources
Original file line number Diff line number Diff line change
Expand Up @@ -2318,6 +2318,7 @@ TVOS_FRAMEWORKS = \
MobileCoreServices \
ModelIO \
MultipeerConnectivity \
NetworkExtension \
OpenGLES \
Photos \
PhotosUI \
Expand Down
Loading

5 comments on commit 5f905f2

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

Please sign in to comment.