[net8.0] Merge main into net8.0.

This commit is contained in:
Rolf Bjarne Kvinge 2023-08-16 11:19:56 +02:00
Родитель b4975e2493 5bf5bf6042
Коммит c8ae3dc072
25 изменённых файлов: 1590 добавлений и 96 удалений

Просмотреть файл

@ -3749,3 +3749,28 @@ This exception will have an inner exception which gives the reason for the failu
### MT8036: Failed to convert the value at index {index} from {type} to {type}.
This exception will have an inner exception which gives the reason for the failure.
<a name="MX8056" />
### MX8056: Failed to marshal the Objective-C object {handle} (type: {objc_type}). Could not find an existing managed instance for this object, nor was it possible to create a new managed instance of generic type {managed_type}.
This occurs when the Xamarin.iOS runtime finds an Objective-C object without a
corresponding managed wrapper object, and when trying to create that managed
wrapper, it turns out it's not possible. This error is specific to the managed
static registrar.
There are a few reasons this may happen:
* A managed wrapper existed at some point, but was collected by the GC. If the
native object is still alive, and later resurfaces to managed code, the
Xamarin.iOS runtime will try to re-create a managed wrapper instance. In
most cases the problem here is that the managed wrapper shouldn't have been
collected by the GC in the first place.
Possible causes include:
* Manually calling Dispose too early on the managed wrapper.
* Incorrect bindings for third-party libraries.
* Reference-counting bugs in third-party libraries.
* This indicates a bug in Xamarin.iOS. Please file a new issue on [github](https://github.com/xamarin/xamarin-macios/issues/new).

Просмотреть файл

@ -8,8 +8,15 @@
<Import Project="Xamarin.Shared.Sdk.TargetFrameworkInference.props" />
<!-- Imports the .user.env file if exists and the build is from VS -->
<Import Project="$(MSBuildProjectFullPath).user.env" Condition="Exists('$(MSBuildProjectFullPath).user.env') And '$(BuildingInsideVisualStudio)' == 'true'" />
<PropertyGroup>
<!-- e.g: C:\Users\user1\app1\app1\obj\ -->
<_MobilePropsDir>$([System.IO.Path]::Combine($(MSBuildProjectDirectory), $(BaseIntermediateOutputPath)))</_MobilePropsDir>
<!-- e.g: C:\Users\user1\app1\app1\obj\app1.mobile.props -->
<_MobilePropsPath>$(_MobilePropsDir)$(MSBuildProjectName).mobile.props</_MobilePropsPath>
</PropertyGroup>
<!-- Imports the .mobile.props file if exists and the build is from VS -->
<Import Project="$(_MobilePropsPath)" Condition="Exists('$(_MobilePropsPath)') And '$(BuildingInsideVisualStudio)' == 'true'" />
<PropertyGroup>
<!-- Set to true when using the Microsoft.<platform>.Sdk NuGet. This is used by pre-existing/shared targets to tweak behavior depending on build system -->

Просмотреть файл

@ -34,7 +34,10 @@ namespace Xamarin.MacDev.Tasks {
{
var result = new List<ITaskItem> ();
foreach (var file in File) {
var document = XDocument.Load (file.ItemSpec);
// XDocument.Load(string) takes a string to a URI, not a file path, so with certain characters that becomes a problem.
// Just File.OpenRead instead and use the XDocument.Load(Stream) overload instead.
using var stream = global::System.IO.File.OpenRead (file.ItemSpec);
var document = XDocument.Load (stream);
var items = document.Root
.Elements (ItemGroupElementName)

Просмотреть файл

@ -69,6 +69,16 @@ namespace Foundation {
}
#endif
#if NET
// This interface will be made public when the managed static registrar is used.
internal interface INSObjectFactory {
// The method will be implemented via custom linker step if the managed static registrar is used
// for NSObject subclasses which have an (NativeHandle) or (IntPtr) constructor.
[MethodImpl(MethodImplOptions.NoInlining)]
virtual static NSObject _Xamarin_ConstructNSObject (NativeHandle handle) => null;
}
#endif
#if NET && !COREBUILD
[ObjectiveCTrackedType]
[SupportedOSPlatform ("ios")]
@ -81,6 +91,9 @@ namespace Foundation {
#if !COREBUILD
, IEquatable<NSObject>
, IDisposable
#endif
#if NET
, INSObjectFactory
#endif
{
#if !COREBUILD

Просмотреть файл

@ -6,7 +6,6 @@
//
// Copyright 2023 Microsoft Corp
#if NET
#nullable enable
@ -34,6 +33,10 @@ namespace ObjCRuntime {
// This method will be called once per assembly, and the implementation has to
// add all the interface -> wrapper type mappings to the dictionary.
void RegisterWrapperTypes (Dictionary<RuntimeTypeHandle, RuntimeTypeHandle> type);
// Create an instance of a managed NSObject subclass for an existing Objective-C object.
INativeObject? ConstructNSObject (RuntimeTypeHandle typeHandle, NativeHandle nativeHandle);
// Create an instance of a managed NSObject subclass for an existing Objective-C object.
INativeObject? ConstructINativeObject (RuntimeTypeHandle typeHandle, NativeHandle nativeHandle, bool owns);
}
}

Просмотреть файл

@ -1,6 +1,7 @@
#nullable enable
using System;
using System.Runtime.CompilerServices;
using Foundation;
#if !NET
@ -15,6 +16,14 @@ namespace ObjCRuntime {
get;
}
#endif
#if NET
// The method will be implemented via custom linker step if the managed static registrar is used
// for classes which have an (NativeHandle, bool) or (IntPtr, bool) constructor.
// This method will be made public when the managed static registrar is used.
[MethodImpl(MethodImplOptions.NoInlining)]
internal static virtual INativeObject? _Xamarin_ConstructINativeObject (NativeHandle handle, bool owns) => null;
#endif
}
#if !COREBUILD

Просмотреть файл

@ -208,6 +208,22 @@ namespace ObjCRuntime {
return entry.Registrar.LookupTypeId (type.TypeHandle);
}
internal static T? ConstructNSObject<T> (Type type, NativeHandle nativeHandle)
where T : class, INativeObject
{
if (!TryGetMapEntry (type.Assembly.GetName ().Name!, out var entry))
return null;
return (T?) entry.Registrar.ConstructNSObject (type.TypeHandle, nativeHandle);
}
internal static T? ConstructINativeObject<T> (Type type, NativeHandle nativeHandle, bool owns)
where T : class, INativeObject
{
if (!TryGetMapEntry (type.Assembly.GetName ().Name!, out var entry))
return null;
return (T?) entry.Registrar.ConstructINativeObject (type.TypeHandle, nativeHandle, owns);
}
// helper functions for converting between native and managed objects
static NativeHandle ManagedArrayToNSArray (object array, bool retain)
{

Просмотреть файл

@ -1283,38 +1283,65 @@ namespace ObjCRuntime {
}
msg.Append (").");
if (sel != IntPtr.Zero || method_handle.Value != IntPtr.Zero) {
msg.AppendLine ();
msg.AppendLine ("Additional information:");
if (sel != IntPtr.Zero)
msg.Append ("\tSelector: ").Append (Selector.GetName (sel)).AppendLine ();
if (method_handle.Value != IntPtr.Zero) {
try {
var method = MethodBase.GetMethodFromHandle (method_handle);
msg.Append ($"\tMethod: ");
if (method is not null) {
// there's no good built-in function to format a MethodInfo :/
msg.Append (method.DeclaringType?.FullName ?? string.Empty);
msg.Append (".");
msg.Append (method.Name);
msg.Append ("(");
var parameters = method.GetParameters ();
for (var i = 0; i < parameters.Length; i++) {
if (i > 0)
msg.Append (", ");
msg.Append (parameters [i].ParameterType.FullName);
}
msg.Append (")");
} else {
msg.Append ($"Unable to resolve RuntimeMethodHandle 0x{method_handle.Value.ToString ("x")}");
AppendAdditionalInformation (msg, sel, method_handle);
}
throw ErrorHelper.CreateError (8027, msg.ToString ());
}
#if NET
static void CannotCreateManagedInstanceOfGenericType (IntPtr ptr, IntPtr klass, Type type, MissingCtorResolution resolution, IntPtr sel, RuntimeMethodHandle method_handle)
{
if (resolution == MissingCtorResolution.Ignore)
return;
if (klass == IntPtr.Zero)
klass = Class.GetClassForObject (ptr);
var msg = new StringBuilder ();
msg.AppendFormat (Xamarin.Bundler.Errors.MX8056 /* Failed to marshal the Objective-C object 0x{0} (type: {1}). Could not find an existing managed instance for this object, nor was it possible to create a new managed instance of generic type {2}. */, ptr.ToString ("x"), new Class (klass).Name, type.FullName);
if (sel != IntPtr.Zero || method_handle.Value != IntPtr.Zero) {
AppendAdditionalInformation (msg, sel, method_handle);
}
throw ErrorHelper.CreateError (8056, msg.ToString ());
}
#endif
static void AppendAdditionalInformation (StringBuilder msg, IntPtr sel, RuntimeMethodHandle method_handle)
{
msg.AppendLine ();
msg.AppendLine ("Additional information:");
if (sel != IntPtr.Zero)
msg.Append ("\tSelector: ").Append (Selector.GetName (sel)).AppendLine ();
if (method_handle.Value != IntPtr.Zero) {
try {
var method = MethodBase.GetMethodFromHandle (method_handle);
msg.Append ($"\tMethod: ");
if (method is not null) {
// there's no good built-in function to format a MethodInfo :/
msg.Append (method.DeclaringType?.FullName ?? string.Empty);
msg.Append (".");
msg.Append (method.Name);
msg.Append ("(");
var parameters = method.GetParameters ();
for (var i = 0; i < parameters.Length; i++) {
if (i > 0)
msg.Append (", ");
msg.Append (parameters [i].ParameterType.FullName);
}
msg.AppendLine ();
} catch (Exception ex) {
msg.Append ($"\tMethod: Unable to resolve RuntimeMethodHandle 0x{method_handle.Value.ToString ("x")}: {ex.Message}");
msg.Append (")");
} else {
msg.Append ($"Unable to resolve RuntimeMethodHandle 0x{method_handle.Value.ToString ("x")}");
}
msg.AppendLine ();
} catch (Exception ex) {
msg.Append ($"\tMethod: Unable to resolve RuntimeMethodHandle 0x{method_handle.Value.ToString ("x")}: {ex.Message}");
}
}
throw ErrorHelper.CreateError (8027, msg.ToString ());
}
static NSObject? ConstructNSObject (IntPtr ptr, IntPtr klass, MissingCtorResolution missingCtorResolution)
@ -1333,19 +1360,61 @@ namespace ObjCRuntime {
return ConstructNSObject<T> (ptr, typeof (T), MissingCtorResolution.ThrowConstructor1NotFound);
}
// The generic argument T is only used to cast the return value.
// The 'selector' and 'method' arguments are only used in error messages.
static T? ConstructNSObject<T> (IntPtr ptr, Type type, MissingCtorResolution missingCtorResolution) where T : class, INativeObject
static T? ConstructNSObject<T> (IntPtr ptr, Type type, MissingCtorResolution missingCtorResolution) where T : NSObject
{
return ConstructNSObject<T> (ptr, type, missingCtorResolution, IntPtr.Zero, default (RuntimeMethodHandle));
}
// The generic argument T is only used to cast the return value.
// The 'selector' and 'method' arguments are only used in error messages.
#if NET
static T? ConstructNSObject<T> (IntPtr ptr, Type type, MissingCtorResolution missingCtorResolution, IntPtr sel, RuntimeMethodHandle method_handle) where T : NSObject, INSObjectFactory
#else
static T? ConstructNSObject<T> (IntPtr ptr, Type type, MissingCtorResolution missingCtorResolution, IntPtr sel, RuntimeMethodHandle method_handle) where T : class, INativeObject
#endif
{
if (type is null)
throw new ArgumentNullException (nameof (type));
#if NET
if (Runtime.IsManagedStaticRegistrar) {
T? instance = default;
var nativeHandle = new NativeHandle (ptr);
// We want to create an instance of `type` and if we have the chance to use the factory method
// on the generic type, we will prefer it to using the lookup table.
if (typeof (T) == type
&& typeof (T) != typeof (NSObject)
&& !(typeof (T).IsInterface || typeof (T).IsAbstract)) {
instance = ConstructNSObjectViaFactoryMethod (nativeHandle);
}
// Generic types can only be instantiated through the factory method and if that failed, we can't
// fall back to the lookup tables and we need to stop here.
if (type.IsGenericType && instance is null) {
CannotCreateManagedInstanceOfGenericType (ptr, IntPtr.Zero, type, missingCtorResolution, sel, method_handle);
return null;
}
// If we couldn't create an instance of T through the factory method, we'll use the lookup table
// based on the RuntimeTypeHandle.
//
// This isn't possible for generic types - we don't know the type arguments at compile time
// (otherwise we would be able to create an instance of T through the factory method).
// For non-generic types, we can call the NativeHandle constructor based on the RuntimeTypeHandle.
if (instance is null) {
instance = RegistrarHelper.ConstructNSObject<T> (type, nativeHandle);
}
if (instance is null) {
// If we couldn't create an instance using the lookup table either, it means `type` doesn't contain
// a suitable constructor.
MissingCtor (ptr, IntPtr.Zero, type, missingCtorResolution, sel, method_handle);
}
return instance;
}
#endif
var ctor = GetIntPtrConstructor (type);
@ -1366,6 +1435,17 @@ namespace ObjCRuntime {
#endif
return (T) ctor.Invoke (ctorArguments);
#if NET
// It isn't possible to call T._Xamarin_ConstructNSObject (...) directly from the parent function. For some
// types, the app crashes with a SIGSEGV:
//
// error: * Assertion at /Users/runner/work/1/s/src/mono/mono/mini/mini-generic-sharing.c:2283, condition `m_class_get_vtable (info->klass)' not met
//
// When the same call is made from a separate function, it works fine.
static T? ConstructNSObjectViaFactoryMethod (NativeHandle handle)
=> T._Xamarin_ConstructNSObject (handle) as T;
#endif
}
// The generic argument T is only used to cast the return value.
@ -1377,6 +1457,56 @@ namespace ObjCRuntime {
if (type.IsByRef)
type = type.GetElementType ()!;
#if NET
if (Runtime.IsManagedStaticRegistrar) {
var nativeHandle = new NativeHandle (ptr);
T? instance = null;
// We want to create an instance of `type` and if we have the chance to use the factory method
// on the generic type, we will prefer it to using the lookup table.
if (typeof (T) == type
&& typeof (T) != typeof (INativeObject)
&& typeof (T) != typeof (NSObject)
&& !(typeof (T).IsInterface || typeof (T).IsAbstract)) {
instance = ConstructINativeObjectViaFactoryMethod (nativeHandle, owns);
}
// Generic types can only be instantiated through the factory method and if that failed, we can't
// fall back to the lookup tables and we need to stop here.
if (type.IsGenericType && instance is null) {
CannotCreateManagedInstanceOfGenericType (ptr, IntPtr.Zero, type, missingCtorResolution, sel, method_handle);
return null;
}
// If we couldn't create an instance of T through the factory method, we'll use the lookup table
// based on the RuntimeTypeHandle.
//
// This isn't possible for generic types - we don't know the type arguments at compile time
// (otherwise we would be able to create an instance of T through the factory method).
// For non-generic types, we can call the NativeHandle constructor based on the RuntimeTypeHandle.
// If type is an NSObject, we prefer the NSObject lookup table
if (instance is null && type != typeof (NSObject) && type.IsSubclassOf (typeof (NSObject))) {
instance = (T?)(INativeObject?) RegistrarHelper.ConstructNSObject<T> (type, nativeHandle);
if (instance is not null && owns) {
Runtime.TryReleaseINativeObject (instance);
}
}
if (instance is null && type != typeof (INativeObject)) {
instance = RegistrarHelper.ConstructINativeObject<T> (type, nativeHandle, owns);
}
if (instance is null) {
// If we couldn't create an instance using the lookup table either, it means `type` doesn't contain
// a suitable constructor.
MissingCtor (ptr, IntPtr.Zero, type, missingCtorResolution, sel, method_handle);
}
return instance;
}
#endif
var ctor = GetIntPtr_BoolConstructor (type);
if (ctor is null) {
@ -1397,6 +1527,17 @@ namespace ObjCRuntime {
ctorArguments [1] = owns;
return (T?) ctor.Invoke (ctorArguments);
#if NET
// It isn't possible to call T._Xamarin_ConstructINativeObject (...) directly from the parent function. For some
// types, the app crashes with a SIGSEGV:
//
// error: * Assertion at /Users/runner/work/1/s/src/mono/mono/mini/mini-generic-sharing.c:2283, condition `m_class_get_vtable (info->klass)' not met
//
// When the same call is made from a separate function, it works fine.
static T? ConstructINativeObjectViaFactoryMethod (NativeHandle nativeHandle, bool owns)
=> T._Xamarin_ConstructINativeObject (nativeHandle, owns) as T;
#endif
}
static IntPtr CreateNSObject (IntPtr type_gchandle, IntPtr handle, NSObject.Flags flags)
@ -1776,7 +1917,7 @@ namespace ObjCRuntime {
// native objects and NSObject instances.
throw ErrorHelper.CreateError (8004, $"Cannot create an instance of {implementation.FullName} for the native object 0x{ptr:x} (of type '{Class.class_getName (Class.GetClassForObject (ptr))}'), because another instance already exists for this native object (of type {o.GetType ().FullName}).");
}
return ConstructNSObject<INativeObject> (ptr, implementation, MissingCtorResolution.ThrowConstructor1NotFound, sel, method_handle);
return ConstructNSObject<NSObject> (ptr, implementation!, MissingCtorResolution.ThrowConstructor1NotFound, sel, method_handle);
}
return ConstructINativeObject<INativeObject> (ptr, owns, implementation, MissingCtorResolution.ThrowConstructor2NotFound, sel, method_handle);
@ -1833,10 +1974,22 @@ namespace ObjCRuntime {
// native objects and NSObject instances.
throw ErrorHelper.CreateError (8004, $"Cannot create an instance of {implementation.FullName} for the native object 0x{ptr:x} (of type '{Class.class_getName (Class.GetClassForObject (ptr))}'), because another instance already exists for this native object (of type {o.GetType ().FullName}).");
}
var rv = (T?) ConstructNSObject<T> (ptr, implementation, MissingCtorResolution.ThrowConstructor1NotFound);
#if NET
if (!Runtime.IsManagedStaticRegistrar) {
// For other registrars other than managed-static the generic parameter of ConstructNSObject is used
// only to cast the return value so we can safely pass NSObject here to satisfy the constraints of the
// generic parameter.
var rv = (T?)(INativeObject?) ConstructNSObject<NSObject> (ptr, implementation, MissingCtorResolution.ThrowConstructor1NotFound, sel, method_handle);
if (owns)
TryReleaseINativeObject (rv);
return rv;
}
#else
var rv = ConstructNSObject<T> (ptr, implementation, MissingCtorResolution.ThrowConstructor1NotFound, sel, method_handle);
if (owns)
TryReleaseINativeObject (rv);
return rv;
#endif
}
return ConstructINativeObject<T> (ptr, owns, implementation, MissingCtorResolution.ThrowConstructor2NotFound, sel, method_handle);

Просмотреть файл

@ -0,0 +1,858 @@
using System.Collections.Generic;
partial class Frameworks {
// GENERATED FILE - DO NOT EDIT
internal readonly HashSet<string> iosframeworks = new HashSet<string> {
"Accelerate",
"Accessibility",
"Accounts",
"AddressBook",
"AddressBookUI",
"AdServices",
"AdSupport",
"AppClip",
"AppTrackingTransparency",
"ARKit",
"AssetsLibrary",
"AudioToolbox",
"AudioUnit",
"AuthenticationServices",
"AutomaticAssessmentConfiguration",
"AVFoundation",
"AVKit",
"AVRouting",
"BackgroundAssets",
"BackgroundTasks",
"BusinessChat",
"CallKit",
"CarPlay",
"CFNetwork",
"Chip",
"ClassKit",
"CloudKit",
"Compression",
"Contacts",
"ContactsUI",
"CoreAnimation",
"CoreAudioKit",
"CoreBluetooth",
"CoreData",
"CoreFoundation",
"CoreGraphics",
"CoreHaptics",
"CoreImage",
"CoreLocation",
"CoreLocationUI",
"CoreMedia",
"CoreMIDI",
"CoreML",
"CoreMotion",
"CoreNFC",
"CoreSpotlight",
"CoreTelephony",
"CoreText",
"CoreVideo",
"DeviceCheck",
"EventKit",
"EventKitUI",
"ExternalAccessory",
"FileProvider",
"FileProviderUI",
"Foundation",
"GameController",
"GameKit",
"GameplayKit",
"GLKit",
"HealthKit",
"HealthKitUI",
"HomeKit",
"iAd",
"IdentityLookup",
"IdentityLookupUI",
"ImageIO",
"Intents",
"IntentsUI",
"IOSurface",
"JavaScriptCore",
"LinkPresentation",
"LocalAuthentication",
"MapKit",
"MediaAccessibility",
"MediaPlayer",
"MediaSetup",
"MediaToolbox",
"Messages",
"MessageUI",
"Metal",
"MetalKit",
"MetalPerformanceShaders",
"MetalPerformanceShadersGraph",
"MetricKit",
"MLCompute",
"MobileCoreServices",
"ModelIO",
"MultipeerConnectivity",
"NaturalLanguage",
"NearbyInteraction",
"Network",
"NetworkExtension",
"NewsstandKit",
"NotificationCenter",
"OpenGLES",
"OSLog",
"PassKit",
"PdfKit",
"PencilKit",
"Phase",
"Photos",
"PhotosUI",
"PushKit",
"PushToTalk",
"QuickLook",
"QuickLookThumbnailing",
"ReplayKit",
"SafariServices",
"SceneKit",
"ScreenTime",
"Security",
"SensorKit",
"SharedWithYou",
"SharedWithYouCore",
"ShazamKit",
"Social",
"SoundAnalysis",
"Speech",
"SpriteKit",
"StoreKit",
"SystemConfiguration",
"ThreadNetwork",
"Twitter",
"UIKit",
"UniformTypeIdentifiers",
"UserNotifications",
"UserNotificationsUI",
"VideoSubscriberAccount",
"VideoToolbox",
"Vision",
"VisionKit",
"WatchConnectivity",
"WatchKit",
"WebKit",
"XKit",
};
// GENERATED FILE - DO NOT EDIT
internal readonly HashSet<string> macosframeworks = new HashSet<string> {
"Accelerate",
"Accessibility",
"Accounts",
"AdServices",
"AdSupport",
"AppKit",
"AppTrackingTransparency",
"AudioToolbox",
"AudioUnit",
"AuthenticationServices",
"AutomaticAssessmentConfiguration",
"AVFoundation",
"AVKit",
"AVRouting",
"BackgroundAssets",
"BusinessChat",
"CallKit",
"CFNetwork",
"Chip",
"ClassKit",
"CloudKit",
"Compression",
"Contacts",
"ContactsUI",
"CoreAnimation",
"CoreAudioKit",
"CoreBluetooth",
"CoreData",
"CoreFoundation",
"CoreGraphics",
"CoreImage",
"CoreLocation",
"CoreMedia",
"CoreMidi",
"CoreML",
"CoreMotion",
"CoreServices",
"CoreSpotlight",
"CoreText",
"CoreVideo",
"CoreWlan",
"DeviceCheck",
"EventKit",
"ExecutionPolicy",
"ExtensionKit",
"ExternalAccessory",
"FileProvider",
"FileProviderUI",
"FinderSync",
"Foundation",
"GameController",
"GameKit",
"GameplayKit",
"GLKit",
"HealthKit",
"ImageCaptureCore",
"ImageIO",
"ImageKit",
"Intents",
"IntentsUI",
"IOSurface",
"iTunesLibrary",
"JavaScriptCore",
"LinkPresentation",
"LocalAuthentication",
"LocalAuthenticationEmbeddedUI",
"MailKit",
"MapKit",
"MediaAccessibility",
"MediaLibrary",
"MediaPlayer",
"MediaToolbox",
"Metal",
"MetalKit",
"MetalPerformanceShaders",
"MetalPerformanceShadersGraph",
"MetricKit",
"MLCompute",
"MobileCoreServices",
"ModelIO",
"MultipeerConnectivity",
"NaturalLanguage",
"NearbyInteraction",
"Network",
"NetworkExtension",
"NotificationCenter",
"OpenGL",
"OSLog",
"PassKit",
"PdfKit",
"PencilKit",
"Phase",
"Photos",
"PhotosUI",
"PrintCore",
"PushKit",
"QTKit",
"QuartzComposer",
"QuickLook",
"QuickLookThumbnailing",
"QuickLookUI",
"ReplayKit",
"SafariServices",
"SceneKit",
"ScreenCaptureKit",
"ScreenTime",
"ScriptingBridge",
"SearchKit",
"Security",
"ServiceManagement",
"SharedWithYou",
"SharedWithYouCore",
"ShazamKit",
"Social",
"SoundAnalysis",
"Speech",
"SpriteKit",
"StoreKit",
"SystemConfiguration",
"ThreadNetwork",
"UniformTypeIdentifiers",
"UserNotifications",
"UserNotificationsUI",
"VideoSubscriberAccount",
"VideoToolbox",
"Vision",
"WebKit",
"XKit",
};
// GENERATED FILE - DO NOT EDIT
internal readonly HashSet<string> watchosframeworks = new HashSet<string> {
"Accelerate",
"Accessibility",
"AuthenticationServices",
"AVFoundation",
"CallKit",
"Chip",
"ClockKit",
"CloudKit",
"Compression",
"Contacts",
"CoreBluetooth",
"CoreData",
"CoreFoundation",
"CoreGraphics",
"CoreLocation",
"CoreMedia",
"CoreML",
"CoreMotion",
"CoreText",
"CoreVideo",
"DeviceCheck",
"EventKit",
"Foundation",
"GameKit",
"HealthKit",
"HomeKit",
"ImageIO",
"Intents",
"LocalAuthentication",
"MapKit",
"MediaPlayer",
"MobileCoreServices",
"NaturalLanguage",
"NearbyInteraction",
"Network",
"OSLog",
"PassKit",
"PushKit",
"SceneKit",
"Security",
"ShazamKit",
"SoundAnalysis",
"SpriteKit",
"StoreKit",
"UIKit",
"UniformTypeIdentifiers",
"UserNotifications",
"WatchConnectivity",
"WatchKit",
"XKit",
};
// GENERATED FILE - DO NOT EDIT
internal readonly HashSet<string> tvosframeworks = new HashSet<string> {
"Accelerate",
"Accessibility",
"AdSupport",
"AppTrackingTransparency",
"AudioToolbox",
"AudioUnit",
"AuthenticationServices",
"AVFoundation",
"AVKit",
"BackgroundTasks",
"CFNetwork",
"Chip",
"CloudKit",
"Compression",
"CoreAnimation",
"CoreBluetooth",
"CoreData",
"CoreFoundation",
"CoreGraphics",
"CoreHaptics",
"CoreImage",
"CoreLocation",
"CoreMedia",
"CoreML",
"CoreSpotlight",
"CoreText",
"CoreVideo",
"DeviceCheck",
"ExternalAccessory",
"Foundation",
"GameController",
"GameKit",
"GameplayKit",
"GLKit",
"HomeKit",
"ImageIO",
"Intents",
"IOSurface",
"JavaScriptCore",
"LinkPresentation",
"MapKit",
"MediaAccessibility",
"MediaPlayer",
"MediaToolbox",
"Metal",
"MetalKit",
"MetalPerformanceShaders",
"MetalPerformanceShadersGraph",
"MLCompute",
"MobileCoreServices",
"ModelIO",
"MultipeerConnectivity",
"NaturalLanguage",
"Network",
"OpenGLES",
"OSLog",
"Photos",
"PhotosUI",
"ReplayKit",
"SceneKit",
"Security",
"SharedWithYou",
"SharedWithYouCore",
"ShazamKit",
"SoundAnalysis",
"SpriteKit",
"StoreKit",
"SystemConfiguration",
"TVMLKit",
"TVServices",
"TVUIKit",
"UIKit",
"UniformTypeIdentifiers",
"UserNotifications",
"VideoSubscriberAccount",
"VideoToolbox",
"Vision",
"XKit",
};
// GENERATED FILE - DO NOT EDIT
internal readonly HashSet<string> maccatalystframeworks = new HashSet<string> {
"Accelerate",
"Accessibility",
"Accounts",
"AddressBook",
"AdServices",
"AdSupport",
"AppClip",
"AppKit",
"AppTrackingTransparency",
"AudioToolbox",
"AudioUnit",
"AuthenticationServices",
"AutomaticAssessmentConfiguration",
"AVFoundation",
"AVKit",
"AVRouting",
"BackgroundAssets",
"BackgroundTasks",
"BusinessChat",
"CallKit",
"CFNetwork",
"ClassKit",
"CloudKit",
"Compression",
"Contacts",
"ContactsUI",
"CoreAnimation",
"CoreAudioKit",
"CoreBluetooth",
"CoreData",
"CoreFoundation",
"CoreGraphics",
"CoreHaptics",
"CoreImage",
"CoreLocation",
"CoreLocationUI",
"CoreMedia",
"CoreMIDI",
"CoreML",
"CoreMotion",
"CoreNFC",
"CoreSpotlight",
"CoreTelephony",
"CoreText",
"CoreVideo",
"CoreWlan",
"DeviceCheck",
"EventKit",
"EventKitUI",
"ExecutionPolicy",
"ExternalAccessory",
"FileProvider",
"Foundation",
"GameController",
"GameKit",
"GameplayKit",
"HealthKit",
"HealthKitUI",
"HomeKit",
"IdentityLookup",
"IdentityLookupUI",
"ImageIO",
"Intents",
"IntentsUI",
"IOSurface",
"JavaScriptCore",
"LinkPresentation",
"LocalAuthentication",
"MapKit",
"MediaAccessibility",
"MediaPlayer",
"MediaToolbox",
"Messages",
"MessageUI",
"Metal",
"MetalKit",
"MetalPerformanceShaders",
"MetalPerformanceShadersGraph",
"MetricKit",
"MLCompute",
"MobileCoreServices",
"ModelIO",
"MultipeerConnectivity",
"NaturalLanguage",
"NearbyInteraction",
"Network",
"NetworkExtension",
"OSLog",
"PassKit",
"PdfKit",
"PencilKit",
"Phase",
"Photos",
"PhotosUI",
"PushKit",
"QuickLook",
"QuickLookThumbnailing",
"ReplayKit",
"SafariServices",
"SceneKit",
"ScreenTime",
"Security",
"SensorKit",
"ServiceManagement",
"SharedWithYou",
"SharedWithYouCore",
"ShazamKit",
"Social",
"SoundAnalysis",
"Speech",
"SpriteKit",
"StoreKit",
"SystemConfiguration",
"ThreadNetwork",
"UIKit",
"UniformTypeIdentifiers",
"UserNotifications",
"UserNotificationsUI",
"VideoToolbox",
"Vision",
"VisionKit",
"WebKit",
"XKit",
};
bool? _Accelerate;
bool? _Accessibility;
bool? _Accounts;
bool? _AddressBook;
bool? _AddressBookUI;
bool? _AdServices;
bool? _AdSupport;
bool? _AppClip;
bool? _AppKit;
bool? _AppTrackingTransparency;
bool? _ARKit;
bool? _AssetsLibrary;
bool? _AudioToolbox;
bool? _AudioUnit;
bool? _AuthenticationServices;
bool? _AutomaticAssessmentConfiguration;
bool? _AVFoundation;
bool? _AVKit;
bool? _AVRouting;
bool? _BackgroundAssets;
bool? _BackgroundTasks;
bool? _BusinessChat;
bool? _CallKit;
bool? _CarPlay;
bool? _CFNetwork;
bool? _Chip;
bool? _ClassKit;
bool? _ClockKit;
bool? _CloudKit;
bool? _Compression;
bool? _Contacts;
bool? _ContactsUI;
bool? _CoreAnimation;
bool? _CoreAudioKit;
bool? _CoreBluetooth;
bool? _CoreData;
bool? _CoreFoundation;
bool? _CoreGraphics;
bool? _CoreHaptics;
bool? _CoreImage;
bool? _CoreLocation;
bool? _CoreLocationUI;
bool? _CoreMedia;
bool? _CoreMidi;
bool? _CoreMIDI;
bool? _CoreML;
bool? _CoreMotion;
bool? _CoreNFC;
bool? _CoreServices;
bool? _CoreSpotlight;
bool? _CoreTelephony;
bool? _CoreText;
bool? _CoreVideo;
bool? _CoreWlan;
bool? _DeviceCheck;
bool? _EventKit;
bool? _EventKitUI;
bool? _ExecutionPolicy;
bool? _ExtensionKit;
bool? _ExternalAccessory;
bool? _FileProvider;
bool? _FileProviderUI;
bool? _FinderSync;
bool? _Foundation;
bool? _GameController;
bool? _GameKit;
bool? _GameplayKit;
bool? _GLKit;
bool? _HealthKit;
bool? _HealthKitUI;
bool? _HomeKit;
bool? _iAd;
bool? _IdentityLookup;
bool? _IdentityLookupUI;
bool? _ImageCaptureCore;
bool? _ImageIO;
bool? _ImageKit;
bool? _Intents;
bool? _IntentsUI;
bool? _IOSurface;
bool? _iTunesLibrary;
bool? _JavaScriptCore;
bool? _LinkPresentation;
bool? _LocalAuthentication;
bool? _LocalAuthenticationEmbeddedUI;
bool? _MailKit;
bool? _MapKit;
bool? _MediaAccessibility;
bool? _MediaLibrary;
bool? _MediaPlayer;
bool? _MediaSetup;
bool? _MediaToolbox;
bool? _Messages;
bool? _MessageUI;
bool? _Metal;
bool? _MetalKit;
bool? _MetalPerformanceShaders;
bool? _MetalPerformanceShadersGraph;
bool? _MetricKit;
bool? _MLCompute;
bool? _MobileCoreServices;
bool? _ModelIO;
bool? _MultipeerConnectivity;
bool? _NaturalLanguage;
bool? _NearbyInteraction;
bool? _Network;
bool? _NetworkExtension;
bool? _NewsstandKit;
bool? _NotificationCenter;
bool? _OpenGL;
bool? _OpenGLES;
bool? _OSLog;
bool? _PassKit;
bool? _PdfKit;
bool? _PencilKit;
bool? _Phase;
bool? _Photos;
bool? _PhotosUI;
bool? _PrintCore;
bool? _PushKit;
bool? _PushToTalk;
bool? _QTKit;
bool? _QuartzComposer;
bool? _QuickLook;
bool? _QuickLookThumbnailing;
bool? _QuickLookUI;
bool? _ReplayKit;
bool? _SafariServices;
bool? _SceneKit;
bool? _ScreenCaptureKit;
bool? _ScreenTime;
bool? _ScriptingBridge;
bool? _SearchKit;
bool? _Security;
bool? _SensorKit;
bool? _ServiceManagement;
bool? _SharedWithYou;
bool? _SharedWithYouCore;
bool? _ShazamKit;
bool? _Social;
bool? _SoundAnalysis;
bool? _Speech;
bool? _SpriteKit;
bool? _StoreKit;
bool? _SystemConfiguration;
bool? _ThreadNetwork;
bool? _TVMLKit;
bool? _TVServices;
bool? _TVUIKit;
bool? _Twitter;
bool? _UIKit;
bool? _UniformTypeIdentifiers;
bool? _UserNotifications;
bool? _UserNotificationsUI;
bool? _VideoSubscriberAccount;
bool? _VideoToolbox;
bool? _Vision;
bool? _VisionKit;
bool? _WatchConnectivity;
bool? _WatchKit;
bool? _WebKit;
bool? _XKit;
public bool HaveAccelerate { get { if (!_Accelerate.HasValue) _Accelerate = GetValue ("Accelerate"); return _Accelerate.Value; } }
public bool HaveAccessibility { get { if (!_Accessibility.HasValue) _Accessibility = GetValue ("Accessibility"); return _Accessibility.Value; } }
public bool HaveAccounts { get { if (!_Accounts.HasValue) _Accounts = GetValue ("Accounts"); return _Accounts.Value; } }
public bool HaveAddressBook { get { if (!_AddressBook.HasValue) _AddressBook = GetValue ("AddressBook"); return _AddressBook.Value; } }
public bool HaveAddressBookUI { get { if (!_AddressBookUI.HasValue) _AddressBookUI = GetValue ("AddressBookUI"); return _AddressBookUI.Value; } }
public bool HaveAdServices { get { if (!_AdServices.HasValue) _AdServices = GetValue ("AdServices"); return _AdServices.Value; } }
public bool HaveAdSupport { get { if (!_AdSupport.HasValue) _AdSupport = GetValue ("AdSupport"); return _AdSupport.Value; } }
public bool HaveAppClip { get { if (!_AppClip.HasValue) _AppClip = GetValue ("AppClip"); return _AppClip.Value; } }
public bool HaveAppKit { get { if (!_AppKit.HasValue) _AppKit = GetValue ("AppKit"); return _AppKit.Value; } }
public bool HaveAppTrackingTransparency { get { if (!_AppTrackingTransparency.HasValue) _AppTrackingTransparency = GetValue ("AppTrackingTransparency"); return _AppTrackingTransparency.Value; } }
public bool HaveARKit { get { if (!_ARKit.HasValue) _ARKit = GetValue ("ARKit"); return _ARKit.Value; } }
public bool HaveAssetsLibrary { get { if (!_AssetsLibrary.HasValue) _AssetsLibrary = GetValue ("AssetsLibrary"); return _AssetsLibrary.Value; } }
public bool HaveAudioToolbox { get { if (!_AudioToolbox.HasValue) _AudioToolbox = GetValue ("AudioToolbox"); return _AudioToolbox.Value; } }
public bool HaveAudioUnit { get { if (!_AudioUnit.HasValue) _AudioUnit = GetValue ("AudioUnit"); return _AudioUnit.Value; } }
public bool HaveAuthenticationServices { get { if (!_AuthenticationServices.HasValue) _AuthenticationServices = GetValue ("AuthenticationServices"); return _AuthenticationServices.Value; } }
public bool HaveAutomaticAssessmentConfiguration { get { if (!_AutomaticAssessmentConfiguration.HasValue) _AutomaticAssessmentConfiguration = GetValue ("AutomaticAssessmentConfiguration"); return _AutomaticAssessmentConfiguration.Value; } }
public bool HaveAVFoundation { get { if (!_AVFoundation.HasValue) _AVFoundation = GetValue ("AVFoundation"); return _AVFoundation.Value; } }
public bool HaveAVKit { get { if (!_AVKit.HasValue) _AVKit = GetValue ("AVKit"); return _AVKit.Value; } }
public bool HaveAVRouting { get { if (!_AVRouting.HasValue) _AVRouting = GetValue ("AVRouting"); return _AVRouting.Value; } }
public bool HaveBackgroundAssets { get { if (!_BackgroundAssets.HasValue) _BackgroundAssets = GetValue ("BackgroundAssets"); return _BackgroundAssets.Value; } }
public bool HaveBackgroundTasks { get { if (!_BackgroundTasks.HasValue) _BackgroundTasks = GetValue ("BackgroundTasks"); return _BackgroundTasks.Value; } }
public bool HaveBusinessChat { get { if (!_BusinessChat.HasValue) _BusinessChat = GetValue ("BusinessChat"); return _BusinessChat.Value; } }
public bool HaveCallKit { get { if (!_CallKit.HasValue) _CallKit = GetValue ("CallKit"); return _CallKit.Value; } }
public bool HaveCarPlay { get { if (!_CarPlay.HasValue) _CarPlay = GetValue ("CarPlay"); return _CarPlay.Value; } }
public bool HaveCFNetwork { get { if (!_CFNetwork.HasValue) _CFNetwork = GetValue ("CFNetwork"); return _CFNetwork.Value; } }
public bool HaveChip { get { if (!_Chip.HasValue) _Chip = GetValue ("Chip"); return _Chip.Value; } }
public bool HaveClassKit { get { if (!_ClassKit.HasValue) _ClassKit = GetValue ("ClassKit"); return _ClassKit.Value; } }
public bool HaveClockKit { get { if (!_ClockKit.HasValue) _ClockKit = GetValue ("ClockKit"); return _ClockKit.Value; } }
public bool HaveCloudKit { get { if (!_CloudKit.HasValue) _CloudKit = GetValue ("CloudKit"); return _CloudKit.Value; } }
public bool HaveCompression { get { if (!_Compression.HasValue) _Compression = GetValue ("Compression"); return _Compression.Value; } }
public bool HaveContacts { get { if (!_Contacts.HasValue) _Contacts = GetValue ("Contacts"); return _Contacts.Value; } }
public bool HaveContactsUI { get { if (!_ContactsUI.HasValue) _ContactsUI = GetValue ("ContactsUI"); return _ContactsUI.Value; } }
public bool HaveCoreAnimation { get { if (!_CoreAnimation.HasValue) _CoreAnimation = GetValue ("CoreAnimation"); return _CoreAnimation.Value; } }
public bool HaveCoreAudioKit { get { if (!_CoreAudioKit.HasValue) _CoreAudioKit = GetValue ("CoreAudioKit"); return _CoreAudioKit.Value; } }
public bool HaveCoreBluetooth { get { if (!_CoreBluetooth.HasValue) _CoreBluetooth = GetValue ("CoreBluetooth"); return _CoreBluetooth.Value; } }
public bool HaveCoreData { get { if (!_CoreData.HasValue) _CoreData = GetValue ("CoreData"); return _CoreData.Value; } }
public bool HaveCoreFoundation { get { if (!_CoreFoundation.HasValue) _CoreFoundation = GetValue ("CoreFoundation"); return _CoreFoundation.Value; } }
public bool HaveCoreGraphics { get { if (!_CoreGraphics.HasValue) _CoreGraphics = GetValue ("CoreGraphics"); return _CoreGraphics.Value; } }
public bool HaveCoreHaptics { get { if (!_CoreHaptics.HasValue) _CoreHaptics = GetValue ("CoreHaptics"); return _CoreHaptics.Value; } }
public bool HaveCoreImage { get { if (!_CoreImage.HasValue) _CoreImage = GetValue ("CoreImage"); return _CoreImage.Value; } }
public bool HaveCoreLocation { get { if (!_CoreLocation.HasValue) _CoreLocation = GetValue ("CoreLocation"); return _CoreLocation.Value; } }
public bool HaveCoreLocationUI { get { if (!_CoreLocationUI.HasValue) _CoreLocationUI = GetValue ("CoreLocationUI"); return _CoreLocationUI.Value; } }
public bool HaveCoreMedia { get { if (!_CoreMedia.HasValue) _CoreMedia = GetValue ("CoreMedia"); return _CoreMedia.Value; } }
public bool HaveCoreMidi { get { if (!_CoreMidi.HasValue) _CoreMidi = GetValue ("CoreMidi"); return _CoreMidi.Value; } }
public bool HaveCoreMIDI { get { if (!_CoreMIDI.HasValue) _CoreMIDI = GetValue ("CoreMIDI"); return _CoreMIDI.Value; } }
public bool HaveCoreML { get { if (!_CoreML.HasValue) _CoreML = GetValue ("CoreML"); return _CoreML.Value; } }
public bool HaveCoreMotion { get { if (!_CoreMotion.HasValue) _CoreMotion = GetValue ("CoreMotion"); return _CoreMotion.Value; } }
public bool HaveCoreNFC { get { if (!_CoreNFC.HasValue) _CoreNFC = GetValue ("CoreNFC"); return _CoreNFC.Value; } }
public bool HaveCoreServices { get { if (!_CoreServices.HasValue) _CoreServices = GetValue ("CoreServices"); return _CoreServices.Value; } }
public bool HaveCoreSpotlight { get { if (!_CoreSpotlight.HasValue) _CoreSpotlight = GetValue ("CoreSpotlight"); return _CoreSpotlight.Value; } }
public bool HaveCoreTelephony { get { if (!_CoreTelephony.HasValue) _CoreTelephony = GetValue ("CoreTelephony"); return _CoreTelephony.Value; } }
public bool HaveCoreText { get { if (!_CoreText.HasValue) _CoreText = GetValue ("CoreText"); return _CoreText.Value; } }
public bool HaveCoreVideo { get { if (!_CoreVideo.HasValue) _CoreVideo = GetValue ("CoreVideo"); return _CoreVideo.Value; } }
public bool HaveCoreWlan { get { if (!_CoreWlan.HasValue) _CoreWlan = GetValue ("CoreWlan"); return _CoreWlan.Value; } }
public bool HaveDeviceCheck { get { if (!_DeviceCheck.HasValue) _DeviceCheck = GetValue ("DeviceCheck"); return _DeviceCheck.Value; } }
public bool HaveEventKit { get { if (!_EventKit.HasValue) _EventKit = GetValue ("EventKit"); return _EventKit.Value; } }
public bool HaveEventKitUI { get { if (!_EventKitUI.HasValue) _EventKitUI = GetValue ("EventKitUI"); return _EventKitUI.Value; } }
public bool HaveExecutionPolicy { get { if (!_ExecutionPolicy.HasValue) _ExecutionPolicy = GetValue ("ExecutionPolicy"); return _ExecutionPolicy.Value; } }
public bool HaveExtensionKit { get { if (!_ExtensionKit.HasValue) _ExtensionKit = GetValue ("ExtensionKit"); return _ExtensionKit.Value; } }
public bool HaveExternalAccessory { get { if (!_ExternalAccessory.HasValue) _ExternalAccessory = GetValue ("ExternalAccessory"); return _ExternalAccessory.Value; } }
public bool HaveFileProvider { get { if (!_FileProvider.HasValue) _FileProvider = GetValue ("FileProvider"); return _FileProvider.Value; } }
public bool HaveFileProviderUI { get { if (!_FileProviderUI.HasValue) _FileProviderUI = GetValue ("FileProviderUI"); return _FileProviderUI.Value; } }
public bool HaveFinderSync { get { if (!_FinderSync.HasValue) _FinderSync = GetValue ("FinderSync"); return _FinderSync.Value; } }
public bool HaveFoundation { get { if (!_Foundation.HasValue) _Foundation = GetValue ("Foundation"); return _Foundation.Value; } }
public bool HaveGameController { get { if (!_GameController.HasValue) _GameController = GetValue ("GameController"); return _GameController.Value; } }
public bool HaveGameKit { get { if (!_GameKit.HasValue) _GameKit = GetValue ("GameKit"); return _GameKit.Value; } }
public bool HaveGameplayKit { get { if (!_GameplayKit.HasValue) _GameplayKit = GetValue ("GameplayKit"); return _GameplayKit.Value; } }
public bool HaveGLKit { get { if (!_GLKit.HasValue) _GLKit = GetValue ("GLKit"); return _GLKit.Value; } }
public bool HaveHealthKit { get { if (!_HealthKit.HasValue) _HealthKit = GetValue ("HealthKit"); return _HealthKit.Value; } }
public bool HaveHealthKitUI { get { if (!_HealthKitUI.HasValue) _HealthKitUI = GetValue ("HealthKitUI"); return _HealthKitUI.Value; } }
public bool HaveHomeKit { get { if (!_HomeKit.HasValue) _HomeKit = GetValue ("HomeKit"); return _HomeKit.Value; } }
public bool HaveiAd { get { if (!_iAd.HasValue) _iAd = GetValue ("iAd"); return _iAd.Value; } }
public bool HaveIdentityLookup { get { if (!_IdentityLookup.HasValue) _IdentityLookup = GetValue ("IdentityLookup"); return _IdentityLookup.Value; } }
public bool HaveIdentityLookupUI { get { if (!_IdentityLookupUI.HasValue) _IdentityLookupUI = GetValue ("IdentityLookupUI"); return _IdentityLookupUI.Value; } }
public bool HaveImageCaptureCore { get { if (!_ImageCaptureCore.HasValue) _ImageCaptureCore = GetValue ("ImageCaptureCore"); return _ImageCaptureCore.Value; } }
public bool HaveImageIO { get { if (!_ImageIO.HasValue) _ImageIO = GetValue ("ImageIO"); return _ImageIO.Value; } }
public bool HaveImageKit { get { if (!_ImageKit.HasValue) _ImageKit = GetValue ("ImageKit"); return _ImageKit.Value; } }
public bool HaveIntents { get { if (!_Intents.HasValue) _Intents = GetValue ("Intents"); return _Intents.Value; } }
public bool HaveIntentsUI { get { if (!_IntentsUI.HasValue) _IntentsUI = GetValue ("IntentsUI"); return _IntentsUI.Value; } }
public bool HaveIOSurface { get { if (!_IOSurface.HasValue) _IOSurface = GetValue ("IOSurface"); return _IOSurface.Value; } }
public bool HaveiTunesLibrary { get { if (!_iTunesLibrary.HasValue) _iTunesLibrary = GetValue ("iTunesLibrary"); return _iTunesLibrary.Value; } }
public bool HaveJavaScriptCore { get { if (!_JavaScriptCore.HasValue) _JavaScriptCore = GetValue ("JavaScriptCore"); return _JavaScriptCore.Value; } }
public bool HaveLinkPresentation { get { if (!_LinkPresentation.HasValue) _LinkPresentation = GetValue ("LinkPresentation"); return _LinkPresentation.Value; } }
public bool HaveLocalAuthentication { get { if (!_LocalAuthentication.HasValue) _LocalAuthentication = GetValue ("LocalAuthentication"); return _LocalAuthentication.Value; } }
public bool HaveLocalAuthenticationEmbeddedUI { get { if (!_LocalAuthenticationEmbeddedUI.HasValue) _LocalAuthenticationEmbeddedUI = GetValue ("LocalAuthenticationEmbeddedUI"); return _LocalAuthenticationEmbeddedUI.Value; } }
public bool HaveMailKit { get { if (!_MailKit.HasValue) _MailKit = GetValue ("MailKit"); return _MailKit.Value; } }
public bool HaveMapKit { get { if (!_MapKit.HasValue) _MapKit = GetValue ("MapKit"); return _MapKit.Value; } }
public bool HaveMediaAccessibility { get { if (!_MediaAccessibility.HasValue) _MediaAccessibility = GetValue ("MediaAccessibility"); return _MediaAccessibility.Value; } }
public bool HaveMediaLibrary { get { if (!_MediaLibrary.HasValue) _MediaLibrary = GetValue ("MediaLibrary"); return _MediaLibrary.Value; } }
public bool HaveMediaPlayer { get { if (!_MediaPlayer.HasValue) _MediaPlayer = GetValue ("MediaPlayer"); return _MediaPlayer.Value; } }
public bool HaveMediaSetup { get { if (!_MediaSetup.HasValue) _MediaSetup = GetValue ("MediaSetup"); return _MediaSetup.Value; } }
public bool HaveMediaToolbox { get { if (!_MediaToolbox.HasValue) _MediaToolbox = GetValue ("MediaToolbox"); return _MediaToolbox.Value; } }
public bool HaveMessages { get { if (!_Messages.HasValue) _Messages = GetValue ("Messages"); return _Messages.Value; } }
public bool HaveMessageUI { get { if (!_MessageUI.HasValue) _MessageUI = GetValue ("MessageUI"); return _MessageUI.Value; } }
public bool HaveMetal { get { if (!_Metal.HasValue) _Metal = GetValue ("Metal"); return _Metal.Value; } }
public bool HaveMetalKit { get { if (!_MetalKit.HasValue) _MetalKit = GetValue ("MetalKit"); return _MetalKit.Value; } }
public bool HaveMetalPerformanceShaders { get { if (!_MetalPerformanceShaders.HasValue) _MetalPerformanceShaders = GetValue ("MetalPerformanceShaders"); return _MetalPerformanceShaders.Value; } }
public bool HaveMetalPerformanceShadersGraph { get { if (!_MetalPerformanceShadersGraph.HasValue) _MetalPerformanceShadersGraph = GetValue ("MetalPerformanceShadersGraph"); return _MetalPerformanceShadersGraph.Value; } }
public bool HaveMetricKit { get { if (!_MetricKit.HasValue) _MetricKit = GetValue ("MetricKit"); return _MetricKit.Value; } }
public bool HaveMLCompute { get { if (!_MLCompute.HasValue) _MLCompute = GetValue ("MLCompute"); return _MLCompute.Value; } }
public bool HaveMobileCoreServices { get { if (!_MobileCoreServices.HasValue) _MobileCoreServices = GetValue ("MobileCoreServices"); return _MobileCoreServices.Value; } }
public bool HaveModelIO { get { if (!_ModelIO.HasValue) _ModelIO = GetValue ("ModelIO"); return _ModelIO.Value; } }
public bool HaveMultipeerConnectivity { get { if (!_MultipeerConnectivity.HasValue) _MultipeerConnectivity = GetValue ("MultipeerConnectivity"); return _MultipeerConnectivity.Value; } }
public bool HaveNaturalLanguage { get { if (!_NaturalLanguage.HasValue) _NaturalLanguage = GetValue ("NaturalLanguage"); return _NaturalLanguage.Value; } }
public bool HaveNearbyInteraction { get { if (!_NearbyInteraction.HasValue) _NearbyInteraction = GetValue ("NearbyInteraction"); return _NearbyInteraction.Value; } }
public bool HaveNetwork { get { if (!_Network.HasValue) _Network = GetValue ("Network"); return _Network.Value; } }
public bool HaveNetworkExtension { get { if (!_NetworkExtension.HasValue) _NetworkExtension = GetValue ("NetworkExtension"); return _NetworkExtension.Value; } }
public bool HaveNewsstandKit { get { if (!_NewsstandKit.HasValue) _NewsstandKit = GetValue ("NewsstandKit"); return _NewsstandKit.Value; } }
public bool HaveNotificationCenter { get { if (!_NotificationCenter.HasValue) _NotificationCenter = GetValue ("NotificationCenter"); return _NotificationCenter.Value; } }
public bool HaveOpenGL { get { if (!_OpenGL.HasValue) _OpenGL = GetValue ("OpenGL"); return _OpenGL.Value; } }
public bool HaveOpenGLES { get { if (!_OpenGLES.HasValue) _OpenGLES = GetValue ("OpenGLES"); return _OpenGLES.Value; } }
public bool HaveOSLog { get { if (!_OSLog.HasValue) _OSLog = GetValue ("OSLog"); return _OSLog.Value; } }
public bool HavePassKit { get { if (!_PassKit.HasValue) _PassKit = GetValue ("PassKit"); return _PassKit.Value; } }
public bool HavePdfKit { get { if (!_PdfKit.HasValue) _PdfKit = GetValue ("PdfKit"); return _PdfKit.Value; } }
public bool HavePencilKit { get { if (!_PencilKit.HasValue) _PencilKit = GetValue ("PencilKit"); return _PencilKit.Value; } }
public bool HavePhase { get { if (!_Phase.HasValue) _Phase = GetValue ("Phase"); return _Phase.Value; } }
public bool HavePhotos { get { if (!_Photos.HasValue) _Photos = GetValue ("Photos"); return _Photos.Value; } }
public bool HavePhotosUI { get { if (!_PhotosUI.HasValue) _PhotosUI = GetValue ("PhotosUI"); return _PhotosUI.Value; } }
public bool HavePrintCore { get { if (!_PrintCore.HasValue) _PrintCore = GetValue ("PrintCore"); return _PrintCore.Value; } }
public bool HavePushKit { get { if (!_PushKit.HasValue) _PushKit = GetValue ("PushKit"); return _PushKit.Value; } }
public bool HavePushToTalk { get { if (!_PushToTalk.HasValue) _PushToTalk = GetValue ("PushToTalk"); return _PushToTalk.Value; } }
public bool HaveQTKit { get { if (!_QTKit.HasValue) _QTKit = GetValue ("QTKit"); return _QTKit.Value; } }
public bool HaveQuartzComposer { get { if (!_QuartzComposer.HasValue) _QuartzComposer = GetValue ("QuartzComposer"); return _QuartzComposer.Value; } }
public bool HaveQuickLook { get { if (!_QuickLook.HasValue) _QuickLook = GetValue ("QuickLook"); return _QuickLook.Value; } }
public bool HaveQuickLookThumbnailing { get { if (!_QuickLookThumbnailing.HasValue) _QuickLookThumbnailing = GetValue ("QuickLookThumbnailing"); return _QuickLookThumbnailing.Value; } }
public bool HaveQuickLookUI { get { if (!_QuickLookUI.HasValue) _QuickLookUI = GetValue ("QuickLookUI"); return _QuickLookUI.Value; } }
public bool HaveReplayKit { get { if (!_ReplayKit.HasValue) _ReplayKit = GetValue ("ReplayKit"); return _ReplayKit.Value; } }
public bool HaveSafariServices { get { if (!_SafariServices.HasValue) _SafariServices = GetValue ("SafariServices"); return _SafariServices.Value; } }
public bool HaveSceneKit { get { if (!_SceneKit.HasValue) _SceneKit = GetValue ("SceneKit"); return _SceneKit.Value; } }
public bool HaveScreenCaptureKit { get { if (!_ScreenCaptureKit.HasValue) _ScreenCaptureKit = GetValue ("ScreenCaptureKit"); return _ScreenCaptureKit.Value; } }
public bool HaveScreenTime { get { if (!_ScreenTime.HasValue) _ScreenTime = GetValue ("ScreenTime"); return _ScreenTime.Value; } }
public bool HaveScriptingBridge { get { if (!_ScriptingBridge.HasValue) _ScriptingBridge = GetValue ("ScriptingBridge"); return _ScriptingBridge.Value; } }
public bool HaveSearchKit { get { if (!_SearchKit.HasValue) _SearchKit = GetValue ("SearchKit"); return _SearchKit.Value; } }
public bool HaveSecurity { get { if (!_Security.HasValue) _Security = GetValue ("Security"); return _Security.Value; } }
public bool HaveSensorKit { get { if (!_SensorKit.HasValue) _SensorKit = GetValue ("SensorKit"); return _SensorKit.Value; } }
public bool HaveServiceManagement { get { if (!_ServiceManagement.HasValue) _ServiceManagement = GetValue ("ServiceManagement"); return _ServiceManagement.Value; } }
public bool HaveSharedWithYou { get { if (!_SharedWithYou.HasValue) _SharedWithYou = GetValue ("SharedWithYou"); return _SharedWithYou.Value; } }
public bool HaveSharedWithYouCore { get { if (!_SharedWithYouCore.HasValue) _SharedWithYouCore = GetValue ("SharedWithYouCore"); return _SharedWithYouCore.Value; } }
public bool HaveShazamKit { get { if (!_ShazamKit.HasValue) _ShazamKit = GetValue ("ShazamKit"); return _ShazamKit.Value; } }
public bool HaveSocial { get { if (!_Social.HasValue) _Social = GetValue ("Social"); return _Social.Value; } }
public bool HaveSoundAnalysis { get { if (!_SoundAnalysis.HasValue) _SoundAnalysis = GetValue ("SoundAnalysis"); return _SoundAnalysis.Value; } }
public bool HaveSpeech { get { if (!_Speech.HasValue) _Speech = GetValue ("Speech"); return _Speech.Value; } }
public bool HaveSpriteKit { get { if (!_SpriteKit.HasValue) _SpriteKit = GetValue ("SpriteKit"); return _SpriteKit.Value; } }
public bool HaveStoreKit { get { if (!_StoreKit.HasValue) _StoreKit = GetValue ("StoreKit"); return _StoreKit.Value; } }
public bool HaveSystemConfiguration { get { if (!_SystemConfiguration.HasValue) _SystemConfiguration = GetValue ("SystemConfiguration"); return _SystemConfiguration.Value; } }
public bool HaveThreadNetwork { get { if (!_ThreadNetwork.HasValue) _ThreadNetwork = GetValue ("ThreadNetwork"); return _ThreadNetwork.Value; } }
public bool HaveTVMLKit { get { if (!_TVMLKit.HasValue) _TVMLKit = GetValue ("TVMLKit"); return _TVMLKit.Value; } }
public bool HaveTVServices { get { if (!_TVServices.HasValue) _TVServices = GetValue ("TVServices"); return _TVServices.Value; } }
public bool HaveTVUIKit { get { if (!_TVUIKit.HasValue) _TVUIKit = GetValue ("TVUIKit"); return _TVUIKit.Value; } }
public bool HaveTwitter { get { if (!_Twitter.HasValue) _Twitter = GetValue ("Twitter"); return _Twitter.Value; } }
public bool HaveUIKit { get { if (!_UIKit.HasValue) _UIKit = GetValue ("UIKit"); return _UIKit.Value; } }
public bool HaveUniformTypeIdentifiers { get { if (!_UniformTypeIdentifiers.HasValue) _UniformTypeIdentifiers = GetValue ("UniformTypeIdentifiers"); return _UniformTypeIdentifiers.Value; } }
public bool HaveUserNotifications { get { if (!_UserNotifications.HasValue) _UserNotifications = GetValue ("UserNotifications"); return _UserNotifications.Value; } }
public bool HaveUserNotificationsUI { get { if (!_UserNotificationsUI.HasValue) _UserNotificationsUI = GetValue ("UserNotificationsUI"); return _UserNotificationsUI.Value; } }
public bool HaveVideoSubscriberAccount { get { if (!_VideoSubscriberAccount.HasValue) _VideoSubscriberAccount = GetValue ("VideoSubscriberAccount"); return _VideoSubscriberAccount.Value; } }
public bool HaveVideoToolbox { get { if (!_VideoToolbox.HasValue) _VideoToolbox = GetValue ("VideoToolbox"); return _VideoToolbox.Value; } }
public bool HaveVision { get { if (!_Vision.HasValue) _Vision = GetValue ("Vision"); return _Vision.Value; } }
public bool HaveVisionKit { get { if (!_VisionKit.HasValue) _VisionKit = GetValue ("VisionKit"); return _VisionKit.Value; } }
public bool HaveWatchConnectivity { get { if (!_WatchConnectivity.HasValue) _WatchConnectivity = GetValue ("WatchConnectivity"); return _WatchConnectivity.Value; } }
public bool HaveWatchKit { get { if (!_WatchKit.HasValue) _WatchKit = GetValue ("WatchKit"); return _WatchKit.Value; } }
public bool HaveWebKit { get { if (!_WebKit.HasValue) _WebKit = GetValue ("WebKit"); return _WebKit.Value; } }
public bool HaveXKit { get { if (!_XKit.HasValue) _XKit = GetValue ("XKit"); return _XKit.Value; } }
}

Просмотреть файл

@ -52,9 +52,12 @@ try {
for (int i = 0; i < names.Length; i++) {
var name = names [i];
var frameworks = allframeworks [i];
sb.Append ($"\tinternal readonly HashSet<string> {name} = new HashSet<string> {{\"");
sb.Append (string.Join ("\", \"", frameworks));
sb.AppendLine ("\"};");
sb.AppendLine ($"\t// GENERATED FILE - DO NOT EDIT");
sb.AppendLine ($"\tinternal readonly HashSet<string> {name} = new HashSet<string> {{");
foreach (var fw in frameworks.OrderBy (v => v)) {
sb.AppendLine ($"\t\t\"{fw}\",");
}
sb.AppendLine ("\t};");
}
var allArray = all.ToArray ();

Просмотреть файл

@ -225,11 +225,15 @@ namespace Xamarin.Tests {
public static string EvaluateVariable (string variable)
{
var result = Environment.GetEnvironmentVariable (variable);
if (!string.IsNullOrEmpty (result))
return result;
var output = new StringBuilder ();
var rv = ExecutionHelper.Execute ("/usr/bin/make", new string [] { "-C", Path.Combine (SourceRoot, "tools", "devops"), "print-abspath-variable", $"VARIABLE={variable}" }, environmentVariables: null, stdout: output, stderr: output, timeout: TimeSpan.FromSeconds (5));
if (rv != 0)
throw new Exception ($"Failed to evaluate variable '{variable}'. Exit code: {rv}. Output:\n{output}");
var result = output.ToString ().Split (new char [] { '\n' }, StringSplitOptions.RemoveEmptyEntries).Where (v => v.StartsWith (variable + "=", StringComparison.Ordinal)).SingleOrDefault ();
result = output.ToString ().Split (new char [] { '\n', '\r' }, StringSplitOptions.RemoveEmptyEntries).Where (v => v.StartsWith (variable + "=", StringComparison.Ordinal)).SingleOrDefault ();
if (result is null)
throw new Exception ($"Could not find the variable '{variable}' to evaluate.");
return result.Substring (variable.Length + 1);

Просмотреть файл

@ -10,6 +10,7 @@ namespace Xamarin.Tests {
public void NativeLink (ApplePlatform platform, string runtimeIdentifiers)
{
Configuration.IgnoreIfIgnoredPlatform (platform);
Configuration.AssertRuntimeIdentifiersAvailable (platform, runtimeIdentifiers);
var project_path = GenerateProject (platform, name: nameof (NativeLink), runtimeIdentifiers: runtimeIdentifiers, out var appPath);
var properties = new Dictionary<string, string> (verbosity);

Просмотреть файл

@ -11,6 +11,7 @@ namespace Xamarin.Tests {
var configuration = "Debug";
var runtimeIdentifiers = GetDefaultRuntimeIdentifier (platform);
Configuration.IgnoreIfIgnoredPlatform (platform);
Configuration.AssertRuntimeIdentifiersAvailable (platform, runtimeIdentifiers);
var projectPath = GetProjectPath (project, platform: platform);
Clean (projectPath);

Просмотреть файл

@ -168,7 +168,7 @@ namespace Xharness {
// the Make.config will use the wrong version. The CI set the version in the environment variable {platform}_WORKLOAD_VERSION via a script.
var workloadVersion = Environment.GetEnvironmentVariable ($"{platform.ToUpperInvariant ()}_WORKLOAD_VERSION");
mlaunchPath = Path.Combine (mlaunchPath, $"Microsoft.{platform}.Sdk",
string.IsNullOrEmpty (workloadVersion) ? config [$"{platform.ToUpperInvariant ()}_NUGET_VERSION_NO_METADATA"] : workloadVersion);
string.IsNullOrEmpty (workloadVersion) ? GetVariable ($"{platform.ToUpperInvariant ()}_NUGET_VERSION_NO_METADATA") : workloadVersion);
mlaunchPath = Path.Combine (mlaunchPath, "tools", "bin", "mlaunch");
return mlaunchPath;
} else if (INCLUDE_XAMARIN_LEGACY && INCLUDE_IOS) {
@ -178,6 +178,21 @@ namespace Xharness {
}
}
bool IsVariableSet (string variable)
{
return !string.IsNullOrEmpty (GetVariable (variable));
}
string GetVariable (string variable, string @default = null)
{
var result = Environment.GetEnvironmentVariable (variable);
if (string.IsNullOrEmpty (result))
config.TryGetValue (variable, out result);
if (string.IsNullOrEmpty (result))
result = @default;
return result;
}
public List<iOSTestProject> IOSTestProjects { get; }
public List<MacTestProject> MacTestProjects { get; } = new List<MacTestProject> ();
@ -207,7 +222,7 @@ namespace Xharness {
public bool INCLUDE_XAMARIN_LEGACY { get; }
public string SYSTEM_MONO { get; set; }
public string DOTNET_DIR { get; set; }
public string DotNetTfm { get; set; }
public string DOTNET_TFM { get; set; }
// Run
@ -265,35 +280,32 @@ namespace Xharness {
LaunchTimeout = InCI ? 3 : 120;
var config = ParseConfigFiles ();
config = ParseConfigFiles ();
var src_root = Path.GetDirectoryName (Path.GetFullPath (RootDirectory));
MONO_PATH = Path.GetFullPath (Path.Combine (src_root, "external", "mono"));
TVOS_MONO_PATH = MONO_PATH;
INCLUDE_IOS = config.ContainsKey ("INCLUDE_IOS") && !string.IsNullOrEmpty (config ["INCLUDE_IOS"]);
INCLUDE_TVOS = config.ContainsKey ("INCLUDE_TVOS") && !string.IsNullOrEmpty (config ["INCLUDE_TVOS"]);
JENKINS_RESULTS_DIRECTORY = config ["JENKINS_RESULTS_DIRECTORY"];
INCLUDE_WATCH = config.ContainsKey ("INCLUDE_WATCH") && !string.IsNullOrEmpty (config ["INCLUDE_WATCH"]);
INCLUDE_MAC = config.ContainsKey ("INCLUDE_MAC") && !string.IsNullOrEmpty (config ["INCLUDE_MAC"]);
INCLUDE_MACCATALYST = config.ContainsKey ("INCLUDE_MACCATALYST") && !string.IsNullOrEmpty (config ["INCLUDE_MACCATALYST"]);
MAC_DESTDIR = config ["MAC_DESTDIR"];
IOS_DESTDIR = config ["IOS_DESTDIR"];
MONO_IOS_SDK_DESTDIR = config ["MONO_IOS_SDK_DESTDIR"];
MONO_MAC_SDK_DESTDIR = config ["MONO_MAC_SDK_DESTDIR"];
ENABLE_DOTNET = config.ContainsKey ("ENABLE_DOTNET") && !string.IsNullOrEmpty (config ["ENABLE_DOTNET"]);
SYSTEM_MONO = config ["SYSTEM_MONO"];
DOTNET_DIR = config ["DOTNET_DIR"];
INCLUDE_XAMARIN_LEGACY = config.ContainsKey ("INCLUDE_XAMARIN_LEGACY") && !string.IsNullOrEmpty (config ["INCLUDE_XAMARIN_LEGACY"]);
DotNetTfm = config ["DOTNET_TFM"];
INCLUDE_IOS = IsVariableSet (nameof (INCLUDE_IOS));
INCLUDE_TVOS = IsVariableSet (nameof (INCLUDE_TVOS));
JENKINS_RESULTS_DIRECTORY = GetVariable (nameof (JENKINS_RESULTS_DIRECTORY));
INCLUDE_WATCH = IsVariableSet (nameof (INCLUDE_WATCH));
INCLUDE_MAC = IsVariableSet (nameof (INCLUDE_MAC));
INCLUDE_MACCATALYST = IsVariableSet (nameof (INCLUDE_MACCATALYST));
MAC_DESTDIR = GetVariable (nameof (MAC_DESTDIR));
IOS_DESTDIR = GetVariable (nameof (IOS_DESTDIR));
MONO_IOS_SDK_DESTDIR = GetVariable (nameof (MONO_IOS_SDK_DESTDIR));
MONO_MAC_SDK_DESTDIR = GetVariable (nameof (MONO_MAC_SDK_DESTDIR));
ENABLE_DOTNET = IsVariableSet (nameof (ENABLE_DOTNET));
SYSTEM_MONO = GetVariable (nameof (SYSTEM_MONO));
DOTNET_DIR = GetVariable (nameof (DOTNET_DIR));
INCLUDE_XAMARIN_LEGACY = IsVariableSet (nameof (INCLUDE_XAMARIN_LEGACY));
DOTNET_TFM = GetVariable (nameof (DOTNET_TFM));
if (string.IsNullOrEmpty (SdkRoot))
SdkRoot = config ["XCODE_DEVELOPER_ROOT"] ?? configuration.SdkRoot;
this.config = config;
SdkRoot = GetVariable ("XCODE_DEVELOPER_ROOT", configuration.SdkRoot);
processManager = new MlaunchProcessManager (XcodeRoot, MlaunchPath);
AppBundleLocator = new AppBundleLocator (processManager, () => HarnessLog, XIBuildPath, "/usr/local/share/dotnet/dotnet", config ["DOTNET"]);
AppBundleLocator = new AppBundleLocator (processManager, () => HarnessLog, XIBuildPath, "/usr/local/share/dotnet/dotnet", GetVariable ("DOTNET"));
TunnelBore = new TunnelBore (processManager);
}

Просмотреть файл

@ -47,6 +47,7 @@ namespace Xharness {
bool INCLUDE_XAMARIN_LEGACY { get; }
string SYSTEM_MONO { get; set; }
string DOTNET_DIR { get; set; }
string DOTNET_TFM { get; }
string XcodeRoot { get; }
string LogDirectory { get; }
double Timeout { get; }
@ -64,7 +65,6 @@ namespace Xharness {
bool UseGroupedApps { get; }
string VSDropsUri { get; }
bool DisableWatchOSOnWrench { get; }
string DotNetTfm { get; }
#endregion

Просмотреть файл

@ -65,7 +65,7 @@ namespace Xharness.Targets {
public const string FSharpGuid = "{F2A71F9B-5D33-465A-A702-920D77279786}";
public const string CSharpGuid = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}";
public string DotNetTfm => Harness.DotNetTfm;
public string DotNetTfm => Harness.DOTNET_TFM;
public string LanguageGuid { get { return IsFSharp ? FSharpGuid : CSharpGuid; } }

Просмотреть файл

@ -708,7 +708,7 @@ namespace Xamarin.Bundler {
}
}
public static void ExtractResource (ModuleDefinition module, string name, string path, bool remove)
public static bool ExtractResource (ModuleDefinition module, string name, string path, bool remove)
{
for (int i = 0; i < module.Resources.Count; i++) {
EmbeddedResource embedded = module.Resources [i] as EmbeddedResource;
@ -727,8 +727,10 @@ namespace Xamarin.Bundler {
if (remove)
module.Resources.RemoveAt (i);
break;
return true;
}
return false;
}
// Returns true if the source file was copied to the target or false if it was already up to date.

Просмотреть файл

@ -280,18 +280,24 @@ namespace Xamarin.Bundler {
if (!string.IsNullOrEmpty (linkWith.LibraryName)) {
switch (Path.GetExtension (linkWith.LibraryName).ToLowerInvariant ()) {
case ".framework":
case ".framework": {
AssertiOSVersionSupportsUserFrameworks (linkWith.LibraryName);
Frameworks.Add (ExtractFramework (assembly, metadata));
// TryExtractFramework prints a error/warning if something goes wrong, so no need for us to have an error handling path.
if (TryExtractFramework (assembly, metadata, out var framework))
Frameworks.Add (framework);
break;
}
case ".xcframework":
// this is resolved, at msbuild time, into a framework
// but we must ignore it here (can't be the `default` case)
break;
default:
LinkWith.Add (ExtractNativeLibrary (assembly, metadata));
default: {
// TryExtractFramework prints a error/warning if something goes wrong, so no need for us to have an error handling path.
if (TryExtractNativeLibrary (assembly, metadata, out var framework))
LinkWith.Add (framework);
break;
}
}
}
}
}
@ -352,12 +358,17 @@ namespace Xamarin.Bundler {
#endif
}
string ExtractNativeLibrary (AssemblyDefinition assembly, NativeReferenceMetadata metadata)
bool TryExtractNativeLibrary (AssemblyDefinition assembly, NativeReferenceMetadata metadata, out string library)
{
string path = Path.Combine (App.Cache.Location, metadata.LibraryName);
library = null;
if (!Application.IsUptodate (FullPath, path)) {
Application.ExtractResource (assembly.MainModule, metadata.LibraryName, path, false);
if (!Application.ExtractResource (assembly.MainModule, metadata.LibraryName, path, false)) {
ErrorHelper.Warning (1308, Errors.MX1308 /* Could not extract the native library '{0}' from the assembly '{1}', because it doesn't contain the resource '{2}'. */, metadata.LibraryName, FullPath, metadata.LibraryName);
return false;
}
Driver.Log (3, "Extracted third-party binding '{0}' from '{1}' to '{2}'", metadata.LibraryName, FullPath, path);
LogNativeReference (metadata);
} else {
@ -367,16 +378,24 @@ namespace Xamarin.Bundler {
if (!File.Exists (path))
ErrorHelper.Warning (1302, Errors.MT1302, metadata.LibraryName, path);
return path;
library = path;
return true;
}
string ExtractFramework (AssemblyDefinition assembly, NativeReferenceMetadata metadata)
bool TryExtractFramework (AssemblyDefinition assembly, NativeReferenceMetadata metadata, out string framework)
{
string path = Path.Combine (App.Cache.Location, metadata.LibraryName);
var zipPath = path + ".zip";
framework = null;
if (!Application.IsUptodate (FullPath, zipPath)) {
Application.ExtractResource (assembly.MainModule, metadata.LibraryName, zipPath, false);
if (!Application.ExtractResource (assembly.MainModule, metadata.LibraryName, zipPath, false)) {
ErrorHelper.Warning (1307, Errors.MX1307 /* Could not extract the native framework '{0}' from the assembly '{1}', because it doesn't contain the resource '{2}'. */, metadata.LibraryName, FullPath, metadata.LibraryName);
return false;
}
Driver.Log (3, "Extracted third-party framework '{0}' from '{1}' to '{2}'", metadata.LibraryName, FullPath, zipPath);
LogNativeReference (metadata);
} else {
@ -401,7 +420,8 @@ namespace Xamarin.Bundler {
throw ErrorHelper.CreateError (1303, Errors.MT1303, metadata.LibraryName, zipPath);
}
return path;
framework = path;
return true;
}
static void LogNativeReference (NativeReferenceMetadata metadata)

Просмотреть файл

@ -839,6 +839,9 @@ namespace Registrar {
}
protected override IEnumerable<TypeReference> CollectTypes (AssemblyDefinition assembly)
=> GetAllTypes (assembly);
internal static IEnumerable<TypeReference> GetAllTypes (AssemblyDefinition assembly)
{
var queue = new Queue<TypeDefinition> ();
@ -3307,12 +3310,7 @@ namespace Registrar {
ErrorHelper.ThrowIfErrors (exceptions);
}
bool HasIntPtrBoolCtor (TypeDefinition type, List<Exception> exceptions)
{
return HasIntPtrBoolCtor (type, exceptions, out var _);
}
bool HasIntPtrBoolCtor (TypeDefinition type, List<Exception> exceptions, [NotNullWhen (true)] out MethodDefinition? ctor)
bool TryGetIntPtrBoolCtor (TypeDefinition type, List<Exception> exceptions, [NotNullWhen (true)] out MethodDefinition? ctor)
{
ctor = null;
if (!type.HasMethods)
@ -4552,7 +4550,7 @@ namespace Registrar {
}
// verify that the type has a ctor with two parameters
if (!HasIntPtrBoolCtor (nativeObjType, exceptions, out ctor))
if (!TryGetIntPtrBoolCtor (nativeObjType, exceptions, out ctor))
throw ErrorHelper.CreateError (4103, Errors.MT4103, nativeObjType.FullName, descriptiveMethodName);
return nativeObjType;

Просмотреть файл

@ -178,7 +178,9 @@ steps:
rm -Rf $(System.DefaultWorkingDirectory)/diagnostic-sim-output/output
mkdir -p $(System.DefaultWorkingDirectory)/diagnostic-sim-output/output
printf "\n" | xcrun simctl diagnose -b -X --output=$(System.DefaultWorkingDirectory)/diagnostic-sim-output/output
if ! printf "\n" | xcrun simctl diagnose -b -X --output=$(System.DefaultWorkingDirectory)/diagnostic-sim-output/output; then
echo "simctl diagnose failed with exit code $?"
fi
displayName: 'Collect diagnostic info from simulators'
condition: eq(variables['system.debug'], true)

Просмотреть файл

@ -389,6 +389,12 @@ namespace Xamarin.Linker {
}
}
public TypeReference Foundation_INSObjectFactory {
get {
return GetTypeReference (PlatformAssembly, "Foundation.INSObjectFactory", out var _);
}
}
public TypeReference ObjCRuntime_INativeObject {
get {
return GetTypeReference (PlatformAssembly, "ObjCRuntime.INativeObject", out var _);
@ -755,6 +761,49 @@ namespace Xamarin.Linker {
}
}
public MethodReference IManagedRegistrar_ConstructNSObject {
get {
return GetMethodReference (PlatformAssembly,
ObjCRuntime_IManagedRegistrar, "ConstructNSObject",
isStatic: false,
System_RuntimeTypeHandle,
ObjCRuntime_NativeHandle);
}
}
public MethodReference INSObjectFactory__Xamarin_ConstructNSObject {
get {
return GetMethodReference (PlatformAssembly,
Foundation_INSObjectFactory, "_Xamarin_ConstructNSObject",
nameof (INSObjectFactory__Xamarin_ConstructNSObject),
isStatic: true,
ObjCRuntime_NativeHandle);
}
}
public MethodReference IManagedRegistrar_ConstructINativeObject {
get {
return GetMethodReference (PlatformAssembly,
ObjCRuntime_IManagedRegistrar, "ConstructINativeObject",
nameof (IManagedRegistrar_ConstructINativeObject),
isStatic: false,
System_RuntimeTypeHandle,
ObjCRuntime_NativeHandle,
System_Boolean);
}
}
public MethodReference INativeObject__Xamarin_ConstructINativeObject {
get {
return GetMethodReference (PlatformAssembly,
ObjCRuntime_INativeObject, "_Xamarin_ConstructINativeObject",
nameof (INativeObject__Xamarin_ConstructINativeObject),
isStatic: true,
ObjCRuntime_NativeHandle,
System_Boolean);
}
}
public MethodReference IManagedRegistrar_RegisterWrapperTypes {
get {
return GetMethodReference (PlatformAssembly, ObjCRuntime_IManagedRegistrar, "RegisterWrapperTypes", (v) =>
@ -1094,6 +1143,15 @@ namespace Xamarin.Linker {
}
}
public MethodReference Runtime_TryReleaseINativeObject {
get {
return GetMethodReference (PlatformAssembly,
ObjCRuntime_Runtime, "TryReleaseINativeObject",
isStatic: true,
ObjCRuntime_INativeObject);
}
}
public MethodReference UnmanagedCallersOnlyAttribute_Constructor {
get {
return GetMethodReference (CorlibAssembly, "System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute", ".ctor", (v) => v.IsDefaultConstructor ());

Просмотреть файл

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Linq;
@ -123,6 +124,8 @@ namespace Xamarin.Linker {
GenerateLookupType (info, registrarType, types);
GenerateLookupTypeId (info, registrarType, types);
GenerateRegisterWrapperTypes (registrarType);
GenerateConstructNSObject (registrarType);
GenerateConstructINativeObject (registrarType);
// Make sure the linker doesn't sweep away anything we just generated.
Annotations.Mark (registrarType);
@ -201,6 +204,13 @@ namespace Xamarin.Linker {
return types;
}
IEnumerable<TypeDefinition> GetRelevantTypes (Func<TypeDefinition, bool> isRelevant)
=> StaticRegistrar.GetAllTypes (abr.CurrentAssembly)
.Cast<TypeDefinition> ()
.Where (type => !IsTrimmed (type))
.Where (type => type.Module.Assembly == abr.CurrentAssembly)
.Where (isRelevant);
bool IsTrimmed (MemberReference type)
{
return StaticRegistrar.IsTrimmed (type, Annotations);
@ -281,6 +291,245 @@ namespace Xamarin.Linker {
il.Emit (OpCodes.Ret);
}
void GenerateConstructNSObject (TypeDefinition registrarType)
{
var createInstanceMethod = registrarType.AddMethod ("ConstructNSObject", MethodAttributes.Private | MethodAttributes.Final | MethodAttributes.Virtual | MethodAttributes.NewSlot | MethodAttributes.HideBySig, abr.ObjCRuntime_INativeObject);
var typeHandleParameter = createInstanceMethod.AddParameter ("typeHandle", abr.System_RuntimeTypeHandle);
var nativeHandleParameter = createInstanceMethod.AddParameter ("nativeHandle", abr.ObjCRuntime_NativeHandle);
createInstanceMethod.Overrides.Add (abr.IManagedRegistrar_ConstructNSObject);
var body = createInstanceMethod.CreateBody (out var il);
// We generate something like this:
// if (RuntimeTypeHandle.Equals (typeHandle, typeof (TypeA).TypeHandle))
// return new TypeA (nativeHandle);
// if (RuntimeTypeHandle.Equals (typeHandle, typeof (TypeB).TypeHandle))
// return new TypeB (nativeHandle);
// return null;
var types = GetRelevantTypes (type => type.IsNSObject (DerivedLinkContext) && !type.IsAbstract && !type.IsInterface);
foreach (var type in types) {
var ctorRef = FindNSObjectConstructor (type);
if (ctorRef is null) {
Driver.Log (9, $"Cannot include {type.FullName} in ConstructNSObject because it doesn't have a suitable constructor");
continue;
}
var ctor = abr.CurrentAssembly.MainModule.ImportReference (ctorRef);
if (IsTrimmed (ctor))
Annotations.Mark (ctor.Resolve ());
// We can only add a type to the table if it's not an open type.
if (!ManagedRegistrarStep.IsOpenType (type)) {
EnsureVisible (createInstanceMethod, ctor);
il.Emit (OpCodes.Ldarga_S, typeHandleParameter);
il.Emit (OpCodes.Ldtoken, type);
il.Emit (OpCodes.Call, abr.RuntimeTypeHandle_Equals);
var falseTarget = il.Create (OpCodes.Nop);
il.Emit (OpCodes.Brfalse_S, falseTarget);
il.Emit (OpCodes.Ldarg, nativeHandleParameter);
if (ctor.Parameters [0].ParameterType.Is ("System", "IntPtr"))
il.Emit (OpCodes.Call, abr.NativeObject_op_Implicit_IntPtr);
il.Emit (OpCodes.Newobj, ctor);
il.Emit (OpCodes.Ret);
il.Append (falseTarget);
}
// In addition to the big lookup method, implement the static factory method on the type:
ImplementConstructNSObjectFactoryMethod (type, ctor);
}
// return default (NSObject);
il.Emit (OpCodes.Ldnull);
il.Emit (OpCodes.Ret);
}
void GenerateConstructINativeObject (TypeDefinition registrarType)
{
var createInstanceMethod = registrarType.AddMethod ("ConstructINativeObject", MethodAttributes.Private | MethodAttributes.Final | MethodAttributes.Virtual | MethodAttributes.NewSlot | MethodAttributes.HideBySig, abr.ObjCRuntime_INativeObject);
var typeHandleParameter = createInstanceMethod.AddParameter ("typeHandle", abr.System_RuntimeTypeHandle);
var nativeHandleParameter = createInstanceMethod.AddParameter ("nativeHandle", abr.ObjCRuntime_NativeHandle);
var ownsParameter = createInstanceMethod.AddParameter ("owns", abr.System_Boolean);
createInstanceMethod.Overrides.Add (abr.IManagedRegistrar_ConstructINativeObject);
var body = createInstanceMethod.CreateBody (out var il);
// We generate something like this:
// if (RuntimeTypeHandle.Equals (typeHandle, typeof (TypeA).TypeHandle))
// return new TypeA (nativeHandle, owns);
// if (RuntimeTypeHandle.Equals (typeHandle, typeof (TypeB).TypeHandle))
// return new TypeB (nativeHandle, owns);
// return null;
var types = GetRelevantTypes (type => type.IsNativeObject () && !type.IsAbstract && !type.IsInterface);
foreach (var type in types) {
var ctorRef = FindINativeObjectConstructor (type);
if (ctorRef is not null) {
var ctor = abr.CurrentAssembly.MainModule.ImportReference (ctorRef);
// we need to preserve the constructor because it might not be used anywhere else
if (IsTrimmed (ctor))
Annotations.Mark (ctor.Resolve ());
if (!ManagedRegistrarStep.IsOpenType (type)) {
EnsureVisible (createInstanceMethod, ctor);
il.Emit (OpCodes.Ldarga_S, typeHandleParameter);
il.Emit (OpCodes.Ldtoken, type);
il.Emit (OpCodes.Call, abr.RuntimeTypeHandle_Equals);
var falseTarget = il.Create (OpCodes.Nop);
il.Emit (OpCodes.Brfalse_S, falseTarget);
il.Emit (OpCodes.Ldarg, nativeHandleParameter);
if (ctor.Parameters [0].ParameterType.Is ("System", "IntPtr"))
il.Emit (OpCodes.Call, abr.NativeObject_op_Implicit_IntPtr);
il.Emit (OpCodes.Ldarg, ownsParameter);
il.Emit (OpCodes.Newobj, ctor);
il.Emit (OpCodes.Ret);
il.Append (falseTarget);
}
}
// In addition to the big lookup method, implement the static factory method on the type:
ImplementConstructINativeObjectFactoryMethod (type, ctorRef);
}
// return default (NSObject)
il.Emit (OpCodes.Ldnull);
il.Emit (OpCodes.Ret);
}
void ImplementConstructNSObjectFactoryMethod (TypeDefinition type, MethodReference ctor)
{
// skip creating the factory for NSObject itself
if (type.Is ("Foundation", "NSObject"))
return;
var createInstanceMethod = type.AddMethod ("_Xamarin_ConstructNSObject", MethodAttributes.Public | MethodAttributes.Static | MethodAttributes.NewSlot | MethodAttributes.HideBySig, abr.Foundation_NSObject);
var nativeHandleParameter = createInstanceMethod.AddParameter ("nativeHandle", abr.ObjCRuntime_NativeHandle);
abr.Foundation_INSObjectFactory.Resolve ().IsPublic = true;
createInstanceMethod.Overrides.Add (abr.INSObjectFactory__Xamarin_ConstructNSObject);
var body = createInstanceMethod.CreateBody (out var il);
if (type.HasGenericParameters) {
ctor = type.CreateMethodReferenceOnGenericType (ctor, type.GenericParameters.ToArray ());
}
// return new TypeA (nativeHandle); // for NativeHandle ctor
// return new TypeA ((IntPtr) nativeHandle); // for IntPtr ctor
il.Emit (OpCodes.Ldarg, nativeHandleParameter);
if (ctor.Parameters [0].ParameterType.Is ("System", "IntPtr"))
il.Emit (OpCodes.Call, abr.NativeObject_op_Implicit_IntPtr);
il.Emit (OpCodes.Newobj, ctor);
il.Emit (OpCodes.Ret);
Annotations.Mark (createInstanceMethod);
}
void ImplementConstructINativeObjectFactoryMethod (TypeDefinition type, MethodReference? ctor)
{
// skip creating the factory for NSObject itself
if (type.Is ("Foundation", "NSObject"))
return;
// If the type is a subclass of NSObject, we prefer the NSObject "IntPtr" constructor
var nsobjectConstructor = type.IsNSObject (DerivedLinkContext) ? FindNSObjectConstructor (type) : null;
if (nsobjectConstructor is null && ctor is null)
return;
var createInstanceMethod = type.AddMethod ("_Xamarin_ConstructINativeObject", MethodAttributes.Public | MethodAttributes.Static | MethodAttributes.NewSlot | MethodAttributes.HideBySig, abr.ObjCRuntime_INativeObject);
var nativeHandleParameter = createInstanceMethod.AddParameter ("nativeHandle", abr.ObjCRuntime_NativeHandle);
var ownsParameter = createInstanceMethod.AddParameter ("owns", abr.System_Boolean);
abr.INativeObject__Xamarin_ConstructINativeObject.Resolve ().IsPublic = true;
createInstanceMethod.Overrides.Add (abr.INativeObject__Xamarin_ConstructINativeObject);
var body = createInstanceMethod.CreateBody (out var il);
if (nsobjectConstructor is not null) {
// var instance = new TypeA (nativeHandle);
// // alternatively with a cast: new TypeA ((IntPtr) nativeHandle);
// if (instance is not null && owns)
// Runtime.TryReleaseINativeObject (instance);
// return instance;
if (type.HasGenericParameters) {
nsobjectConstructor = type.CreateMethodReferenceOnGenericType (nsobjectConstructor, type.GenericParameters.ToArray ());
}
il.Emit (OpCodes.Ldarg, nativeHandleParameter);
if (nsobjectConstructor.Parameters [0].ParameterType.Is ("System", "IntPtr"))
il.Emit (OpCodes.Call, abr.NativeObject_op_Implicit_IntPtr);
il.Emit (OpCodes.Newobj, nsobjectConstructor);
var falseTarget = il.Create (OpCodes.Nop);
il.Emit (OpCodes.Dup);
il.Emit (OpCodes.Ldnull);
il.Emit (OpCodes.Cgt_Un);
il.Emit (OpCodes.Ldarg, ownsParameter);
il.Emit (OpCodes.And);
il.Emit (OpCodes.Brfalse_S, falseTarget);
il.Emit (OpCodes.Dup);
il.Emit (OpCodes.Call, abr.Runtime_TryReleaseINativeObject);
il.Append (falseTarget);
il.Emit (OpCodes.Ret);
} else if (ctor is not null) {
// return new TypeA (nativeHandle, owns); // for NativeHandle ctor
// return new TypeA ((IntPtr) nativeHandle, owns); // IntPtr ctor
if (type.HasGenericParameters) {
ctor = type.CreateMethodReferenceOnGenericType (ctor, type.GenericParameters.ToArray ());
}
il.Emit (OpCodes.Ldarg, nativeHandleParameter);
if (ctor.Parameters [0].ParameterType.Is ("System", "IntPtr"))
il.Emit (OpCodes.Call, abr.NativeObject_op_Implicit_IntPtr);
il.Emit (OpCodes.Ldarg, ownsParameter);
il.Emit (OpCodes.Newobj, ctor);
il.Emit (OpCodes.Ret);
} else {
throw new UnreachableException ();
}
Annotations.Mark (createInstanceMethod);
}
static MethodReference? FindNSObjectConstructor (TypeDefinition type)
{
return FindConstructorWithOneParameter ("ObjCRuntime", "NativeHandle")
?? FindConstructorWithOneParameter ("System", "IntPtr");
MethodReference? FindConstructorWithOneParameter (string ns, string cls)
=> type.Methods.SingleOrDefault (method =>
method.IsConstructor
&& !method.IsStatic
&& method.HasParameters
&& method.Parameters.Count == 1
&& method.Parameters [0].ParameterType.Is (ns, cls));
}
static MethodReference? FindINativeObjectConstructor (TypeDefinition type)
{
return FindConstructorWithTwoParameters ("ObjCRuntime", "NativeHandle", "System", "Boolean")
?? FindConstructorWithTwoParameters ("System", "IntPtr", "System", "Boolean");
MethodReference? FindConstructorWithTwoParameters (string ns1, string cls1, string ns2, string cls2)
=> type.Methods.SingleOrDefault (method =>
method.IsConstructor
&& !method.IsStatic
&& method.HasParameters
&& method.Parameters.Count == 2
&& method.Parameters [0].ParameterType.Is (ns1, cls1)
&& method.Parameters [1].ParameterType.Is (ns2, cls2));
}
void GenerateRegisterWrapperTypes (TypeDefinition type)
{
var method = type.AddMethod ("RegisterWrapperTypes", MethodAttributes.Private | MethodAttributes.Final | MethodAttributes.Virtual | MethodAttributes.NewSlot | MethodAttributes.HideBySig, abr.System_Void);
@ -473,13 +722,32 @@ namespace Xamarin.Linker {
return $"{method?.ReturnType?.FullName ?? "(null)"} {method?.DeclaringType?.FullName ?? "(null)"}::{method?.Name ?? "(null)"} ({string.Join (", ", method?.Parameters?.Select (v => v?.ParameterType?.FullName + " " + v?.Name) ?? Array.Empty<string> ())})";
}
void EnsureVisible (MethodDefinition caller, TypeDefinition type)
static void EnsureVisible (MethodDefinition caller, MethodReference methodRef)
{
var method = methodRef.Resolve ();
var type = method.DeclaringType.Resolve ();
if (type.IsNested) {
type.IsNestedPublic = true;
if (!method.IsPublic) {
method.IsFamilyOrAssembly = true;
}
EnsureVisible (caller, type);
} else if (!method.IsPublic) {
method.IsFamilyOrAssembly = true;
}
}
static void EnsureVisible (MethodDefinition caller, TypeReference typeRef)
{
var type = typeRef.Resolve ();
if (type.IsNested) {
if (!type.IsNestedPublic) {
type.IsNestedAssembly = true;
}
EnsureVisible (caller, type.DeclaringType);
} else {
type.IsPublic = true;
} else if (!type.IsPublic) {
type.IsNotPublic = true;
}
}

Просмотреть файл

@ -158,10 +158,9 @@ namespace Xamarin.Linker {
assembly.MainModule.Types.Add (additionalType);
// Make sure the linker saves any changes in the assembly.
if (modified) {
DerivedLinkContext.Annotations.SetCustomAnnotation ("ManagedRegistrarStep", assembly, current_trampoline_lists);
DerivedLinkContext.Annotations.SetCustomAnnotation ("ManagedRegistrarStep", assembly, current_trampoline_lists);
if (modified)
abr.SaveCurrentAssembly ();
}
abr.ClearCurrentAssembly ();
}
@ -1058,7 +1057,7 @@ namespace Xamarin.Linker {
return false;
}
bool IsOpenType (TypeReference tr)
internal static bool IsOpenType (TypeReference tr)
{
if (tr is GenericParameter)
return true;
@ -1080,13 +1079,13 @@ namespace Xamarin.Linker {
return IsOpenType (tr.Resolve ());
}
void EnsureVisible (MethodDefinition caller, FieldDefinition field)
static void EnsureVisible (MethodDefinition caller, FieldDefinition field)
{
field.IsPublic = true;
EnsureVisible (caller, field.DeclaringType);
}
void EnsureVisible (MethodDefinition caller, TypeDefinition type)
static void EnsureVisible (MethodDefinition caller, TypeDefinition type)
{
if (type.IsNested) {
type.IsNestedPublic = true;
@ -1096,7 +1095,7 @@ namespace Xamarin.Linker {
}
}
void EnsureVisible (MethodDefinition caller, MethodReference method)
static void EnsureVisible (MethodDefinition caller, MethodReference method)
{
var md = method.Resolve ();
md.IsPublic = true;

27
tools/mtouch/Errors.designer.cs сгенерированный
Просмотреть файл

@ -3811,6 +3811,24 @@ namespace Xamarin.Bundler {
}
}
/// <summary>
/// Looks up a localized string similar to Could not extract the native framework &apos;{0}&apos; from the assembly &apos;{1}&apos;, because it doesn&apos;t contain the resource &apos;{2}&apos;..
/// </summary>
public static string MX1307 {
get {
return ResourceManager.GetString("MX1307", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Could not extract the native library &apos;{0}&apos; from the assembly &apos;{1}&apos;, because it doesn&apos;t contain the resource &apos;{2}&apos;..
/// </summary>
public static string MX1308 {
get {
return ResourceManager.GetString("MX1308", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to One or more reference(s) to type &apos;{0}&apos; already exists inside &apos;{1}&apos; before linking
/// .
@ -4301,5 +4319,14 @@ namespace Xamarin.Bundler {
return ResourceManager.GetString("MX8055", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Failed to marshal the Objective-C object 0x{0} (type: {1}). Could not find an existing managed instance for this object, nor was it possible to create a new managed instance of generic type {2}..
/// </summary>
public static string MX8056 {
get {
return ResourceManager.GetString("MX8056", resourceCulture);
}
}
}
}

Просмотреть файл

@ -1023,6 +1023,14 @@
<value>Could not decompress the file '{0}'. Please review the build log for more information from the native 'unzip' command.</value>
</data>
<data name="MX1307" xml:space="preserve">
<value>Could not extract the native framework '{0}' from the assembly '{1}', because it doesn't contain the resource '{2}'.</value>
</data>
<data name="MX1308" xml:space="preserve">
<value>Could not extract the native library '{0}' from the assembly '{1}', because it doesn't contain the resource '{2}'.</value>
</data>
<data name="MM1401" xml:space="preserve">
<value>The required 'Xamarin.Mac.dll' assembly is missing from the references
</value>
@ -2258,4 +2266,8 @@
<data name="MX8055" xml:space="preserve">
<value>Could not find the type 'ObjCRuntime.__Registrar__' in the assembly '{0}'.</value>
</data>
<data name="MX8056" xml:space="preserve">
<value>Failed to marshal the Objective-C object 0x{0} (type: {1}). Could not find an existing managed instance for this object, nor was it possible to create a new managed instance of generic type {2}.</value>
</data>
</root>