diff --git a/src/Network/NWProxyConfig.cs b/src/Network/NWProxyConfig.cs index ac31cc9ce96e..7363c52aad11 100644 --- a/src/Network/NWProxyConfig.cs +++ b/src/Network/NWProxyConfig.cs @@ -34,6 +34,7 @@ internal NWProxyConfig (NativeHandle handle, bool owns) : base (handle, owns) {} public NWProxyConfig (NativeHandle handle, bool owns) : base (handle, owns) { } #endif +#if !COREBUILD [DllImport (Constants.NetworkLibrary)] static extern OS_nw_proxy_config nw_proxy_config_create_relay (OS_nw_relay_hop first_hop, /* [NullAllowed] */ OS_nw_relay_hop second_hop); @@ -232,6 +233,7 @@ public void EnumerateExcludedDomains (Action handler) nw_proxy_config_enumerate_excluded_domains (GetCheckedHandle (), &block); } } +#endif // COREBUILD } } diff --git a/src/bgen/Caches/TypeCache.cs b/src/bgen/Caches/TypeCache.cs index 4cfd4bba4278..6da8cb5f211e 100644 --- a/src/bgen/Caches/TypeCache.cs +++ b/src/bgen/Caches/TypeCache.cs @@ -135,6 +135,7 @@ public class TypeCache { public Type NWEndpoint { get; } public Type NWInterface { get; } public Type NWParameters { get; } + public Type NWProxyConfig { get; } // optional if UIKit is present public Type? UIOffset { get; } @@ -297,6 +298,7 @@ public TypeCache (MetadataLoadContext universe, Frameworks frameworks, PlatformN NWEndpoint = Lookup (platformAssembly, "Network", "NWEndpoint"); NWInterface = Lookup (platformAssembly, "Network", "NWInterface"); NWParameters = Lookup (platformAssembly, "Network", "NWParameters"); + NWProxyConfig = Lookup (platformAssembly, "Network", "NWProxyConfig"); // init the NSValueCreateMap NSValueCreateMap = BuildNSValueCreateMap (frameworks); diff --git a/src/frameworks.sources b/src/frameworks.sources index 07e65017c298..563777303683 100644 --- a/src/frameworks.sources +++ b/src/frameworks.sources @@ -1372,6 +1372,7 @@ NETWORK_CORE_SOURCES = \ Network/NWEndpoint.cs \ Network/NWInterface.cs \ Network/NWParameters.cs \ + Network/NWProxyConfig.cs \ NETWORK_SOURCES = \ Network/NWAdvertiseDescriptor.cs \ @@ -1394,7 +1395,6 @@ NETWORK_SOURCES = \ Network/NWPrivacyContext.cs \ Network/NWProtocolFramerOptions.cs \ Network/NWProtocolIPOptions.cs \ - Network/NWProxyConfig.cs \ Network/NWPath.cs \ Network/NWPathMonitor.cs \ Network/NWPrivacyContext.cs \ diff --git a/src/webkit.cs b/src/webkit.cs index a48951edf953..fd2d1bf35ed0 100644 --- a/src/webkit.cs +++ b/src/webkit.cs @@ -27,6 +27,7 @@ using CoreGraphics; using ObjCRuntime; using JavaScriptCore; +using Network; using Security; #if MONOMAC @@ -4975,6 +4976,10 @@ interface WKWebsiteDataStore : NSSecureCoding { [Async] [Export ("fetchAllDataStoreIdentifiers:")] void FetchAllDataStoreIdentifiers (Action> completionHandler); + + [iOS (17, 0), Mac (14, 0), MacCatalyst (17, 0)] + [Export ("proxyConfigurations", ArgumentSemantic.Copy), NullAllowed] + NWProxyConfig [] ProxyConfigurations { get; set; } } [NoiOS, NoWatch, NoTV] diff --git a/tests/xtro-sharpie/api-annotations-dotnet/common-WebKit.ignore b/tests/xtro-sharpie/api-annotations-dotnet/common-WebKit.ignore deleted file mode 100644 index b94857831eb0..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/common-WebKit.ignore +++ /dev/null @@ -1,5 +0,0 @@ -# xcode 15 -# requires OS_nw_proxy_config type which has not been bound yet, part of Xcode 15 Network binding -!missing-selector! WKWebsiteDataStore::proxyConfigurations not bound -!missing-selector! WKWebsiteDataStore::setProxyConfigurations: not bound -