* Make `CFArray` public so it can be used for bindings, including 3rd party bindings
* Subclass `NativeObject` to remove some boilerplate code
* Most members are `internal` until needed
* Add nullability annotations
The next step is to make the same kind of optimization done on `NSString`
vs `CFString` by preferring faster p/invokes over calling selectors while
keeping generated code identical.
Also
* Make more methods internal so we can potentially rename them (when the NSArray variants becomes obsolete)
* Add CFArray to the attachment tests
* [monotouch-test] Create a shared.csproj for all the .NET monotouch-test project files.
Also complete the logic to build metal files, so that it works on Mac Catalyst as well.
* [monotouch-test] Add helper makefiles.
* [monotouch-test] Fix the RootTestsDirectory in the csproj.
* [monotouch-test] Add empty ItemGroup for xharness to put stuff in.
* [monotouch-test] Set DYNAMIC_REGISTRAR in each csproj, because xharness needs to be able to unset it.
* [monotouch-test] Exclude tests that don't work with AOT from Mac Catalyst/ARM64.
* [monotouch-test] Use 'ComputedPlatform' instead of 'Platform' to determine whether we're building for a device or not.
'Platform' can be anything, while we know the value of 'ComputedPlatform'. And
since 'ComputedPlatform' is computed after the csproj is read, we need to
delay the computation until later (thus in a separate target).
Microsoft.Dotnet.Sdk.Internal
From Version 6.0.100-preview.7.21330.1 -> To Version 6.0.100-rc.1.21369.3
Dependency coherency updates
Microsoft.NET.ILLink.Tasks
From Version 6.0.100-preview.6.21329.2 -> To Version 6.0.100-preview.6.21366.2 (parent: Microsoft.Dotnet.Sdk.Internal
Microsoft.Dotnet.Sdk.Internal
From Version 6.0.100-preview.7.21330.1 -> To Version 6.0.100-rc.1.21368.3
Dependency coherency updates
Microsoft.NET.ILLink.Tasks
From Version 6.0.100-preview.6.21329.2 -> To Version 6.0.100-preview.6.21366.2 (parent: Microsoft.Dotnet.Sdk.Internal
Microsoft.Dotnet.Sdk.Internal
From Version 6.0.100-preview.7.21330.1 -> To Version 6.0.100-rc.1.21367.1
Dependency coherency updates
Microsoft.NET.ILLink.Tasks
From Version 6.0.100-preview.6.21329.2 -> To Version 6.0.100-preview.6.21363.1 (parent: Microsoft.Dotnet.Sdk.Internal
Microsoft.Dotnet.Sdk.Internal
From Version 6.0.100-preview.7.21330.1 -> To Version 6.0.100-rc.1.21366.58
Dependency coherency updates
Microsoft.NET.ILLink.Tasks
From Version 6.0.100-preview.6.21329.2 -> To Version 6.0.100-preview.6.21363.1 (parent: Microsoft.Dotnet.Sdk.Internal
* [src] Share [I]NSCollectionLayoutVisibleItem implementation between AppKit and UIKit.
* [src] Share several NSLayout* implementations between AppKit and UIKit.
So that the ComputeAOTArguments can compute the llvm-path value to pass to the AOT
compiler (the llvm-path value states where the opt and llc command-line tools are,
and they're next to the AOT compiler).
Enable nullability in btouch.cs, and fix the resulting warnings.
Fixes these warnings (because there were already nullability annotations in
btouch.cs):
src/btouch.cs(640,26): warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
src/btouch.cs(642,9): warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
We need to process the runtimeconfig.json file somehow when using CoreCLR, and
the embedding API we use (coreclr_initialize) won't parse it for us. So re-use
the logic we already have to process runtimeconfig.json for MonoVM (which
involves converting it to a binary format at build time, which we then process
at runtime).
Microsoft.Dotnet.Sdk.Internal
From Version 6.0.100-preview.7.21330.1 -> To Version 6.0.100-preview.7.21365.23
Dependency coherency updates
Microsoft.NET.ILLink.Tasks
From Version 6.0.100-preview.6.21329.2 -> To Version 6.0.100-preview.6.21363.1 (parent: Microsoft.Dotnet.Sdk.Internal
Fix Runtime.GetIsARM64CallingConvention to be the same on all platforms, and
also we can't use simulator/device to determine anything, since the simulator
can do ARM64 on an M1 now.
* Use the Apple-provided TARGET_OS_SIMULATOR define to determine if we're
running in a simulator, instead of checking the current architecture. This
way we properly detect ARM64-based simulators (and it'll work correctly in
the future).
* Always set Runtime.Arch = SIMULATOR for Mac Catalyst. The final value for
Runtime.Arch for Mac Catalyst is tracked in #10312, but this is a stop-gap
measure to make sure we have the same value between X64 and ARM64 on Mac
Catalyst, and until now we've had Runtime.Arch = SIMULATOR for X64, so just
go with that for now.
* [xkit] Merge uikit's and appkit's definition of NSCollectionLayoutGroup into xkit.cs
* [xkit] Merge uikit's and appkit's definition of NSCollectionLayoutSection into xkit.cs
* [src] Share NSCollectionLayoutGroupCustomItem implementation between AppKit and UIKit.
* [src] Share [I]NSCollectionLayoutContainer implementation between AppKit and UIKit.
* [src] Share [I]NSCollectionLayoutEnvironment implementation between AppKit and UIKit.
Microsoft.Dotnet.Sdk.Internal
From Version 6.0.100-preview.7.21330.1 -> To Version 6.0.100-preview.7.21364.30
Dependency coherency updates
Microsoft.NET.ILLink.Tasks
From Version 6.0.100-preview.6.21329.2 -> To Version 6.0.100-preview.6.21363.1 (parent: Microsoft.Dotnet.Sdk.Internal
Specialize the tvOS version of ILLink.LinkAttributes.xml, where we don't
include the "ObjCRuntime.AvailabilityAttribute" type (because it doesn't exist
in tvOS).
Fixes this linker warning:
resource ILLink.LinkAttributes.xml in Xamarin.TVOS, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065(37,6): warning IL2008: Could not resolve type 'ObjCRuntime.AvailabilityAttribute'
* Move the templates to a common subdirectory.
* Add .NET unit test to verify that all the templates build and that they have
no warnings.
* Modify the template code to:
* Use the UIApplication.Main overload that takes a Type.
* Use top-level statements for the Main method to simplify code.
* Remove a few unnecessary usings.
Partial fix for #12085.
Return early when we're not going to try resolving anything, which means that
if we didn't find something by the end, we know that it's because we failed
(and not because we weren't supposed to try), and we log that.
This makes it easier to diagnose a few failure conditions.
To have consistent behavior in .NET, set the current directory to the root of
the app bundle for all platforms.
This is a breaking change for legacy Xamarin.Mac, which used to set the
current directory to the Contents/Resources subdirectory, but there's a simple
workaround for customers that depend on the old behavior (change it in Main
themselves), and I believe the consistent experience across platforms warrants
this change.
Note that we already had a breaking change here for macOS/.NET: we were
(unintentionally) setting the current directory to the Contents/MonoBundle
directory, which neither matched mobile platforms, nor the legacy Xamarin.Mac
behavior.
This solves the problem of what to do for Mac Catalyst apps, because there's
no need to choose between the macOS or the mobile behavior, since they're the
same.
This required changing the launch of macOS apps using CoreCLR to pass the full
path to the entry assembly, since the entry assembly isn't in the current
directory anymore.
Microsoft.Dotnet.Sdk.Internal
From Version 6.0.100-preview.7.21330.1 -> To Version 6.0.100-preview.7.21364.4
Dependency coherency updates
Microsoft.NET.ILLink.Tasks
From Version 6.0.100-preview.6.21329.2 -> To Version 6.0.100-preview.6.21363.1 (parent: Microsoft.Dotnet.Sdk.Internal
Microsoft.Dotnet.Sdk.Internal
From Version 6.0.100-preview.7.21330.1 -> To Version 6.0.100-preview.7.21362.12
Dependency coherency updates
Microsoft.NET.ILLink.Tasks
From Version 6.0.100-preview.6.21329.2 -> To Version 6.0.100-preview.6.21362.2 (parent: Microsoft.Dotnet.Sdk.Internal
Context: https://github.com/dotnet/maui/pull/1578
In the latest xamarin-macios bump, the dotnent/maui build started
failing because the `$(OutputPath)` of all the projects changed from:
bin/Debug/net6.0-ios/
bin/Debug/net6.0-maccatalyst/
To:
bin/Debug/net6.0-ios/iossimulator-x64/
bin/Debug/net6.0-maccatalyst/maccatalyst-x64/
Class library projects appear to have `$(RuntimeIdentifier)` set by
default. I don't think this is needed, because class libraries do not
need to be compiled as `--self-contained` apps.
On the Android side, we only set a default `$(RuntimeIdentifiers)` for
application projects:
7c5fab1332/src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.DefaultProperties.targets (L49-L61)
I think the correct change here is to check:
'$(OutputType)' == 'Exe' Or '$(IsAppExtension)' == 'true'
So Apple platforms only put a default `$(RuntimeIdentifier)` for
applications or extensions.
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Fixes this test failure:
[FAIL] Embedded : System.Globalization.CultureNotFoundException : Only the invariant culture is supported in globalization-invariant mode. See https://aka.ms/GlobalizationInvariantMode for more information. (Parameter 'name')
en is an invalid culture identifier.
at System.Globalization.CultureInfo..ctor(String name, Boolean useUserOverride) in System.Private.CoreLib.dll:token 0x60027b4+0x2f
at System.Globalization.CultureInfo..ctor(String name) in System.Private.CoreLib.dll:token 0x60027b3+0x0
at EmbeddedResources.ResourcesTest.Embedded() in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/EmbeddedResources/ResourcesTest.cs:line 44
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) in System.Private.CoreLib.dll:token 0x6004f05+0x6a
Fixes this test failure:
[FAIL] FloatingPointStretTrampolineTest : System.Globalization.CultureNotFoundException : Only the invariant culture is supported in globalization-invariant mode. See https://aka.ms/GlobalizationInvariantMode for more information. (Parameter 'name')
en-US is an invalid culture identifier.
at System.Globalization.CultureInfo..ctor(String name, Boolean useUserOverride) in System.Private.CoreLib.dll:token 0x60027b4+0x2f
at System.Globalization.CultureInfo..ctor(String name) in System.Private.CoreLib.dll:token 0x60027b3+0x0
at MonoTouchFixtures.ObjCRuntime.FloatingPointStretTrampolines.ParseString(String str) in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/monotouch-test/ObjCRuntime/TrampolineTest.cs:line 640
at MonoTouchFixtures.ObjCRuntime.FloatingPointStretTrampolines.Test_CGRect_IntPtr(NSString str) in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/monotouch-test/ObjCRuntime/TrampolineTest.cs:line 664
--- End of stack trace from previous location ---
at MonoTouchFixtures.ObjCRuntime.TrampolineTest.FloatingPointStretTrampolineTest() in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/monotouch-test/ObjCRuntime/TrampolineTest.cs:line 242
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) in System.Private.CoreLib.dll:token 0x6004f05+0x6a