Merge remote-tracking branch 'xamarin/xcode11.3' into d16-5
This commit is contained in:
Коммит
01c1d04877
10
Make.config
10
Make.config
|
@ -59,9 +59,9 @@ IOS_PACKAGE_VERSION_BUILD=$(IOS_COMMIT_DISTANCE)
|
||||||
IOS_PACKAGE_UPDATE_ID=$(shell printf "2%02d%02d%02d%03d" $(IOS_PACKAGE_VERSION_MAJOR) $(IOS_PACKAGE_VERSION_MINOR) $(IOS_PACKAGE_VERSION_REV) $(IOS_PACKAGE_VERSION_BUILD))
|
IOS_PACKAGE_UPDATE_ID=$(shell printf "2%02d%02d%02d%03d" $(IOS_PACKAGE_VERSION_MAJOR) $(IOS_PACKAGE_VERSION_MINOR) $(IOS_PACKAGE_VERSION_REV) $(IOS_PACKAGE_VERSION_BUILD))
|
||||||
|
|
||||||
# Xcode version should have both a major and a minor version (even if the minor version is 0)
|
# Xcode version should have both a major and a minor version (even if the minor version is 0)
|
||||||
XCODE_VERSION=11.2
|
XCODE_VERSION=11.3
|
||||||
XCODE_URL=http://xamarin-storage/bot-provisioning/xcodes/Xcode_11.2.xip
|
XCODE_URL=http://xamarin-storage/bot-provisioning/xcodes/Xcode_11.3.xip
|
||||||
XCODE_DEVELOPER_ROOT=/Applications/Xcode112.app/Contents/Developer
|
XCODE_DEVELOPER_ROOT=/Applications/Xcode113.app/Contents/Developer
|
||||||
XCODE_PRODUCT_BUILD_VERSION:=$(shell /usr/libexec/PlistBuddy -c 'Print :ProductBuildVersion' $(XCODE_DEVELOPER_ROOT)/../version.plist)
|
XCODE_PRODUCT_BUILD_VERSION:=$(shell /usr/libexec/PlistBuddy -c 'Print :ProductBuildVersion' $(XCODE_DEVELOPER_ROOT)/../version.plist)
|
||||||
|
|
||||||
# Mono version embedded in XI/XM (NEEDED_MONO_VERSION/BRANCH) are specified in mk/mono.mk
|
# Mono version embedded in XI/XM (NEEDED_MONO_VERSION/BRANCH) are specified in mk/mono.mk
|
||||||
|
@ -106,9 +106,9 @@ TVOS_SDK_VERSION=13.2
|
||||||
# If the max OS version does not match the SDK version (for instance the iOS
|
# If the max OS version does not match the SDK version (for instance the iOS
|
||||||
# 12.2 SDK supported both iOS 12.3 and iOS 12.4), then these variables can be
|
# 12.2 SDK supported both iOS 12.3 and iOS 12.4), then these variables can be
|
||||||
# set to something other than the corresponding SDK versions.
|
# set to something other than the corresponding SDK versions.
|
||||||
MAX_IOS_VERSION=$(IOS_SDK_VERSION)
|
MAX_IOS_VERSION=13.3
|
||||||
MAX_WATCH_VERSION=$(WATCH_SDK_VERSION)
|
MAX_WATCH_VERSION=$(WATCH_SDK_VERSION)
|
||||||
MAX_TVOS_VERSION=$(TVOS_SDK_VERSION)
|
MAX_TVOS_VERSION=13.3
|
||||||
|
|
||||||
# Minimum OS versions for running XI/XM apps.
|
# Minimum OS versions for running XI/XM apps.
|
||||||
MIN_IOS_SDK_VERSION=7.0
|
MIN_IOS_SDK_VERSION=7.0
|
||||||
|
|
|
@ -43,5 +43,5 @@
|
||||||
# line changed in git).
|
# line changed in git).
|
||||||
#
|
#
|
||||||
|
|
||||||
IOS_PACKAGE_VERSION=13.14.0.$(IOS_COMMIT_DISTANCE)
|
IOS_PACKAGE_VERSION=13.14.1.$(IOS_COMMIT_DISTANCE)
|
||||||
MAC_PACKAGE_VERSION=6.14.0.$(MAC_COMMIT_DISTANCE)
|
MAC_PACKAGE_VERSION=6.14.1.$(MAC_COMMIT_DISTANCE)
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
<string>13.0</string>
|
<string>13.0</string>
|
||||||
<string>13.1</string>
|
<string>13.1</string>
|
||||||
<string>13.2</string>
|
<string>13.2</string>
|
||||||
|
<string>13.3</string>
|
||||||
</array>
|
</array>
|
||||||
<key>tvOS</key>
|
<key>tvOS</key>
|
||||||
<array>
|
<array>
|
||||||
|
@ -57,6 +58,7 @@
|
||||||
<string>12.4</string>
|
<string>12.4</string>
|
||||||
<string>13.0</string>
|
<string>13.0</string>
|
||||||
<string>13.2</string>
|
<string>13.2</string>
|
||||||
|
<string>13.3</string>
|
||||||
</array>
|
</array>
|
||||||
<key>watchOS</key>
|
<key>watchOS</key>
|
||||||
<array>
|
<array>
|
||||||
|
|
|
@ -755,3 +755,17 @@ disabling the managed linker.
|
||||||
|
|
||||||
The default behavior can be overridden by passing
|
The default behavior can be overridden by passing
|
||||||
`--optimize=[+|-]custom-attributes-removal` to `mtouch` or `mmp`.
|
`--optimize=[+|-]custom-attributes-removal` to `mtouch` or `mmp`.
|
||||||
|
|
||||||
|
## Experimental Xamarin.Forms.Platform.iOS ProductType inclusion
|
||||||
|
|
||||||
|
This optimization requires the linker to be enabled and is only applied
|
||||||
|
on `Xamarin.Forms.Platform.iOS.dll`.
|
||||||
|
|
||||||
|
This is **experimental** and might be removed or replaced in future
|
||||||
|
versions of Xamarin.iOS.
|
||||||
|
|
||||||
|
This optimization consider the assembly `Xamarin.Forms.Platform.iOS` as
|
||||||
|
a product assembly and does not automagically mark all `NSObject`
|
||||||
|
subclasses. This allows additional removes and optimizations to be
|
||||||
|
applied to the assembly, including the ability to remove `UIWebView` if
|
||||||
|
nothing else in the application requires it.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
NEEDED_MONO_VERSION := 062f0ab8cae60d1d347e4d722884c065c9f34484
|
NEEDED_MONO_VERSION := 3e882ed1a2013f756bdbe104c23e8ff54d5fa49c
|
||||||
NEEDED_MONO_BRANCH := 2019-08
|
NEEDED_MONO_BRANCH := 2019-08-xcode11.3
|
||||||
|
|
||||||
MONO_DIRECTORY := mono
|
MONO_DIRECTORY := mono
|
||||||
MONO_MODULE := https://github.com/mono/mono
|
MONO_MODULE := https://github.com/mono/mono
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
|
#if !XAMCORE_4_0
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
|
using Foundation;
|
||||||
using ObjCRuntime;
|
using ObjCRuntime;
|
||||||
|
|
||||||
namespace Metal {
|
namespace Metal {
|
||||||
|
@ -9,4 +12,43 @@ namespace Metal {
|
||||||
public MTLSharedTextureHandle () {}
|
public MTLSharedTextureHandle () {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if MONOMAC
|
||||||
|
public static partial class MTLDevice_Extensions {
|
||||||
|
[BindingImpl (BindingImplOptions.Optimizable)]
|
||||||
|
public static IMTLCounterSet[] GetIMTLCounterSets (this IMTLDevice This)
|
||||||
|
{
|
||||||
|
return NSArray.ArrayFromHandle<IMTLCounterSet>(global::ObjCRuntime.Messaging.IntPtr_objc_msgSend (This.Handle, Selector.GetHandle ("counterSets")));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Unavailable (PlatformName.iOS, PlatformArchitecture.All)]
|
||||||
|
[Unavailable (PlatformName.TvOS, PlatformArchitecture.All)]
|
||||||
|
[Introduced (PlatformName.MacOSX, 10,15, PlatformArchitecture.All)]
|
||||||
|
[BindingImpl (BindingImplOptions.Optimizable)]
|
||||||
|
public static IMTLCounterSampleBuffer CreateIMTLCounterSampleBuffer (this IMTLDevice This, MTLCounterSampleBufferDescriptor descriptor, out NSError error)
|
||||||
|
{
|
||||||
|
if (descriptor == null)
|
||||||
|
throw new ArgumentNullException ("descriptor");
|
||||||
|
IntPtr errorValue = IntPtr.Zero;
|
||||||
|
|
||||||
|
var ret = Runtime.GetINativeObject<IMTLCounterSampleBuffer> (global::ObjCRuntime.Messaging.IntPtr_objc_msgSend_IntPtr_ref_IntPtr (This.Handle, Selector.GetHandle ("newCounterSampleBufferWithDescriptor:error:"), descriptor.Handle, ref errorValue), owns: false);
|
||||||
|
error = Runtime.GetNSObject<NSError> (errorValue);
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static partial class MTLComputeCommandEncoder_Extensions {
|
||||||
|
[Unavailable (PlatformName.iOS, PlatformArchitecture.All)]
|
||||||
|
[Unavailable (PlatformName.TvOS, PlatformArchitecture.All)]
|
||||||
|
[Introduced (PlatformName.MacOSX, 10,15, PlatformArchitecture.All)]
|
||||||
|
[BindingImpl (BindingImplOptions.Optimizable)]
|
||||||
|
public static void SampleCounters (this IMTLComputeCommandEncoder This, IMTLCounterSampleBuffer sampleBuffer, nuint sampleIndex, bool barrier)
|
||||||
|
{
|
||||||
|
if (sampleBuffer == null)
|
||||||
|
throw new ArgumentNullException ("sampleBuffer");
|
||||||
|
global::ObjCRuntime.Messaging.void_objc_msgSend_IntPtr_nuint_bool (This.Handle, Selector.GetHandle ("sampleCountersInBuffer:atSampleIndex:withBarrier:"), sampleBuffer.Handle, sampleIndex, barrier);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // MONOMAC
|
||||||
}
|
}
|
||||||
|
#endif // !XAMCORE_4_0
|
||||||
|
|
|
@ -0,0 +1,193 @@
|
||||||
|
//
|
||||||
|
// NWEthernetChannel.cs: Bindings the Network nw_ethernet_channel_t API.
|
||||||
|
//
|
||||||
|
// Authors:
|
||||||
|
// Manuel de la Pena (mandel@microsoft.com)
|
||||||
|
//
|
||||||
|
// Copyright 2019 Microsoft
|
||||||
|
//
|
||||||
|
#if MONOMAC
|
||||||
|
using System;
|
||||||
|
using System.Text;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using ObjCRuntime;
|
||||||
|
using Foundation;
|
||||||
|
using CoreFoundation;
|
||||||
|
|
||||||
|
using OS_nw_ethernet_channel=System.IntPtr;
|
||||||
|
using OS_nw_interface=System.IntPtr;
|
||||||
|
using OS_dispatch_data=System.IntPtr;
|
||||||
|
|
||||||
|
namespace Network {
|
||||||
|
|
||||||
|
[NoWatch, NoTV, NoiOS, Mac (10,15)]
|
||||||
|
public delegate void NWEthernetChannelReceiveDelegate (DispatchData content, ushort vlanTag, string localAddress, string remoteAddress);
|
||||||
|
|
||||||
|
[NoWatch, NoTV, NoiOS, Mac (10,15)]
|
||||||
|
public enum NWEthernetChannelState
|
||||||
|
{
|
||||||
|
Invalid = 0,
|
||||||
|
Waiting = 1,
|
||||||
|
Preparing = 2,
|
||||||
|
Ready = 3,
|
||||||
|
Failed = 4,
|
||||||
|
Cancelled = 5,
|
||||||
|
}
|
||||||
|
|
||||||
|
[NoWatch, NoTV, NoiOS, Mac (10,15)]
|
||||||
|
public class NWEthernetChannel : NativeObject {
|
||||||
|
|
||||||
|
internal NWEthernetChannel (IntPtr handle, bool owns) : base (handle, owns) {}
|
||||||
|
|
||||||
|
[DllImport (Constants.NetworkLibrary)]
|
||||||
|
static extern OS_nw_ethernet_channel nw_ethernet_channel_create (ushort ether_type, OS_nw_interface networkInterface);
|
||||||
|
|
||||||
|
// we cannot pass an enum! As per docs in the headers:
|
||||||
|
// The custom EtherType to be used for all Ethernet frames in this channel. The
|
||||||
|
// EtherType is the two-octet field in an Ethernet frame, indicating the protocol
|
||||||
|
// encapsulated in the payload of the frame. This parameter is in little-endian
|
||||||
|
// byte order. Only custom EtherType values are supported. This parameter cannot
|
||||||
|
// be an EtherType already handled by the system, such as IPv4, IPv6, ARP, VLAN Tag,
|
||||||
|
// or 802.1x.
|
||||||
|
//
|
||||||
|
// Calling processes must hold the "com.apple.developer.networking.custom-protocol"
|
||||||
|
// entitlement.
|
||||||
|
public NWEthernetChannel (ushort ethernetType, NWInterface networkInterface)
|
||||||
|
{
|
||||||
|
if (networkInterface == null)
|
||||||
|
throw new ArgumentNullException (nameof (networkInterface));
|
||||||
|
|
||||||
|
InitializeHandle (nw_ethernet_channel_create (ethernetType, networkInterface.Handle));
|
||||||
|
}
|
||||||
|
|
||||||
|
[DllImport (Constants.NetworkLibrary)]
|
||||||
|
static extern void nw_ethernet_channel_start (OS_nw_ethernet_channel ethernet_channel);
|
||||||
|
|
||||||
|
public void Start () => nw_ethernet_channel_start (GetCheckedHandle ());
|
||||||
|
|
||||||
|
[DllImport (Constants.NetworkLibrary)]
|
||||||
|
static extern void nw_ethernet_channel_cancel (OS_nw_ethernet_channel ethernet_channel);
|
||||||
|
|
||||||
|
public void Cancel () => nw_ethernet_channel_cancel (GetCheckedHandle ());
|
||||||
|
|
||||||
|
[DllImport (Constants.NetworkLibrary)]
|
||||||
|
static extern void nw_ethernet_channel_set_queue (OS_nw_ethernet_channel ethernet_channel, IntPtr queue);
|
||||||
|
|
||||||
|
public void SetQueue (DispatchQueue queue)
|
||||||
|
{
|
||||||
|
if (queue == null)
|
||||||
|
throw new ArgumentNullException (nameof (queue));
|
||||||
|
nw_ethernet_channel_set_queue (GetCheckedHandle (), queue.Handle);
|
||||||
|
}
|
||||||
|
|
||||||
|
[DllImport (Constants.NetworkLibrary)]
|
||||||
|
static extern void nw_ethernet_channel_send (OS_nw_ethernet_channel ethernet_channel, OS_dispatch_data content, ushort vlan_tag, string remote_address, ref BlockLiteral completion);
|
||||||
|
|
||||||
|
delegate void nw_ethernet_channel_send_completion_t (IntPtr block, IntPtr error);
|
||||||
|
static nw_ethernet_channel_send_completion_t static_SendCompletion = TrampolineSendCompletion;
|
||||||
|
|
||||||
|
[MonoPInvokeCallback (typeof (nw_ethernet_channel_send_completion_t))]
|
||||||
|
static void TrampolineSendCompletion (IntPtr block, IntPtr error)
|
||||||
|
{
|
||||||
|
var del = BlockLiteral.GetTarget<Action<NWError>> (block);
|
||||||
|
if (del != null) {
|
||||||
|
var err = error == IntPtr.Zero ? null : new NWError (error, owns: false);
|
||||||
|
del (err);
|
||||||
|
err?.Dispose ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[BindingImpl (BindingImplOptions.Optimizable)]
|
||||||
|
public void Send (ReadOnlySpan<byte> content, ushort vlanTag, string remoteAddress, Action<NWError> callback)
|
||||||
|
{
|
||||||
|
if (callback == null)
|
||||||
|
throw new ArgumentNullException (nameof (callback));
|
||||||
|
|
||||||
|
using (var dispatchData = DispatchData.FromByteBuffer (content.ToArray (), 0, content.Length)) {
|
||||||
|
BlockLiteral block_handler = new BlockLiteral ();
|
||||||
|
block_handler.SetupBlockUnsafe (static_SendCompletion, callback);
|
||||||
|
|
||||||
|
try {
|
||||||
|
nw_ethernet_channel_send (GetCheckedHandle (), dispatchData.GetHandle (), vlanTag, remoteAddress, ref block_handler);
|
||||||
|
} finally {
|
||||||
|
block_handler.CleanupBlock ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[DllImport (Constants.NetworkLibrary)]
|
||||||
|
unsafe static extern void nw_ethernet_channel_set_receive_handler (OS_nw_ethernet_channel ethernet_channel, /* [NullAllowed] */ BlockLiteral *handler);
|
||||||
|
|
||||||
|
delegate void nw_ethernet_channel_receive_handler_t (IntPtr block, OS_dispatch_data content, ushort vlan_tag, byte[] local_address, byte[] remote_address);
|
||||||
|
static nw_ethernet_channel_receive_handler_t static_ReceiveHandler = TrampolineReceiveHandler;
|
||||||
|
|
||||||
|
[MonoPInvokeCallback (typeof (nw_ethernet_channel_receive_handler_t))]
|
||||||
|
static void TrampolineReceiveHandler (IntPtr block, OS_dispatch_data content, ushort vlanTag, byte[] localAddress, byte[] remoteAddress)
|
||||||
|
{
|
||||||
|
var del = BlockLiteral.GetTarget<NWEthernetChannelReceiveDelegate> (block);
|
||||||
|
if (del != null) {
|
||||||
|
|
||||||
|
var dispatchData = (content == IntPtr.Zero) ? null : new DispatchData (content, owns: false);
|
||||||
|
var local = (localAddress == null) ? null : Encoding.UTF8.GetString (localAddress);
|
||||||
|
var remote = (remoteAddress == null) ? null : Encoding.UTF8.GetString (remoteAddress);
|
||||||
|
|
||||||
|
del (dispatchData, vlanTag, local, remote);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[BindingImpl (BindingImplOptions.Optimizable)]
|
||||||
|
public void SetReceiveHandler (NWEthernetChannelReceiveDelegate handler)
|
||||||
|
{
|
||||||
|
unsafe {
|
||||||
|
if (handler == null) {
|
||||||
|
nw_ethernet_channel_set_receive_handler (GetCheckedHandle (), null);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
BlockLiteral block_handler = new BlockLiteral ();
|
||||||
|
block_handler.SetupBlockUnsafe (static_ReceiveHandler, handler);
|
||||||
|
try {
|
||||||
|
nw_ethernet_channel_set_receive_handler (GetCheckedHandle (), &block_handler);
|
||||||
|
} finally {
|
||||||
|
block_handler.CleanupBlock ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[DllImport (Constants.NetworkLibrary)]
|
||||||
|
unsafe static extern void nw_ethernet_channel_set_state_changed_handler (OS_nw_ethernet_channel ethernet_channel, /* [NullAllowed] */ BlockLiteral *handler);
|
||||||
|
|
||||||
|
delegate void nw_ethernet_channel_state_changed_handler_t (IntPtr block, NWEthernetChannelState state, IntPtr error);
|
||||||
|
static nw_ethernet_channel_state_changed_handler_t static_StateChangesHandler = TrampolineStateChangesHandler;
|
||||||
|
|
||||||
|
[MonoPInvokeCallback (typeof (nw_ethernet_channel_state_changed_handler_t))]
|
||||||
|
static void TrampolineStateChangesHandler (IntPtr block, NWEthernetChannelState state, IntPtr error)
|
||||||
|
{
|
||||||
|
var del = BlockLiteral.GetTarget<Action<NWEthernetChannelState, NWError>> (block);
|
||||||
|
if (del != null) {
|
||||||
|
var nwError = (error == IntPtr.Zero) ? null : new NWError (error, owns: false);
|
||||||
|
del (state, nwError);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[BindingImpl (BindingImplOptions.Optimizable)]
|
||||||
|
public void SetStateChangesHandler (Action<NWBrowserState, NWError> handler)
|
||||||
|
{
|
||||||
|
unsafe {
|
||||||
|
if (handler == null) {
|
||||||
|
nw_ethernet_channel_set_state_changed_handler (GetCheckedHandle (), null);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
BlockLiteral block_handler = new BlockLiteral ();
|
||||||
|
block_handler.SetupBlockUnsafe (static_StateChangesHandler, handler);
|
||||||
|
try {
|
||||||
|
nw_ethernet_channel_set_state_changed_handler (GetCheckedHandle (), &block_handler);
|
||||||
|
} finally {
|
||||||
|
block_handler.CleanupBlock ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
|
@ -38,14 +38,17 @@ namespace Network {
|
||||||
WillMarkReady = 2,
|
WillMarkReady = 2,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public delegate nuint NWFramerParseCompletionDelegate (Memory<byte> buffer, bool isCompleted);
|
||||||
|
public delegate nuint NWFramerInputDelegate (NWFramer framer);
|
||||||
|
|
||||||
[TV (13,0), Mac (10,15), iOS (13,0), Watch (6,0)]
|
[TV (13,0), Mac (10,15), iOS (13,0), Watch (6,0)]
|
||||||
public class NWFramer : NativeObject {
|
public class NWFramer : NativeObject {
|
||||||
internal NWFramer (IntPtr handle, bool owns) : base (handle, owns) {}
|
internal NWFramer (IntPtr handle, bool owns) : base (handle, owns) {}
|
||||||
/*
|
|
||||||
[DllImport (Constants.NetworkLibrary)]
|
[DllImport (Constants.NetworkLibrary)]
|
||||||
static extern bool nw_framer_write_output_no_copy (OS_nw_framer framer, nuint output_length);
|
static extern bool nw_framer_write_output_no_copy (OS_nw_framer framer, nuint output_length);
|
||||||
|
|
||||||
public bool WriteOutput (nuint outputLength) => nw_framer_write_output_no_copy (GetCheckedHandle (), outputLength);
|
public bool WriteOutputNoCopy (nuint outputLength) => nw_framer_write_output_no_copy (GetCheckedHandle (), outputLength);
|
||||||
|
|
||||||
[DllImport (Constants.NetworkLibrary)]
|
[DllImport (Constants.NetworkLibrary)]
|
||||||
static extern void nw_framer_write_output_data (OS_nw_framer framer, OS_dispatch_data output_data);
|
static extern void nw_framer_write_output_data (OS_nw_framer framer, OS_dispatch_data output_data);
|
||||||
|
@ -152,13 +155,13 @@ namespace Network {
|
||||||
var del = BlockLiteral.GetTarget<Action<NWFramer, NWProtocolMetadata, nuint, bool>> (block);
|
var del = BlockLiteral.GetTarget<Action<NWFramer, NWProtocolMetadata, nuint, bool>> (block);
|
||||||
if (del != null) {
|
if (del != null) {
|
||||||
var nwFramer = new NWFramer (framer, owns: true);
|
var nwFramer = new NWFramer (framer, owns: true);
|
||||||
var nwProtocolMetadata = new NWProtocolMetadata (message, owns: true);
|
var nwProtocolMetadata = new NWFramerMessage (message, owns: true);
|
||||||
del (nwFramer, nwProtocolMetadata, message_length, is_complete);
|
del (nwFramer, nwProtocolMetadata, message_length, is_complete);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[BindingImpl (BindingImplOptions.Optimizable)]
|
[BindingImpl (BindingImplOptions.Optimizable)]
|
||||||
public Action<NWFramer, NWProtocolMetadata, nuint, bool> OutputHandler {
|
public Action<NWFramer, NWFramerMessage, nuint, bool> OutputHandler {
|
||||||
set {
|
set {
|
||||||
unsafe {
|
unsafe {
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
|
@ -180,21 +183,22 @@ namespace Network {
|
||||||
[DllImport (Constants.NetworkLibrary)]
|
[DllImport (Constants.NetworkLibrary)]
|
||||||
unsafe static extern void nw_framer_set_input_handler (OS_nw_framer framer, void *input_handler);
|
unsafe static extern void nw_framer_set_input_handler (OS_nw_framer framer, void *input_handler);
|
||||||
|
|
||||||
delegate void nw_framer_set_input_handler_t (IntPtr block, OS_nw_framer framer);
|
delegate nuint nw_framer_set_input_handler_t (IntPtr block, OS_nw_framer framer);
|
||||||
static nw_framer_set_input_handler_t static_InputHandler = TrampolineInputHandler;
|
static nw_framer_set_input_handler_t static_InputHandler = TrampolineInputHandler;
|
||||||
|
|
||||||
[MonoPInvokeCallback (typeof (nw_framer_set_input_handler_t))]
|
[MonoPInvokeCallback (typeof (nw_framer_set_input_handler_t))]
|
||||||
static void TrampolineInputHandler (IntPtr block, OS_nw_framer framer)
|
static nuint TrampolineInputHandler (IntPtr block, OS_nw_framer framer)
|
||||||
{
|
{
|
||||||
var del = BlockLiteral.GetTarget<Action<NWFramer>> (block);
|
var del = BlockLiteral.GetTarget<NWFramerInputDelegate> (block);
|
||||||
if (del != null) {
|
if (del != null) {
|
||||||
var nwFramer = new NWFramer (framer, owns: true);
|
var nwFramer = new NWFramer (framer, owns: true);
|
||||||
del (nwFramer);
|
return del (nwFramer);
|
||||||
}
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
[BindingImpl (BindingImplOptions.Optimizable)]
|
[BindingImpl (BindingImplOptions.Optimizable)]
|
||||||
public Action<NWFramer> InputHandler {
|
public NWFramerInputDelegate InputHandler {
|
||||||
set {
|
set {
|
||||||
unsafe {
|
unsafe {
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
|
@ -217,9 +221,9 @@ namespace Network {
|
||||||
unsafe static extern void nw_framer_set_cleanup_handler (OS_nw_framer framer, void *cleanup_handler);
|
unsafe static extern void nw_framer_set_cleanup_handler (OS_nw_framer framer, void *cleanup_handler);
|
||||||
|
|
||||||
delegate void nw_framer_set_cleanup_handler_t (IntPtr block, OS_nw_framer framer);
|
delegate void nw_framer_set_cleanup_handler_t (IntPtr block, OS_nw_framer framer);
|
||||||
static nw_framer_set_input_handler_t static_CleanupHandler = TrampolineCleanupHandler;
|
static nw_framer_set_cleanup_handler_t static_CleanupHandler = TrampolineCleanupHandler;
|
||||||
|
|
||||||
[MonoPInvokeCallback (typeof (nw_framer_set_input_handler_t))]
|
[MonoPInvokeCallback (typeof (nw_framer_set_cleanup_handler_t))]
|
||||||
static void TrampolineCleanupHandler (IntPtr block, OS_nw_framer framer)
|
static void TrampolineCleanupHandler (IntPtr block, OS_nw_framer framer)
|
||||||
{
|
{
|
||||||
var del = BlockLiteral.GetTarget<Action<NWFramer>> (block);
|
var del = BlockLiteral.GetTarget<Action<NWFramer>> (block);
|
||||||
|
@ -253,7 +257,6 @@ namespace Network {
|
||||||
static extern void nw_framer_schedule_wakeup (OS_nw_framer framer, ulong milliseconds);
|
static extern void nw_framer_schedule_wakeup (OS_nw_framer framer, ulong milliseconds);
|
||||||
|
|
||||||
public void ScheduleWakeup (ulong milliseconds) => nw_framer_schedule_wakeup (GetCheckedHandle (), milliseconds);
|
public void ScheduleWakeup (ulong milliseconds) => nw_framer_schedule_wakeup (GetCheckedHandle (), milliseconds);
|
||||||
*/
|
|
||||||
|
|
||||||
[DllImport (Constants.NetworkLibrary)]
|
[DllImport (Constants.NetworkLibrary)]
|
||||||
static extern OS_nw_protocol_metadata nw_framer_message_create (OS_nw_framer framer);
|
static extern OS_nw_protocol_metadata nw_framer_message_create (OS_nw_framer framer);
|
||||||
|
@ -261,7 +264,6 @@ namespace Network {
|
||||||
public NWFramerMessage CreateMessage ()
|
public NWFramerMessage CreateMessage ()
|
||||||
=> new NWFramerMessage (nw_framer_message_create (GetCheckedHandle ()), owns: true);
|
=> new NWFramerMessage (nw_framer_message_create (GetCheckedHandle ()), owns: true);
|
||||||
|
|
||||||
/*
|
|
||||||
[DllImport (Constants.NetworkLibrary)]
|
[DllImport (Constants.NetworkLibrary)]
|
||||||
static extern bool nw_framer_prepend_application_protocol (OS_nw_framer framer, OS_nw_protocol_options protocol_options);
|
static extern bool nw_framer_prepend_application_protocol (OS_nw_framer framer, OS_nw_protocol_options protocol_options);
|
||||||
|
|
||||||
|
@ -295,7 +297,7 @@ namespace Network {
|
||||||
[DllImport (Constants.NetworkLibrary)]
|
[DllImport (Constants.NetworkLibrary)]
|
||||||
static extern bool nw_framer_deliver_input_no_copy (OS_nw_framer framer, nuint input_length, OS_nw_protocol_metadata message, bool is_complete);
|
static extern bool nw_framer_deliver_input_no_copy (OS_nw_framer framer, nuint input_length, OS_nw_protocol_metadata message, bool is_complete);
|
||||||
|
|
||||||
public bool DeliverInput (nuint length, NWProtocolMetadata message, bool isComplete)
|
public bool DeliverInputNoCopy (nuint length, NWFramerMessage message, bool isComplete)
|
||||||
{
|
{
|
||||||
if (message == null)
|
if (message == null)
|
||||||
throw new ArgumentNullException (nameof (message));
|
throw new ArgumentNullException (nameof (message));
|
||||||
|
@ -305,11 +307,12 @@ namespace Network {
|
||||||
[DllImport (Constants.NetworkLibrary)]
|
[DllImport (Constants.NetworkLibrary)]
|
||||||
static extern OS_nw_protocol_options nw_framer_create_options (OS_nw_protocol_definition framer_definition);
|
static extern OS_nw_protocol_options nw_framer_create_options (OS_nw_protocol_definition framer_definition);
|
||||||
|
|
||||||
public static NWProtocolOptions CreateOptions (NWProtocolDefinition protocolDefinition)
|
public static T CreateOptions<T> (NWProtocolDefinition protocolDefinition) where T: NWProtocolOptions
|
||||||
{
|
{
|
||||||
if (protocolDefinition == null)
|
if (protocolDefinition == null)
|
||||||
throw new ArgumentNullException (nameof (protocolDefinition));
|
throw new ArgumentNullException (nameof (protocolDefinition));
|
||||||
return new NWProtocolOptions (nw_framer_create_options (protocolDefinition.Handle), owns: true);
|
var x = nw_framer_create_options (protocolDefinition.Handle);
|
||||||
|
return Runtime.GetINativeObject<T> (x, owns: true);
|
||||||
}
|
}
|
||||||
|
|
||||||
[DllImport (Constants.NetworkLibrary)]
|
[DllImport (Constants.NetworkLibrary)]
|
||||||
|
@ -399,23 +402,24 @@ namespace Network {
|
||||||
[DllImport (Constants.NetworkLibrary)]
|
[DllImport (Constants.NetworkLibrary)]
|
||||||
static extern unsafe bool nw_framer_parse_input (OS_nw_framer framer, nuint minimum_incomplete_length, nuint maximum_length, byte *temp_buffer, ref BlockLiteral parse);
|
static extern unsafe bool nw_framer_parse_input (OS_nw_framer framer, nuint minimum_incomplete_length, nuint maximum_length, byte *temp_buffer, ref BlockLiteral parse);
|
||||||
|
|
||||||
delegate void nw_framer_parse_input_t (IntPtr block, IntPtr buffer, nuint buffer_length, bool is_complete);
|
delegate nuint nw_framer_parse_input_t (IntPtr block, IntPtr buffer, nuint buffer_length, bool is_complete);
|
||||||
static nw_framer_parse_input_t static_ParseInputHandler = TrampolineParseInputHandler;
|
static nw_framer_parse_input_t static_ParseInputHandler = TrampolineParseInputHandler;
|
||||||
|
|
||||||
[MonoPInvokeCallback (typeof (nw_framer_parse_input_t))]
|
[MonoPInvokeCallback (typeof (nw_framer_parse_input_t))]
|
||||||
static void TrampolineParseInputHandler (IntPtr block, IntPtr buffer, nuint buffer_length, bool is_complete)
|
static nuint TrampolineParseInputHandler (IntPtr block, IntPtr buffer, nuint buffer_length, bool is_complete)
|
||||||
{
|
{
|
||||||
var del = BlockLiteral.GetTarget<Action<Memory<byte>, bool>> (block);
|
var del = BlockLiteral.GetTarget<NWFramerParseCompletionDelegate> (block);
|
||||||
if (del != null) {
|
if (del != null) {
|
||||||
var bBuffer = new byte[buffer_length];
|
var bBuffer = new byte[buffer_length];
|
||||||
Marshal.Copy (buffer, bBuffer, 0, (int)buffer_length);
|
Marshal.Copy (buffer, bBuffer, 0, (int)buffer_length);
|
||||||
var mValue = new Memory<byte>(bBuffer);
|
var mValue = new Memory<byte>(bBuffer);
|
||||||
del (mValue, is_complete);
|
return del (mValue, is_complete);
|
||||||
}
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
[BindingImpl (BindingImplOptions.Optimizable)]
|
[BindingImpl (BindingImplOptions.Optimizable)]
|
||||||
public bool ParseInput (nuint minimumIncompleteLength, nuint maximumLength, Memory<byte> tempBuffer, Action<Memory<byte>, bool> handler)
|
public bool ParseInput (nuint minimumIncompleteLength, nuint maximumLength, Memory<byte> tempBuffer, NWFramerParseCompletionDelegate handler)
|
||||||
{
|
{
|
||||||
if (handler == null)
|
if (handler == null)
|
||||||
throw new ArgumentNullException (nameof (handler));
|
throw new ArgumentNullException (nameof (handler));
|
||||||
|
@ -431,37 +435,10 @@ namespace Network {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[DllImport (Constants.NetworkLibrary)]
|
|
||||||
static extern unsafe void nw_framer_message_set_value (OS_nw_protocol_metadata message, string key, byte *value, void *dispose_value);
|
|
||||||
|
|
||||||
public void SetKey (string key, ReadOnlySpan<byte> value)
|
|
||||||
{
|
|
||||||
// the method takes a callback to cleanup the data, but we do not need that since we are managed
|
|
||||||
if (key == null)
|
|
||||||
throw new ArgumentNullException (nameof (key));
|
|
||||||
|
|
||||||
unsafe {
|
|
||||||
fixed (byte* mh = value)
|
|
||||||
nw_framer_message_set_value (GetCheckedHandle (), key, mh, null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[DllImport (Constants.NetworkLibrary)]
|
|
||||||
static extern void nw_framer_message_set_object_value (OS_nw_protocol_metadata message, string key, IntPtr value);
|
|
||||||
|
|
||||||
public void SetObject (string key, NSObject value)
|
|
||||||
=> nw_framer_message_set_object_value (GetCheckedHandle (), key, value.GetHandle ());
|
|
||||||
|
|
||||||
[DllImport (Constants.NetworkLibrary)]
|
|
||||||
static extern IntPtr nw_framer_message_copy_object_value (OS_nw_protocol_metadata message, string key);
|
|
||||||
|
|
||||||
public NSObject GetValue (string key)
|
|
||||||
=> Runtime.GetNSObject (nw_framer_message_copy_object_value (GetCheckedHandle (), key));
|
|
||||||
|
|
||||||
[DllImport (Constants.NetworkLibrary)]
|
[DllImport (Constants.NetworkLibrary)]
|
||||||
unsafe static extern void nw_framer_deliver_input (OS_nw_framer framer, byte *input_buffer, nuint input_length, OS_nw_protocol_metadata message, bool is_complete);
|
unsafe static extern void nw_framer_deliver_input (OS_nw_framer framer, byte *input_buffer, nuint input_length, OS_nw_protocol_metadata message, bool is_complete);
|
||||||
|
|
||||||
public void DeliverInput (ReadOnlySpan<byte> buffer, NWProtocolMetadata message, bool isComplete)
|
public void DeliverInput (ReadOnlySpan<byte> buffer, NWFramerMessage message, bool isComplete)
|
||||||
{
|
{
|
||||||
if (message == null)
|
if (message == null)
|
||||||
throw new ArgumentNullException (nameof (message));
|
throw new ArgumentNullException (nameof (message));
|
||||||
|
@ -470,6 +447,5 @@ namespace Network {
|
||||||
nw_framer_deliver_input (GetCheckedHandle (),mh, (nuint)buffer.Length, message.Handle, isComplete);
|
nw_framer_deliver_input (GetCheckedHandle (),mh, (nuint)buffer.Length, message.Handle, isComplete);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -177,6 +177,32 @@ namespace Network {
|
||||||
return new NWParameters (ptr, owns: true);
|
return new NWParameters (ptr, owns: true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if MONOMAC
|
||||||
|
[NoWatch, NoTV, NoiOS, Mac (10,15)]
|
||||||
|
[DllImport (Constants.NetworkLibrary)]
|
||||||
|
unsafe static extern IntPtr nw_parameters_create_custom_ip (byte custom_ip_protocol_number, BlockLiteral *configure_ip);
|
||||||
|
|
||||||
|
[NoWatch, NoTV, NoiOS, Mac (10,15)]
|
||||||
|
[BindingImpl (BindingImplOptions.Optimizable)]
|
||||||
|
public unsafe static NWParameters CreateCustomIP (byte protocolNumber, Action<NWProtocolOptions> configureCustomIP = null)
|
||||||
|
{
|
||||||
|
var ipHandler = new BlockLiteral ();
|
||||||
|
|
||||||
|
var ipPtr = &ipHandler;
|
||||||
|
if (configureCustomIP == null)
|
||||||
|
ipPtr = DEFAULT_CONFIGURATION ();
|
||||||
|
else
|
||||||
|
ipHandler.SetupBlockUnsafe (static_ConfigureHandler, configureCustomIP);
|
||||||
|
|
||||||
|
var ptr = nw_parameters_create_custom_ip (protocolNumber, ipPtr);
|
||||||
|
|
||||||
|
if (configureCustomIP != null)
|
||||||
|
ipPtr->CleanupBlock ();
|
||||||
|
|
||||||
|
return new NWParameters (ptr, owns: true);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
[DllImport (Constants.NetworkLibrary)]
|
[DllImport (Constants.NetworkLibrary)]
|
||||||
static extern nw_parameters_t nw_parameters_create ();
|
static extern nw_parameters_t nw_parameters_create ();
|
||||||
|
|
||||||
|
|
|
@ -1603,8 +1603,14 @@ namespace ObjCRuntime {
|
||||||
|
|
||||||
static int MajorVersion = -1;
|
static int MajorVersion = -1;
|
||||||
static int MinorVersion = -1;
|
static int MinorVersion = -1;
|
||||||
|
static int BuildVersion = -1;
|
||||||
|
|
||||||
internal static bool CheckSystemVersion (int major, int minor, string systemVersion)
|
internal static bool CheckSystemVersion (int major, int minor, string systemVersion)
|
||||||
|
{
|
||||||
|
return CheckSystemVersion (major, minor, 0, systemVersion);
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static bool CheckSystemVersion (int major, int minor, int build, string systemVersion)
|
||||||
{
|
{
|
||||||
if (MajorVersion == -1) {
|
if (MajorVersion == -1) {
|
||||||
string[] version = systemVersion.Split (new char[] { '.' });
|
string[] version = systemVersion.Split (new char[] { '.' });
|
||||||
|
@ -1614,9 +1620,25 @@ namespace ObjCRuntime {
|
||||||
|
|
||||||
if (version.Length < 2 || !int.TryParse (version[1], NumberStyles.Integer, CultureInfo.InvariantCulture, out MinorVersion))
|
if (version.Length < 2 || !int.TryParse (version[1], NumberStyles.Integer, CultureInfo.InvariantCulture, out MinorVersion))
|
||||||
MinorVersion = 0;
|
MinorVersion = 0;
|
||||||
|
|
||||||
|
if (version.Length < 3 || !int.TryParse (version[2], NumberStyles.Integer, CultureInfo.InvariantCulture, out BuildVersion))
|
||||||
|
BuildVersion = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return MajorVersion > major || (MajorVersion == major && MinorVersion >= minor);
|
if (MajorVersion > major)
|
||||||
|
return true;
|
||||||
|
else if (MajorVersion < major)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (MinorVersion > minor)
|
||||||
|
return true;
|
||||||
|
else if (MinorVersion < minor)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (BuildVersion < build)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static IntPtr CloneMemory (IntPtr source, nint length)
|
internal static IntPtr CloneMemory (IntPtr source, nint length)
|
||||||
|
|
|
@ -31,6 +31,11 @@ namespace WatchKit {
|
||||||
{
|
{
|
||||||
return Runtime.CheckSystemVersion (major, minor, SystemVersion);
|
return Runtime.CheckSystemVersion (major, minor, SystemVersion);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool CheckSystemVersion (int major, int minor, int build)
|
||||||
|
{
|
||||||
|
return Runtime.CheckSystemVersion (major, minor, build, SystemVersion);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,6 @@ namespace FileProvider {
|
||||||
NSUrl DocumentStorageUrl { get; }
|
NSUrl DocumentStorageUrl { get; }
|
||||||
|
|
||||||
[NoMac]
|
[NoMac]
|
||||||
[Deprecated (PlatformName.iOS, 13, 0)] // Undocumented replacement
|
|
||||||
[Export ("URLForItemWithPersistentIdentifier:")]
|
[Export ("URLForItemWithPersistentIdentifier:")]
|
||||||
NSUrl GetUrlForItem (string persistentIdentifier);
|
NSUrl GetUrlForItem (string persistentIdentifier);
|
||||||
|
|
||||||
|
|
|
@ -1177,6 +1177,7 @@ NETWORK_SOURCES = \
|
||||||
Network/NWConnection.cs \
|
Network/NWConnection.cs \
|
||||||
Network/NWContentContext.cs \
|
Network/NWContentContext.cs \
|
||||||
Network/NWDataTransferReport.cs \
|
Network/NWDataTransferReport.cs \
|
||||||
|
Network/NWEthernetChannel.cs \
|
||||||
Network/NWEstablishmentReport.cs \
|
Network/NWEstablishmentReport.cs \
|
||||||
Network/NWEndpoint.cs \
|
Network/NWEndpoint.cs \
|
||||||
Network/NWError.cs \
|
Network/NWError.cs \
|
||||||
|
|
21
src/metal.cs
21
src/metal.cs
|
@ -597,7 +597,12 @@ namespace Metal {
|
||||||
#endif
|
#endif
|
||||||
[NoiOS, NoTV, Mac (10,15)]
|
[NoiOS, NoTV, Mac (10,15)]
|
||||||
[Export ("sampleCountersInBuffer:atSampleIndex:withBarrier:")]
|
[Export ("sampleCountersInBuffer:atSampleIndex:withBarrier:")]
|
||||||
|
#if XAMCORE_4_0
|
||||||
|
void SampleCounters (IMTLCounterSampleBuffer sampleBuffer, nuint sampleIndex, bool barrier);
|
||||||
|
#else
|
||||||
|
[Obsolete ("Use the overload that takes an IMTLCounterSampleBuffer instead.")]
|
||||||
void SampleCounters (MTLCounterSampleBuffer sampleBuffer, nuint sampleIndex, bool barrier);
|
void SampleCounters (MTLCounterSampleBuffer sampleBuffer, nuint sampleIndex, bool barrier);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
[iOS (8,0)][Mac (10,11)]
|
[iOS (8,0)][Mac (10,11)]
|
||||||
|
@ -1363,7 +1368,12 @@ namespace Metal {
|
||||||
#endif
|
#endif
|
||||||
[NoiOS, NoTV, Mac (10, 15)]
|
[NoiOS, NoTV, Mac (10, 15)]
|
||||||
[NullAllowed, Export ("counterSets")]
|
[NullAllowed, Export ("counterSets")]
|
||||||
|
#if XAMCORE_4_0
|
||||||
|
IMTLCounterSet[] CounterSets { get; }
|
||||||
|
#else
|
||||||
|
[Obsolete ("Use 'GetIMTLCounterSets' instead.")]
|
||||||
MTLCounterSet[] CounterSets { get; }
|
MTLCounterSet[] CounterSets { get; }
|
||||||
|
#endif
|
||||||
|
|
||||||
#if XAMCORE_4_0
|
#if XAMCORE_4_0
|
||||||
[Abstract]
|
[Abstract]
|
||||||
|
@ -1371,7 +1381,12 @@ namespace Metal {
|
||||||
[NoiOS, NoTV, Mac (10,15)]
|
[NoiOS, NoTV, Mac (10,15)]
|
||||||
[Export ("newCounterSampleBufferWithDescriptor:error:")]
|
[Export ("newCounterSampleBufferWithDescriptor:error:")]
|
||||||
[return: NullAllowed]
|
[return: NullAllowed]
|
||||||
|
#if XAMCORE_4_0
|
||||||
|
IMTLCounterSampleBuffer CreateCounterSampleBuffer (MTLCounterSampleBufferDescriptor descriptor, [NullAllowed] out NSError error);
|
||||||
|
#else
|
||||||
|
[Obsolete ("Use 'CreateIMTLCounterSampleBuffer' instead.")]
|
||||||
MTLCounterSampleBuffer CreateCounterSampleBuffer (MTLCounterSampleBufferDescriptor descriptor, [NullAllowed] out NSError error);
|
MTLCounterSampleBuffer CreateCounterSampleBuffer (MTLCounterSampleBufferDescriptor descriptor, [NullAllowed] out NSError error);
|
||||||
|
#endif
|
||||||
|
|
||||||
#if XAMCORE_4_0
|
#if XAMCORE_4_0
|
||||||
[Abstract]
|
[Abstract]
|
||||||
|
@ -4148,7 +4163,9 @@ namespace Metal {
|
||||||
|
|
||||||
[NoiOS, NoTV, Mac (10,15)]
|
[NoiOS, NoTV, Mac (10,15)]
|
||||||
[Protocol]
|
[Protocol]
|
||||||
|
#if !XAMCORE_4_0
|
||||||
[BaseType (typeof(NSObject))]
|
[BaseType (typeof(NSObject))]
|
||||||
|
#endif
|
||||||
interface MTLCounter {
|
interface MTLCounter {
|
||||||
[Abstract]
|
[Abstract]
|
||||||
[Export ("name")]
|
[Export ("name")]
|
||||||
|
@ -4159,7 +4176,9 @@ namespace Metal {
|
||||||
|
|
||||||
[NoiOS, NoTV, Mac (10,15)]
|
[NoiOS, NoTV, Mac (10,15)]
|
||||||
[Protocol]
|
[Protocol]
|
||||||
|
#if !XAMCORE_4_0
|
||||||
[BaseType (typeof(NSObject))]
|
[BaseType (typeof(NSObject))]
|
||||||
|
#endif
|
||||||
interface MTLCounterSet {
|
interface MTLCounterSet {
|
||||||
[Abstract]
|
[Abstract]
|
||||||
[Export ("name")]
|
[Export ("name")]
|
||||||
|
@ -4174,7 +4193,9 @@ namespace Metal {
|
||||||
|
|
||||||
[NoiOS, NoTV, Mac (10,15)]
|
[NoiOS, NoTV, Mac (10,15)]
|
||||||
[Protocol]
|
[Protocol]
|
||||||
|
#if !XAMCORE_4_0
|
||||||
[BaseType (typeof(NSObject))]
|
[BaseType (typeof(NSObject))]
|
||||||
|
#endif
|
||||||
interface MTLCounterSampleBuffer {
|
interface MTLCounterSampleBuffer {
|
||||||
[Abstract]
|
[Abstract]
|
||||||
[Export ("device")]
|
[Export ("device")]
|
||||||
|
|
|
@ -179,8 +179,11 @@ COLOR_MAGENTA=$(tput setaf 5 2>/dev/null || true)
|
||||||
COLOR_BLUE=$(tput setaf 6 2>/dev/null || true)
|
COLOR_BLUE=$(tput setaf 6 2>/dev/null || true)
|
||||||
COLOR_CLEAR=$(tput sgr0 2>/dev/null || true)
|
COLOR_CLEAR=$(tput sgr0 2>/dev/null || true)
|
||||||
COLOR_RESET=uniquesearchablestring
|
COLOR_RESET=uniquesearchablestring
|
||||||
|
FAILURE_PREFIX=
|
||||||
|
if test -z "$COLOR_RED"; then FAILURE_PREFIX="** failure ** "; fi
|
||||||
|
|
||||||
function fail () {
|
function fail () {
|
||||||
echo " ${COLOR_RED}${1//${COLOR_RESET}/${COLOR_RED}}${COLOR_CLEAR}"
|
echo " $FAILURE_PREFIX${COLOR_RED}${1//${COLOR_RESET}/${COLOR_RED}}${COLOR_CLEAR}"
|
||||||
FAIL=1
|
FAIL=1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -950,7 +953,7 @@ function check_simulators ()
|
||||||
local XCODE
|
local XCODE
|
||||||
|
|
||||||
EXTRA_SIMULATORS=$(grep ^EXTRA_SIMULATORS= Make.config | sed 's/.*=//')
|
EXTRA_SIMULATORS=$(grep ^EXTRA_SIMULATORS= Make.config | sed 's/.*=//')
|
||||||
XCODE=$(grep ^XCODE_DEVELOPER_ROOT= Make.config | sed 's/.*=//')/../..
|
XCODE=$(dirname "$(dirname "$(grep ^XCODE_DEVELOPER_ROOT= Make.config | sed 's/.*=//')")")
|
||||||
|
|
||||||
if ! make -C tools/siminstaller >/dev/null; then
|
if ! make -C tools/siminstaller >/dev/null; then
|
||||||
warn "Can't check if simulators are available, because siminstaller failed to build."
|
warn "Can't check if simulators are available, because siminstaller failed to build."
|
||||||
|
@ -976,13 +979,17 @@ function check_simulators ()
|
||||||
fi
|
fi
|
||||||
if [[ "$FAILED_SIMULATORS" =~ "Unknown simulators:" ]]; then
|
if [[ "$FAILED_SIMULATORS" =~ "Unknown simulators:" ]]; then
|
||||||
$action "${FAILED_SIMULATORS}"
|
$action "${FAILED_SIMULATORS}"
|
||||||
$action " If you just updated the Xcode version, it's likely Apple stopped shipping these simulators with the new version of Xcode."
|
$action " If you just updated the Xcode version, it's possible Apple stopped shipping these simulators with the new version of Xcode."
|
||||||
$action " If that's the case, you can list the available simulators with ${COLOR_MAGENTA}make -C tools/siminstaller print-simulators${COLOR_RESET},"
|
$action " If that's the case, you can list the available simulators with ${COLOR_MAGENTA}make -C tools/siminstaller print-simulators --xcode $XCODE${COLOR_RESET},"
|
||||||
$action " and then update the ${COLOR_MAGENTA}MIN_<OS>_SIMULATOR_VERSION${COLOR_RESET} and ${COLOR_MAGENTA}EXTRA_SIMULATORS${COLOR_RESET} variables in Make.config to the earliest available simulators."
|
$action " and then update the ${COLOR_MAGENTA}MIN_<OS>_SIMULATOR_VERSION${COLOR_RESET} and ${COLOR_MAGENTA}EXTRA_SIMULATORS${COLOR_RESET} variables in Make.config to the earliest available simulators."
|
||||||
|
$action " Another possibility is that Apple is not shipping any simulators (yet?) for the new version of Xcode (if the previous list shows no simulators)."
|
||||||
else
|
else
|
||||||
if ! test -z $PROVISION_SIMULATORS; then
|
if ! test -z $PROVISION_SIMULATORS; then
|
||||||
mono --debug tools/siminstaller/bin/Debug/siminstaller.exe -q --xcode "$XCODE" "${SIMS[@]}"
|
if ! mono --debug tools/siminstaller/bin/Debug/siminstaller.exe -q --xcode "$XCODE" "${SIMS[@]}"; then
|
||||||
|
$action "Failed to install extra simulators."
|
||||||
|
else
|
||||||
ok "Extra simulators installed successfully: '${FAILED_SIMULATORS//$'\n'/', '}'"
|
ok "Extra simulators installed successfully: '${FAILED_SIMULATORS//$'\n'/', '}'"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
$action "The simulators '${FAILED_SIMULATORS//$'\n'/', '}' are not installed or need to be upgraded."
|
$action "The simulators '${FAILED_SIMULATORS//$'\n'/', '}' are not installed or need to be upgraded."
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -415,3 +415,9 @@ System.Reflection.Tests.MethodBaseTests.Test_GetCurrentMethod_Inlineable
|
||||||
|
|
||||||
# device issues, it was reported here: https://github.com/mono/mono/issues/14761
|
# device issues, it was reported here: https://github.com/mono/mono/issues/14761
|
||||||
System.Text.Tests.StringBuilderTests.Append_CharPointer_Null_ThrowsNullReferenceException
|
System.Text.Tests.StringBuilderTests.Append_CharPointer_Null_ThrowsNullReferenceException
|
||||||
|
|
||||||
|
# device failures, reported at: https://github.com/mono/mono/issues/17375
|
||||||
|
Platform32:System.Reflection.Tests.RuntimeReflectionExtensionsTests.GetRuntimeMethod
|
||||||
|
Platform32:System.Reflection.Tests.RuntimeReflectionExtensionsTests.GetRuntimeField
|
||||||
|
Platform32:System.Reflection.Tests.RuntimeReflectionExtensionsTests.GetRuntimeEvent
|
||||||
|
Platform32:System.Reflection.Tests.RuntimeReflectionExtensionsTests.GetRuntimeProperty
|
|
@ -56,3 +56,8 @@ Platform32:Test.TaskContinueWhenAnyTests.RunContinueWhenAnyTests
|
||||||
Platform32:System.Collections.Tests.BitArray_OperatorsTests.Xor_Operator(l: [False, True, False, True, False, ...], r: [True, True, True, True, True, ...], expected: [True, False, True, False, True, ...])
|
Platform32:System.Collections.Tests.BitArray_OperatorsTests.Xor_Operator(l: [False, True, False, True, False, ...], r: [True, True, True, True, True, ...], expected: [True, False, True, False, True, ...])
|
||||||
# Test fails because the threadpool cannot create more threads. Mono issue: https://github.com/mono/mono/issues/17588
|
# Test fails because the threadpool cannot create more threads. Mono issue: https://github.com/mono/mono/issues/17588
|
||||||
Platform32:System.Threading.Tasks.Tests.CancelWait.TaskCancelWaitTestCases.TaskCancelWait16
|
Platform32:System.Threading.Tasks.Tests.CancelWait.TaskCancelWaitTestCases.TaskCancelWait16
|
||||||
|
# out of memory, filled in mono as https://github.com/mono/mono/issues/17480
|
||||||
|
Platform32:System.Memory.Tests.ReadOnlySequenceTestsCommonChar.HelloWorldAcrossTwoBlocks
|
||||||
|
|
||||||
|
# fails on 32b for an unknown reason, passed on 64
|
||||||
|
Platform32:System.Collections.Concurrent.Tests.ConcurrentDictionary_NonGeneric_Tests.ICollection_NonGeneric_CopyTo_TwoDimensionArray_ThrowsException(count: 75)
|
||||||
|
|
|
@ -259,6 +259,18 @@ partial class TestRuntime
|
||||||
return CheckMacSystemVersion (10, 15, 1);
|
return CheckMacSystemVersion (10, 15, 1);
|
||||||
#else
|
#else
|
||||||
throw new NotImplementedException ();
|
throw new NotImplementedException ();
|
||||||
|
#endif
|
||||||
|
case 3:
|
||||||
|
#if __WATCHOS__
|
||||||
|
return CheckWatchOSSystemVersion (6, 1, 1);
|
||||||
|
#elif __TVOS__
|
||||||
|
return ChecktvOSSystemVersion (13, 3);
|
||||||
|
#elif __IOS__
|
||||||
|
return CheckiOSSystemVersion (13, 3);
|
||||||
|
#elif MONOMAC
|
||||||
|
return CheckMacSystemVersion (10, 15, 2);
|
||||||
|
#else
|
||||||
|
throw new NotImplementedException ();
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
throw new NotImplementedException ();
|
throw new NotImplementedException ();
|
||||||
|
@ -644,6 +656,22 @@ partial class TestRuntime
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This method returns true if:
|
||||||
|
// system version >= specified version
|
||||||
|
// AND
|
||||||
|
// sdk version >= specified version
|
||||||
|
static bool CheckWatchOSSystemVersion (int major, int minor, int build, bool throwIfOtherPlatform = true)
|
||||||
|
{
|
||||||
|
#if __WATCHOS__
|
||||||
|
return WatchKit.WKInterfaceDevice.CurrentDevice.CheckSystemVersion (major, minor, build);
|
||||||
|
#else
|
||||||
|
if (throwIfOtherPlatform)
|
||||||
|
throw new Exception ("Can't get watchOS System version on iOS/tvOS.");
|
||||||
|
// This is both iOS and tvOS
|
||||||
|
return true;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
static void AssertWatchOSSystemVersion (int major, int minor, bool throwIfOtherPlatform = true)
|
static void AssertWatchOSSystemVersion (int major, int minor, bool throwIfOtherPlatform = true)
|
||||||
{
|
{
|
||||||
if (CheckWatchOSSystemVersion (major, minor, throwIfOtherPlatform))
|
if (CheckWatchOSSystemVersion (major, minor, throwIfOtherPlatform))
|
||||||
|
|
|
@ -239,6 +239,8 @@ namespace Introspection {
|
||||||
return Runtime.Arch == Arch.SIMULATOR;
|
return Runtime.Arch == Arch.SIMULATOR;
|
||||||
case "AVAudioRecorder": // Stopped working with Xcode 11.2 beta 2
|
case "AVAudioRecorder": // Stopped working with Xcode 11.2 beta 2
|
||||||
return TestRuntime.CheckXcodeVersion (11, 2);
|
return TestRuntime.CheckXcodeVersion (11, 2);
|
||||||
|
case "UIMenuController": // Stopped working with Xcode 11.3 beta 1
|
||||||
|
return TestRuntime.CheckXcodeVersion (11, 3);
|
||||||
default:
|
default:
|
||||||
return base.Skip (type);
|
return base.Skip (type);
|
||||||
}
|
}
|
||||||
|
|
|
@ -622,7 +622,7 @@ namespace Xamarin.MMP.Tests
|
||||||
"<LinkMode>Full</LinkMode>",
|
"<LinkMode>Full</LinkMode>",
|
||||||
};
|
};
|
||||||
var rv = TI.TestUnifiedExecutable (test, shouldFail: false);
|
var rv = TI.TestUnifiedExecutable (test, shouldFail: false);
|
||||||
rv.Messages.AssertWarning (132, $"Unknown optimization: '{opt}'. Valid optimizations are: remove-uithread-checks, dead-code-elimination, inline-isdirectbinding, inline-intptr-size, blockliteral-setupblock, register-protocols, inline-dynamic-registration-supported, static-block-to-delegate-lookup, trim-architectures, inline-is-arm64-calling-convention, cctor-beforefieldinit, custom-attributes-removal.");
|
rv.Messages.AssertWarning (132, $"Unknown optimization: '{opt}'. Valid optimizations are: remove-uithread-checks, dead-code-elimination, inline-isdirectbinding, inline-intptr-size, blockliteral-setupblock, register-protocols, inline-dynamic-registration-supported, static-block-to-delegate-lookup, trim-architectures, inline-is-arm64-calling-convention, cctor-beforefieldinit, custom-attributes-removal, experimental-xforms-product-type.");
|
||||||
rv.Messages.AssertErrorCount (0);
|
rv.Messages.AssertErrorCount (0);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -199,6 +199,21 @@ namespace MonoTouchFixtures.Network {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if MONOMAC
|
||||||
|
[Test]
|
||||||
|
public void CreateCustomIP ()
|
||||||
|
{
|
||||||
|
TestRuntime.AssertXcodeVersion (11, 0);
|
||||||
|
byte ipVersion = 10;
|
||||||
|
var setUpProtocol = CreateConfigureProtocolHandler ();
|
||||||
|
using (var parameters = NWParameters.CreateCustomIP (ipVersion, setUpProtocol))
|
||||||
|
using (var endpoint = NWEndpoint.Create ("wwww.google.com", "80")) {
|
||||||
|
configureEvent.WaitOne ();
|
||||||
|
Assert.True (protocolConfigured, "Protocol configure handler was not called.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void MultiPathServicePropertyTest ()
|
public void MultiPathServicePropertyTest ()
|
||||||
{
|
{
|
||||||
|
|
|
@ -1773,7 +1773,7 @@ public class TestApp {
|
||||||
mtouch.Linker = MTouchLinker.LinkSdk;
|
mtouch.Linker = MTouchLinker.LinkSdk;
|
||||||
mtouch.Optimize = new string [] { "foo" };
|
mtouch.Optimize = new string [] { "foo" };
|
||||||
mtouch.AssertExecute (MTouchAction.BuildSim, "build");
|
mtouch.AssertExecute (MTouchAction.BuildSim, "build");
|
||||||
mtouch.AssertWarning (132, "Unknown optimization: 'foo'. Valid optimizations are: remove-uithread-checks, dead-code-elimination, inline-isdirectbinding, inline-intptr-size, inline-runtime-arch, blockliteral-setupblock, register-protocols, inline-dynamic-registration-supported, static-block-to-delegate-lookup, remove-dynamic-registrar, remove-unsupported-il-for-bitcode, inline-is-arm64-calling-convention, seal-and-devirtualize, cctor-beforefieldinit, custom-attributes-removal.");
|
mtouch.AssertWarning (132, "Unknown optimization: 'foo'. Valid optimizations are: remove-uithread-checks, dead-code-elimination, inline-isdirectbinding, inline-intptr-size, inline-runtime-arch, blockliteral-setupblock, register-protocols, inline-dynamic-registration-supported, static-block-to-delegate-lookup, remove-dynamic-registrar, remove-unsupported-il-for-bitcode, inline-is-arm64-calling-convention, seal-and-devirtualize, cctor-beforefieldinit, custom-attributes-removal, experimental-xforms-product-type.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3696,7 +3696,8 @@ public partial class NotificationService : UNNotificationServiceExtension
|
||||||
mtouch.AssertWarning (2003, "Option '--optimize=seal-and-devirtualize' will be ignored since linking is disabled");
|
mtouch.AssertWarning (2003, "Option '--optimize=seal-and-devirtualize' will be ignored since linking is disabled");
|
||||||
mtouch.AssertWarning (2003, "Option '--optimize=cctor-beforefieldinit' will be ignored since linking is disabled");
|
mtouch.AssertWarning (2003, "Option '--optimize=cctor-beforefieldinit' will be ignored since linking is disabled");
|
||||||
mtouch.AssertWarning (2003, "Option '--optimize=custom-attributes-removal' will be ignored since linking is disabled");
|
mtouch.AssertWarning (2003, "Option '--optimize=custom-attributes-removal' will be ignored since linking is disabled");
|
||||||
mtouch.AssertWarningCount (14);
|
mtouch.AssertWarning (2003, "Option '--optimize=experimental-xforms-product-type' will be ignored since linking is disabled");
|
||||||
|
mtouch.AssertWarningCount (15);
|
||||||
}
|
}
|
||||||
|
|
||||||
using (var mtouch = new MTouchTool ()) {
|
using (var mtouch = new MTouchTool ()) {
|
||||||
|
|
|
@ -859,7 +859,7 @@ namespace xharness
|
||||||
});
|
});
|
||||||
var runLog = Log.CreateAggregatedLog (callbackLog, main_log);
|
var runLog = Log.CreateAggregatedLog (callbackLog, main_log);
|
||||||
var timeoutWatch = Stopwatch.StartNew ();
|
var timeoutWatch = Stopwatch.StartNew ();
|
||||||
var result = await ProcessHelper.ExecuteCommandAsync (Harness.MlaunchPath, args, runLog, timeout, cancellation_token: cancellation_source.Token);
|
var result = await ProcessHelper.ExecuteCommandAsync (Harness.MlaunchPath, args.ToString (), runLog, timeout, cancellation_token: cancellation_source.Token);
|
||||||
|
|
||||||
if (!waitedForExit && !result.TimedOut) {
|
if (!waitedForExit && !result.TimedOut) {
|
||||||
// mlaunch couldn't wait for exit for some reason. Let's assume the app exits when the test listener completes.
|
// mlaunch couldn't wait for exit for some reason. Let's assume the app exits when the test listener completes.
|
||||||
|
|
|
@ -253,21 +253,21 @@ namespace xharness
|
||||||
break;
|
break;
|
||||||
case AppRunnerTarget.Simulator_iOS64:
|
case AppRunnerTarget.Simulator_iOS64:
|
||||||
simulator_devicetype = "com.apple.CoreSimulator.SimDeviceType." + (min_version ? "iPhone-6" : "iPhone-X");
|
simulator_devicetype = "com.apple.CoreSimulator.SimDeviceType." + (min_version ? "iPhone-6" : "iPhone-X");
|
||||||
simulator_runtime = "com.apple.CoreSimulator.SimRuntime.iOS-" + (min_version ? Xamarin.SdkVersions.MiniOSSimulator : Xamarin.SdkVersions.iOS).Replace ('.', '-');
|
simulator_runtime = "com.apple.CoreSimulator.SimRuntime.iOS-" + (min_version ? Xamarin.SdkVersions.MiniOSSimulator : Xamarin.SdkVersions.MaxiOSSimulator).Replace ('.', '-');
|
||||||
break;
|
break;
|
||||||
case AppRunnerTarget.Simulator_iOS:
|
case AppRunnerTarget.Simulator_iOS:
|
||||||
simulator_devicetype = "com.apple.CoreSimulator.SimDeviceType.iPhone-5";
|
simulator_devicetype = "com.apple.CoreSimulator.SimDeviceType.iPhone-5";
|
||||||
simulator_runtime = "com.apple.CoreSimulator.SimRuntime.iOS-" + (min_version ? Xamarin.SdkVersions.MiniOSSimulator : Xamarin.SdkVersions.iOS).Replace ('.', '-');
|
simulator_runtime = "com.apple.CoreSimulator.SimRuntime.iOS-" + (min_version ? Xamarin.SdkVersions.MiniOSSimulator : Xamarin.SdkVersions.MaxiOSSimulator).Replace ('.', '-');
|
||||||
break;
|
break;
|
||||||
case AppRunnerTarget.Simulator_tvOS:
|
case AppRunnerTarget.Simulator_tvOS:
|
||||||
simulator_devicetype = "com.apple.CoreSimulator.SimDeviceType.Apple-TV-1080p";
|
simulator_devicetype = "com.apple.CoreSimulator.SimDeviceType.Apple-TV-1080p";
|
||||||
simulator_runtime = "com.apple.CoreSimulator.SimRuntime.tvOS-" + (min_version ? Xamarin.SdkVersions.MinTVOSSimulator : Xamarin.SdkVersions.TVOS).Replace ('.', '-');
|
simulator_runtime = "com.apple.CoreSimulator.SimRuntime.tvOS-" + (min_version ? Xamarin.SdkVersions.MinTVOSSimulator : Xamarin.SdkVersions.MaxTVOSSimulator).Replace ('.', '-');
|
||||||
break;
|
break;
|
||||||
case AppRunnerTarget.Simulator_watchOS:
|
case AppRunnerTarget.Simulator_watchOS:
|
||||||
simulator_devicetype = "com.apple.CoreSimulator.SimDeviceType." + (min_version ? "Apple-Watch-38mm" : "Apple-Watch-Series-3-38mm");
|
simulator_devicetype = "com.apple.CoreSimulator.SimDeviceType." + (min_version ? "Apple-Watch-38mm" : "Apple-Watch-Series-3-38mm");
|
||||||
simulator_runtime = "com.apple.CoreSimulator.SimRuntime.watchOS-" + (min_version ? Xamarin.SdkVersions.MinWatchOSSimulator : Xamarin.SdkVersions.WatchOS).Replace ('.', '-');
|
simulator_runtime = "com.apple.CoreSimulator.SimRuntime.watchOS-" + (min_version ? Xamarin.SdkVersions.MinWatchOSSimulator : Xamarin.SdkVersions.MaxWatchOSSimulator).Replace ('.', '-');
|
||||||
companion_devicetype = "com.apple.CoreSimulator.SimDeviceType." + (min_version ? "iPhone-6" : "iPhone-X");
|
companion_devicetype = "com.apple.CoreSimulator.SimDeviceType." + (min_version ? "iPhone-6" : "iPhone-X");
|
||||||
companion_runtime = "com.apple.CoreSimulator.SimRuntime.iOS-" + (min_version ? Xamarin.SdkVersions.MinWatchOSCompanionSimulator : Xamarin.SdkVersions.iOS).Replace ('.', '-');
|
companion_runtime = "com.apple.CoreSimulator.SimRuntime.iOS-" + (min_version ? Xamarin.SdkVersions.MinWatchOSCompanionSimulator : Xamarin.SdkVersions.MaxWatchOSCompanionSimulator).Replace ('.', '-');
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new Exception (string.Format ("Unknown simulator target: {0}", target));
|
throw new Exception (string.Format ("Unknown simulator target: {0}", target));
|
||||||
|
|
|
@ -32,3 +32,6 @@
|
||||||
|
|
||||||
## xcode 10.0 backlog
|
## xcode 10.0 backlog
|
||||||
!missing-pinvoke! nw_endpoint_get_address is not bound
|
!missing-pinvoke! nw_endpoint_get_address is not bound
|
||||||
|
|
||||||
|
## no documentation from apple. So we do nothing, specially with the _ prefix. Leak?
|
||||||
|
!missing-field! _nw_data_transfer_report_all_paths not bound
|
||||||
|
|
|
@ -1,24 +0,0 @@
|
||||||
!missing-field! _nw_data_transfer_report_all_paths not bound
|
|
||||||
!missing-pinvoke! nw_framer_async is not bound
|
|
||||||
!missing-pinvoke! nw_framer_copy_local_endpoint is not bound
|
|
||||||
!missing-pinvoke! nw_framer_copy_parameters is not bound
|
|
||||||
!missing-pinvoke! nw_framer_copy_remote_endpoint is not bound
|
|
||||||
!missing-pinvoke! nw_framer_create_options is not bound
|
|
||||||
!missing-pinvoke! nw_framer_deliver_input is not bound
|
|
||||||
!missing-pinvoke! nw_framer_deliver_input_no_copy is not bound
|
|
||||||
!missing-pinvoke! nw_framer_mark_failed_with_error is not bound
|
|
||||||
!missing-pinvoke! nw_framer_mark_ready is not bound
|
|
||||||
!missing-pinvoke! nw_framer_parse_input is not bound
|
|
||||||
!missing-pinvoke! nw_framer_parse_output is not bound
|
|
||||||
!missing-pinvoke! nw_framer_pass_through_input is not bound
|
|
||||||
!missing-pinvoke! nw_framer_pass_through_output is not bound
|
|
||||||
!missing-pinvoke! nw_framer_prepend_application_protocol is not bound
|
|
||||||
!missing-pinvoke! nw_framer_schedule_wakeup is not bound
|
|
||||||
!missing-pinvoke! nw_framer_set_cleanup_handler is not bound
|
|
||||||
!missing-pinvoke! nw_framer_set_input_handler is not bound
|
|
||||||
!missing-pinvoke! nw_framer_set_output_handler is not bound
|
|
||||||
!missing-pinvoke! nw_framer_set_stop_handler is not bound
|
|
||||||
!missing-pinvoke! nw_framer_set_wakeup_handler is not bound
|
|
||||||
!missing-pinvoke! nw_framer_write_output is not bound
|
|
||||||
!missing-pinvoke! nw_framer_write_output_data is not bound
|
|
||||||
!missing-pinvoke! nw_framer_write_output_no_copy is not bound
|
|
|
@ -74,3 +74,5 @@
|
||||||
!missing-pinvoke! CFXMLTreeCreateXMLData is not bound
|
!missing-pinvoke! CFXMLTreeCreateXMLData is not bound
|
||||||
!missing-pinvoke! CFXMLTreeGetNode is not bound
|
!missing-pinvoke! CFXMLTreeGetNode is not bound
|
||||||
!unknown-pinvoke! _NSGetExecutablePath bound
|
!unknown-pinvoke! _NSGetExecutablePath bound
|
||||||
|
!missing-field! kCFUserNotificationAlertTopMostKey not bound
|
||||||
|
!missing-field! kCFUserNotificationKeyboardTypesKey not bound
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
!missing-field! kCFUserNotificationAlertTopMostKey not bound
|
|
||||||
!missing-field! kCFUserNotificationKeyboardTypesKey not bound
|
|
|
@ -1,32 +0,0 @@
|
||||||
!missing-field! _nw_data_transfer_report_all_paths not bound
|
|
||||||
!missing-pinvoke! nw_ethernet_channel_cancel is not bound
|
|
||||||
!missing-pinvoke! nw_ethernet_channel_create is not bound
|
|
||||||
!missing-pinvoke! nw_ethernet_channel_send is not bound
|
|
||||||
!missing-pinvoke! nw_ethernet_channel_set_queue is not bound
|
|
||||||
!missing-pinvoke! nw_ethernet_channel_set_receive_handler is not bound
|
|
||||||
!missing-pinvoke! nw_ethernet_channel_set_state_changed_handler is not bound
|
|
||||||
!missing-pinvoke! nw_ethernet_channel_start is not bound
|
|
||||||
!missing-pinvoke! nw_parameters_create_custom_ip is not bound
|
|
||||||
!missing-pinvoke! nw_framer_async is not bound
|
|
||||||
!missing-pinvoke! nw_framer_copy_local_endpoint is not bound
|
|
||||||
!missing-pinvoke! nw_framer_copy_parameters is not bound
|
|
||||||
!missing-pinvoke! nw_framer_copy_remote_endpoint is not bound
|
|
||||||
!missing-pinvoke! nw_framer_create_options is not bound
|
|
||||||
!missing-pinvoke! nw_framer_deliver_input is not bound
|
|
||||||
!missing-pinvoke! nw_framer_deliver_input_no_copy is not bound
|
|
||||||
!missing-pinvoke! nw_framer_mark_failed_with_error is not bound
|
|
||||||
!missing-pinvoke! nw_framer_mark_ready is not bound
|
|
||||||
!missing-pinvoke! nw_framer_parse_input is not bound
|
|
||||||
!missing-pinvoke! nw_framer_parse_output is not bound
|
|
||||||
!missing-pinvoke! nw_framer_pass_through_input is not bound
|
|
||||||
!missing-pinvoke! nw_framer_pass_through_output is not bound
|
|
||||||
!missing-pinvoke! nw_framer_prepend_application_protocol is not bound
|
|
||||||
!missing-pinvoke! nw_framer_schedule_wakeup is not bound
|
|
||||||
!missing-pinvoke! nw_framer_set_cleanup_handler is not bound
|
|
||||||
!missing-pinvoke! nw_framer_set_input_handler is not bound
|
|
||||||
!missing-pinvoke! nw_framer_set_output_handler is not bound
|
|
||||||
!missing-pinvoke! nw_framer_set_stop_handler is not bound
|
|
||||||
!missing-pinvoke! nw_framer_set_wakeup_handler is not bound
|
|
||||||
!missing-pinvoke! nw_framer_write_output is not bound
|
|
||||||
!missing-pinvoke! nw_framer_write_output_data is not bound
|
|
||||||
!missing-pinvoke! nw_framer_write_output_no_copy is not bound
|
|
|
@ -1,24 +0,0 @@
|
||||||
!missing-field! _nw_data_transfer_report_all_paths not bound
|
|
||||||
!missing-pinvoke! nw_framer_async is not bound
|
|
||||||
!missing-pinvoke! nw_framer_copy_local_endpoint is not bound
|
|
||||||
!missing-pinvoke! nw_framer_copy_parameters is not bound
|
|
||||||
!missing-pinvoke! nw_framer_copy_remote_endpoint is not bound
|
|
||||||
!missing-pinvoke! nw_framer_create_options is not bound
|
|
||||||
!missing-pinvoke! nw_framer_deliver_input is not bound
|
|
||||||
!missing-pinvoke! nw_framer_deliver_input_no_copy is not bound
|
|
||||||
!missing-pinvoke! nw_framer_mark_failed_with_error is not bound
|
|
||||||
!missing-pinvoke! nw_framer_mark_ready is not bound
|
|
||||||
!missing-pinvoke! nw_framer_parse_input is not bound
|
|
||||||
!missing-pinvoke! nw_framer_parse_output is not bound
|
|
||||||
!missing-pinvoke! nw_framer_pass_through_input is not bound
|
|
||||||
!missing-pinvoke! nw_framer_pass_through_output is not bound
|
|
||||||
!missing-pinvoke! nw_framer_prepend_application_protocol is not bound
|
|
||||||
!missing-pinvoke! nw_framer_schedule_wakeup is not bound
|
|
||||||
!missing-pinvoke! nw_framer_set_cleanup_handler is not bound
|
|
||||||
!missing-pinvoke! nw_framer_set_input_handler is not bound
|
|
||||||
!missing-pinvoke! nw_framer_set_output_handler is not bound
|
|
||||||
!missing-pinvoke! nw_framer_set_stop_handler is not bound
|
|
||||||
!missing-pinvoke! nw_framer_set_wakeup_handler is not bound
|
|
||||||
!missing-pinvoke! nw_framer_write_output is not bound
|
|
||||||
!missing-pinvoke! nw_framer_write_output_data is not bound
|
|
||||||
!missing-pinvoke! nw_framer_write_output_no_copy is not bound
|
|
|
@ -1,24 +0,0 @@
|
||||||
!missing-field! _nw_data_transfer_report_all_paths not bound
|
|
||||||
!missing-pinvoke! nw_framer_async is not bound
|
|
||||||
!missing-pinvoke! nw_framer_copy_local_endpoint is not bound
|
|
||||||
!missing-pinvoke! nw_framer_copy_parameters is not bound
|
|
||||||
!missing-pinvoke! nw_framer_copy_remote_endpoint is not bound
|
|
||||||
!missing-pinvoke! nw_framer_create_options is not bound
|
|
||||||
!missing-pinvoke! nw_framer_deliver_input is not bound
|
|
||||||
!missing-pinvoke! nw_framer_deliver_input_no_copy is not bound
|
|
||||||
!missing-pinvoke! nw_framer_mark_failed_with_error is not bound
|
|
||||||
!missing-pinvoke! nw_framer_mark_ready is not bound
|
|
||||||
!missing-pinvoke! nw_framer_parse_input is not bound
|
|
||||||
!missing-pinvoke! nw_framer_parse_output is not bound
|
|
||||||
!missing-pinvoke! nw_framer_pass_through_input is not bound
|
|
||||||
!missing-pinvoke! nw_framer_pass_through_output is not bound
|
|
||||||
!missing-pinvoke! nw_framer_prepend_application_protocol is not bound
|
|
||||||
!missing-pinvoke! nw_framer_schedule_wakeup is not bound
|
|
||||||
!missing-pinvoke! nw_framer_set_cleanup_handler is not bound
|
|
||||||
!missing-pinvoke! nw_framer_set_input_handler is not bound
|
|
||||||
!missing-pinvoke! nw_framer_set_output_handler is not bound
|
|
||||||
!missing-pinvoke! nw_framer_set_stop_handler is not bound
|
|
||||||
!missing-pinvoke! nw_framer_set_wakeup_handler is not bound
|
|
||||||
!missing-pinvoke! nw_framer_write_output is not bound
|
|
||||||
!missing-pinvoke! nw_framer_write_output_data is not bound
|
|
||||||
!missing-pinvoke! nw_framer_write_output_no_copy is not bound
|
|
|
@ -8,6 +8,10 @@ SdkVersions.cs: ../common/SdkVersions.cs.in Makefile $(TOP)/Make.config
|
||||||
-e 's/@MIN_WATCHOS_SIMULATOR_VERSION@/$(MIN_WATCHOS_SIMULATOR_VERSION)/' \
|
-e 's/@MIN_WATCHOS_SIMULATOR_VERSION@/$(MIN_WATCHOS_SIMULATOR_VERSION)/' \
|
||||||
-e 's/@MIN_WATCHOS_COMPANION_SIMULATOR_VERSION@/$(MIN_WATCHOS_COMPANION_SIMULATOR_VERSION)/' \
|
-e 's/@MIN_WATCHOS_COMPANION_SIMULATOR_VERSION@/$(MIN_WATCHOS_COMPANION_SIMULATOR_VERSION)/' \
|
||||||
-e 's/@MIN_TVOS_SIMULATOR_VERSION@/$(MIN_TVOS_SIMULATOR_VERSION)/' \
|
-e 's/@MIN_TVOS_SIMULATOR_VERSION@/$(MIN_TVOS_SIMULATOR_VERSION)/' \
|
||||||
|
-e "s/@MAX_IOS_VERSION@/$(MAX_IOS_VERSION)/g" \
|
||||||
|
-e "s/@MAX_MACOS_VERSION@/$(MAX_MACOS_VERSION)/g" \
|
||||||
|
-e "s/@MAX_WATCH_VERSION@/$(MAX_WATCH_VERSION)/g" \
|
||||||
|
-e "s/@MAX_TVOS_VERSION@/$(MAX_TVOS_VERSION)/g" \
|
||||||
$< > $@
|
$< > $@
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -42,6 +42,7 @@ namespace Xamarin.Bundler
|
||||||
#endif
|
#endif
|
||||||
"cctor-beforefieldinit",
|
"cctor-beforefieldinit",
|
||||||
"custom-attributes-removal",
|
"custom-attributes-removal",
|
||||||
|
"experimental-xforms-product-type",
|
||||||
};
|
};
|
||||||
|
|
||||||
enum Opt
|
enum Opt
|
||||||
|
@ -62,6 +63,7 @@ namespace Xamarin.Bundler
|
||||||
SealAndDevirtualize,
|
SealAndDevirtualize,
|
||||||
StaticConstructorBeforeFieldInit,
|
StaticConstructorBeforeFieldInit,
|
||||||
CustomAttributesRemoval,
|
CustomAttributesRemoval,
|
||||||
|
ExperimentalFormsProductType,
|
||||||
}
|
}
|
||||||
|
|
||||||
bool? all;
|
bool? all;
|
||||||
|
@ -145,6 +147,11 @@ namespace Xamarin.Bundler
|
||||||
set { values [(int) Opt.CustomAttributesRemoval] = value; }
|
set { values [(int) Opt.CustomAttributesRemoval] = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool? ExperimentalFormsProductType {
|
||||||
|
get { return values [(int) Opt.ExperimentalFormsProductType]; }
|
||||||
|
set { values [(int) Opt.ExperimentalFormsProductType] = value; }
|
||||||
|
}
|
||||||
|
|
||||||
public Optimizations ()
|
public Optimizations ()
|
||||||
{
|
{
|
||||||
values = new bool? [opt_names.Length];
|
values = new bool? [opt_names.Length];
|
||||||
|
|
|
@ -27,6 +27,11 @@ namespace Xamarin {
|
||||||
public const string MinWatchOSCompanionSimulator = "@MIN_WATCHOS_COMPANION_SIMULATOR_VERSION@";
|
public const string MinWatchOSCompanionSimulator = "@MIN_WATCHOS_COMPANION_SIMULATOR_VERSION@";
|
||||||
public const string MinTVOSSimulator = "@MIN_TVOS_SIMULATOR_VERSION@";
|
public const string MinTVOSSimulator = "@MIN_TVOS_SIMULATOR_VERSION@";
|
||||||
|
|
||||||
|
public const string MaxiOSSimulator = "@MAX_IOS_VERSION@";
|
||||||
|
public const string MaxWatchOSSimulator = "@MAX_WATCH_VERSION@";
|
||||||
|
public const string MaxWatchOSCompanionSimulator = "@MAX_IOS_VERSION@";
|
||||||
|
public const string MaxTVOSSimulator = "@MAX_TVOS_VERSION@";
|
||||||
|
|
||||||
public static Version OSXVersion { get { return new Version (OSX); }}
|
public static Version OSXVersion { get { return new Version (OSX); }}
|
||||||
public static Version iOSVersion { get { return new Version (iOS); }}
|
public static Version iOSVersion { get { return new Version (iOS); }}
|
||||||
public static Version WatchOSVersion { get { return new Version (WatchOS); }}
|
public static Version WatchOSVersion { get { return new Version (WatchOS); }}
|
||||||
|
@ -39,9 +44,14 @@ namespace Xamarin {
|
||||||
|
|
||||||
public static Version MiniOSSimulatorVersion { get { return new Version (MiniOSSimulator); }}
|
public static Version MiniOSSimulatorVersion { get { return new Version (MiniOSSimulator); }}
|
||||||
public static Version MinWatchOSSimulatorVersion { get { return new Version (MinWatchOSSimulator); }}
|
public static Version MinWatchOSSimulatorVersion { get { return new Version (MinWatchOSSimulator); }}
|
||||||
public static Version MinWatchOSCompanionSimulatorVersion { get { return new Version (MinWatchOSSimulator); }}
|
public static Version MinWatchOSCompanionSimulatorVersion { get { return new Version (MinWatchOSCompanionSimulator); }}
|
||||||
public static Version MinTVOSSimulatorVersion { get { return new Version (MinTVOSSimulator); }}
|
public static Version MinTVOSSimulatorVersion { get { return new Version (MinTVOSSimulator); }}
|
||||||
|
|
||||||
|
public static Version MaxiOSSimulatorVersion { get { return new Version (MaxiOSSimulator); }}
|
||||||
|
public static Version MaxWatchOSSimulatorVersion { get { return new Version (MaxWatchOSSimulator); }}
|
||||||
|
public static Version MaxWatchOSCompanionSimulatorVersion { get { return new Version (MaxWatchOSCompanionSimulator); }}
|
||||||
|
public static Version MaxTVOSSimulatorVersion { get { return new Version (MaxTVOSSimulator); }}
|
||||||
|
|
||||||
public static Version XcodeVersion { get { return new Version (Xcode); }}
|
public static Version XcodeVersion { get { return new Version (Xcode); }}
|
||||||
|
|
||||||
#if MTOUCH || MMP
|
#if MTOUCH || MMP
|
||||||
|
|
|
@ -83,6 +83,10 @@ namespace InstallSources
|
||||||
Console.WriteLine($"Mono path is {monoPath}");
|
Console.WriteLine($"Mono path is {monoPath}");
|
||||||
return File.Exists(monoPath);
|
return File.Exists(monoPath);
|
||||||
}
|
}
|
||||||
|
// check if the path is the xamarin source path + the mono external submodule
|
||||||
|
var monoSubmodule = Path.Combine (XamarinSourcePath.Replace ("src/", ""), "external", "mono");
|
||||||
|
if (path.StartsWith (monoSubmodule, StringComparison.Ordinal))
|
||||||
|
return true;
|
||||||
if (path.StartsWith (XamarinSourcePath, StringComparison.Ordinal))
|
if (path.StartsWith (XamarinSourcePath, StringComparison.Ordinal))
|
||||||
return false;
|
return false;
|
||||||
var xamarinRuntimePath = XamarinSourcePath.Replace($"/{srcSubPath}/", $"/{runtimeSubPath}/");
|
var xamarinRuntimePath = XamarinSourcePath.Replace($"/{srcSubPath}/", $"/{runtimeSubPath}/");
|
||||||
|
|
|
@ -33,6 +33,7 @@ using System;
|
||||||
using Mono.Cecil;
|
using Mono.Cecil;
|
||||||
using Mono.Linker;
|
using Mono.Linker;
|
||||||
using Mono.Tuner;
|
using Mono.Tuner;
|
||||||
|
using Xamarin.Bundler;
|
||||||
|
|
||||||
namespace Xamarin.Linker.Steps {
|
namespace Xamarin.Linker.Steps {
|
||||||
|
|
||||||
|
@ -151,9 +152,15 @@ namespace Xamarin.Linker.Steps {
|
||||||
return (method.DeclaringType.Module.Assembly.Name.Name == ProductAssembly);
|
return (method.DeclaringType.Module.Assembly.Name.Name == ProductAssembly);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool IsProductType (TypeDefinition type)
|
bool IsProductType (TypeDefinition type)
|
||||||
{
|
{
|
||||||
return type.Module.Assembly.Name.Name == ProductAssembly;
|
var name = type.Module.Assembly.Name.Name;
|
||||||
|
switch (name) {
|
||||||
|
case "Xamarin.Forms.Platform.iOS":
|
||||||
|
return LinkContext.App.Optimizations.ExperimentalFormsProductType == true;
|
||||||
|
default:
|
||||||
|
return name == ProductAssembly;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -260,12 +260,7 @@ namespace xsiminstaller {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (install.Count > 0) {
|
if (install.Count > 0) {
|
||||||
if (only_check) {
|
|
||||||
foreach (var sim in install)
|
|
||||||
Console.WriteLine ($"{sim} (unknown)");
|
|
||||||
} else {
|
|
||||||
Console.WriteLine ("Unknown simulators: {0}", string.Join (", ", install));
|
Console.WriteLine ("Unknown simulators: {0}", string.Join (", ", install));
|
||||||
}
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче