Merge remote-tracking branch 'xamarin/xcode11.3' into master-xcode11.3
This commit is contained in:
Коммит
9ac17bdbcf
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))
|
||||
|
||||
# Xcode version should have both a major and a minor version (even if the minor version is 0)
|
||||
XCODE_VERSION=11.2
|
||||
XCODE_URL=http://xamarin-storage/bot-provisioning/xcodes/Xcode_11.2.xip
|
||||
XCODE_DEVELOPER_ROOT=/Applications/Xcode112.app/Contents/Developer
|
||||
XCODE_VERSION=11.3
|
||||
XCODE_URL=http://xamarin-storage/bot-provisioning/xcodes/Xcode_11.3.xip
|
||||
XCODE_DEVELOPER_ROOT=/Applications/Xcode113.app/Contents/Developer
|
||||
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
|
||||
|
@ -107,9 +107,9 @@ TVOS_SDK_VERSION=13.2
|
|||
# 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
|
||||
# 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_TVOS_VERSION=$(TVOS_SDK_VERSION)
|
||||
MAX_TVOS_VERSION=13.3
|
||||
|
||||
# Minimum OS versions for running XI/XM apps.
|
||||
MIN_IOS_SDK_VERSION=7.0
|
||||
|
|
|
@ -43,5 +43,5 @@
|
|||
# line changed in git).
|
||||
#
|
||||
|
||||
IOS_PACKAGE_VERSION=13.15.0.$(IOS_COMMIT_DISTANCE)
|
||||
MAC_PACKAGE_VERSION=6.15.0.$(MAC_COMMIT_DISTANCE)
|
||||
IOS_PACKAGE_VERSION=13.15.1.$(IOS_COMMIT_DISTANCE)
|
||||
MAC_PACKAGE_VERSION=6.15.1.$(MAC_COMMIT_DISTANCE)
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
<string>13.0</string>
|
||||
<string>13.1</string>
|
||||
<string>13.2</string>
|
||||
<string>13.3</string>
|
||||
</array>
|
||||
<key>tvOS</key>
|
||||
<array>
|
||||
|
@ -57,6 +58,7 @@
|
|||
<string>12.4</string>
|
||||
<string>13.0</string>
|
||||
<string>13.2</string>
|
||||
<string>13.3</string>
|
||||
</array>
|
||||
<key>watchOS</key>
|
||||
<array>
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
#if !XAMCORE_4_0
|
||||
using System;
|
||||
|
||||
using Foundation;
|
||||
using ObjCRuntime;
|
||||
|
||||
namespace Metal {
|
||||
|
@ -9,4 +12,43 @@ namespace Metal {
|
|||
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,
|
||||
}
|
||||
|
||||
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)]
|
||||
public class NWFramer : NativeObject {
|
||||
internal NWFramer (IntPtr handle, bool owns) : base (handle, owns) {}
|
||||
/*
|
||||
|
||||
[DllImport (Constants.NetworkLibrary)]
|
||||
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)]
|
||||
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);
|
||||
if (del != null) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
[BindingImpl (BindingImplOptions.Optimizable)]
|
||||
public Action<NWFramer, NWProtocolMetadata, nuint, bool> OutputHandler {
|
||||
public Action<NWFramer, NWFramerMessage, nuint, bool> OutputHandler {
|
||||
set {
|
||||
unsafe {
|
||||
if (value == null) {
|
||||
|
@ -180,21 +183,22 @@ namespace Network {
|
|||
[DllImport (Constants.NetworkLibrary)]
|
||||
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;
|
||||
|
||||
[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) {
|
||||
var nwFramer = new NWFramer (framer, owns: true);
|
||||
del (nwFramer);
|
||||
return del (nwFramer);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
[BindingImpl (BindingImplOptions.Optimizable)]
|
||||
public Action<NWFramer> InputHandler {
|
||||
public NWFramerInputDelegate InputHandler {
|
||||
set {
|
||||
unsafe {
|
||||
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);
|
||||
|
||||
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)
|
||||
{
|
||||
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);
|
||||
|
||||
public void ScheduleWakeup (ulong milliseconds) => nw_framer_schedule_wakeup (GetCheckedHandle (), milliseconds);
|
||||
*/
|
||||
|
||||
[DllImport (Constants.NetworkLibrary)]
|
||||
static extern OS_nw_protocol_metadata nw_framer_message_create (OS_nw_framer framer);
|
||||
|
@ -261,7 +264,6 @@ namespace Network {
|
|||
public NWFramerMessage CreateMessage ()
|
||||
=> new NWFramerMessage (nw_framer_message_create (GetCheckedHandle ()), owns: true);
|
||||
|
||||
/*
|
||||
[DllImport (Constants.NetworkLibrary)]
|
||||
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)]
|
||||
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)
|
||||
throw new ArgumentNullException (nameof (message));
|
||||
|
@ -305,11 +307,12 @@ namespace Network {
|
|||
[DllImport (Constants.NetworkLibrary)]
|
||||
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)
|
||||
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)]
|
||||
|
@ -399,23 +402,24 @@ namespace Network {
|
|||
[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);
|
||||
|
||||
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;
|
||||
|
||||
[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) {
|
||||
var bBuffer = new byte[buffer_length];
|
||||
Marshal.Copy (buffer, bBuffer, 0, (int)buffer_length);
|
||||
var mValue = new Memory<byte>(bBuffer);
|
||||
del (mValue, is_complete);
|
||||
return del (mValue, is_complete);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
[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)
|
||||
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)]
|
||||
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)
|
||||
throw new ArgumentNullException (nameof (message));
|
||||
|
@ -470,6 +447,5 @@ namespace Network {
|
|||
nw_framer_deliver_input (GetCheckedHandle (),mh, (nuint)buffer.Length, message.Handle, isComplete);
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
|
|
@ -177,6 +177,32 @@ namespace Network {
|
|||
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)]
|
||||
static extern nw_parameters_t nw_parameters_create ();
|
||||
|
||||
|
|
|
@ -1603,8 +1603,14 @@ namespace ObjCRuntime {
|
|||
|
||||
static int MajorVersion = -1;
|
||||
static int MinorVersion = -1;
|
||||
static int BuildVersion = -1;
|
||||
|
||||
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) {
|
||||
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))
|
||||
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)
|
||||
|
|
|
@ -31,6 +31,11 @@ namespace WatchKit {
|
|||
{
|
||||
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; }
|
||||
|
||||
[NoMac]
|
||||
[Deprecated (PlatformName.iOS, 13, 0)] // Undocumented replacement
|
||||
[Export ("URLForItemWithPersistentIdentifier:")]
|
||||
NSUrl GetUrlForItem (string persistentIdentifier);
|
||||
|
||||
|
|
|
@ -1177,6 +1177,7 @@ NETWORK_SOURCES = \
|
|||
Network/NWConnection.cs \
|
||||
Network/NWContentContext.cs \
|
||||
Network/NWDataTransferReport.cs \
|
||||
Network/NWEthernetChannel.cs \
|
||||
Network/NWEstablishmentReport.cs \
|
||||
Network/NWEndpoint.cs \
|
||||
Network/NWError.cs \
|
||||
|
|
21
src/metal.cs
21
src/metal.cs
|
@ -597,7 +597,12 @@ namespace Metal {
|
|||
#endif
|
||||
[NoiOS, NoTV, Mac (10,15)]
|
||||
[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);
|
||||
#endif
|
||||
}
|
||||
|
||||
[iOS (8,0)][Mac (10,11)]
|
||||
|
@ -1363,7 +1368,12 @@ namespace Metal {
|
|||
#endif
|
||||
[NoiOS, NoTV, Mac (10, 15)]
|
||||
[NullAllowed, Export ("counterSets")]
|
||||
#if XAMCORE_4_0
|
||||
IMTLCounterSet[] CounterSets { get; }
|
||||
#else
|
||||
[Obsolete ("Use 'GetIMTLCounterSets' instead.")]
|
||||
MTLCounterSet[] CounterSets { get; }
|
||||
#endif
|
||||
|
||||
#if XAMCORE_4_0
|
||||
[Abstract]
|
||||
|
@ -1371,7 +1381,12 @@ namespace Metal {
|
|||
[NoiOS, NoTV, Mac (10,15)]
|
||||
[Export ("newCounterSampleBufferWithDescriptor:error:")]
|
||||
[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);
|
||||
#endif
|
||||
|
||||
#if XAMCORE_4_0
|
||||
[Abstract]
|
||||
|
@ -4148,7 +4163,9 @@ namespace Metal {
|
|||
|
||||
[NoiOS, NoTV, Mac (10,15)]
|
||||
[Protocol]
|
||||
#if !XAMCORE_4_0
|
||||
[BaseType (typeof(NSObject))]
|
||||
#endif
|
||||
interface MTLCounter {
|
||||
[Abstract]
|
||||
[Export ("name")]
|
||||
|
@ -4159,7 +4176,9 @@ namespace Metal {
|
|||
|
||||
[NoiOS, NoTV, Mac (10,15)]
|
||||
[Protocol]
|
||||
#if !XAMCORE_4_0
|
||||
[BaseType (typeof(NSObject))]
|
||||
#endif
|
||||
interface MTLCounterSet {
|
||||
[Abstract]
|
||||
[Export ("name")]
|
||||
|
@ -4174,7 +4193,9 @@ namespace Metal {
|
|||
|
||||
[NoiOS, NoTV, Mac (10,15)]
|
||||
[Protocol]
|
||||
#if !XAMCORE_4_0
|
||||
[BaseType (typeof(NSObject))]
|
||||
#endif
|
||||
interface MTLCounterSampleBuffer {
|
||||
[Abstract]
|
||||
[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_CLEAR=$(tput sgr0 2>/dev/null || true)
|
||||
COLOR_RESET=uniquesearchablestring
|
||||
FAILURE_PREFIX=
|
||||
if test -z "$COLOR_RED"; then FAILURE_PREFIX="** failure ** "; fi
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
|
@ -950,7 +953,7 @@ function check_simulators ()
|
|||
local XCODE
|
||||
|
||||
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
|
||||
warn "Can't check if simulators are available, because siminstaller failed to build."
|
||||
|
@ -976,13 +979,17 @@ function check_simulators ()
|
|||
fi
|
||||
if [[ "$FAILED_SIMULATORS" =~ "Unknown simulators:" ]]; then
|
||||
$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 that's the case, you can list the available simulators with ${COLOR_MAGENTA}make -C tools/siminstaller print-simulators${COLOR_RESET},"
|
||||
$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 --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 " 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
|
||||
if ! test -z $PROVISION_SIMULATORS; then
|
||||
mono --debug tools/siminstaller/bin/Debug/siminstaller.exe -q --xcode "$XCODE" "${SIMS[@]}"
|
||||
ok "Extra simulators installed successfully: '${FAILED_SIMULATORS//$'\n'/', '}'"
|
||||
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'/', '}'"
|
||||
fi
|
||||
else
|
||||
$action "The simulators '${FAILED_SIMULATORS//$'\n'/', '}' are not installed or need to be upgraded."
|
||||
fi
|
||||
|
|
|
@ -424,3 +424,8 @@ Platform32:System.Reflection.Tests.RuntimeReflectionExtensionsTests.GetRuntimeMe
|
|||
# random OOMs
|
||||
Platform32:System.Collections.Tests.HashtableTests.Ctor_Int_Int_GenerateNewPrime
|
||||
Platform32:System.Tests.BitConverterTests.ToString_ByteArrayTooLong_Throws
|
||||
# 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, ...])
|
||||
# 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
|
||||
# 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);
|
||||
#else
|
||||
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
|
||||
default:
|
||||
throw new NotImplementedException ();
|
||||
|
@ -644,6 +656,22 @@ partial class TestRuntime
|
|||
#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)
|
||||
{
|
||||
if (CheckWatchOSSystemVersion (major, minor, throwIfOtherPlatform))
|
||||
|
|
|
@ -239,6 +239,8 @@ namespace Introspection {
|
|||
return Runtime.Arch == Arch.SIMULATOR;
|
||||
case "AVAudioRecorder": // Stopped working with Xcode 11.2 beta 2
|
||||
return TestRuntime.CheckXcodeVersion (11, 2);
|
||||
case "UIMenuController": // Stopped working with Xcode 11.3 beta 1
|
||||
return TestRuntime.CheckXcodeVersion (11, 3);
|
||||
default:
|
||||
return base.Skip (type);
|
||||
}
|
||||
|
|
|
@ -202,6 +202,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]
|
||||
public void MultiPathServicePropertyTest ()
|
||||
{
|
||||
|
|
|
@ -859,7 +859,7 @@ namespace xharness
|
|||
});
|
||||
var runLog = Log.CreateAggregatedLog (callbackLog, main_log);
|
||||
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) {
|
||||
// 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;
|
||||
case AppRunnerTarget.Simulator_iOS64:
|
||||
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;
|
||||
case AppRunnerTarget.Simulator_iOS:
|
||||
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;
|
||||
case AppRunnerTarget.Simulator_tvOS:
|
||||
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;
|
||||
case AppRunnerTarget.Simulator_watchOS:
|
||||
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_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;
|
||||
default:
|
||||
throw new Exception (string.Format ("Unknown simulator target: {0}", target));
|
||||
|
|
|
@ -32,3 +32,6 @@
|
|||
|
||||
## xcode 10.0 backlog
|
||||
!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! CFXMLTreeGetNode is not 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_COMPANION_SIMULATOR_VERSION@/$(MIN_WATCHOS_COMPANION_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" \
|
||||
$< > $@
|
||||
|
||||
|
||||
|
|
|
@ -27,6 +27,11 @@ namespace Xamarin {
|
|||
public const string MinWatchOSCompanionSimulator = "@MIN_WATCHOS_COMPANION_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 iOSVersion { get { return new Version (iOS); }}
|
||||
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 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 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); }}
|
||||
|
||||
#if MTOUCH || MMP
|
||||
|
|
|
@ -260,12 +260,7 @@ namespace xsiminstaller {
|
|||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче