* Add support for 'dotnet publish'.
* Add support for a 'PkgPackagePath' for macOS and Mac Catalyst, an MSBuild
property to specify the resulting .pkg path, to reflect the existing
'IpaPackagePath' (for iOS and tvOS).
* Fix MSBuild logic that uses 'IpaPackagePath'. Looks like nobody has ever
used this...
* Add tests.
Fixes https://github.com/xamarin/xamarin-macios/issues/11807.
We extract frameworks from third-party libraries when running the linker, and
we need to store this information on disk and the reload it after the linker
has executed, and add it to the existing MSBuild variables that keep track of
the user frameworks and dynamic libraries that have to be copied to the app
bundle.
Fixes the framework-test tests.
when (by default)
* the interpreter is not enabled (since new code might subclass or override the members analyzed at build time)
* building for release
Reverts c56b893b68
Fix https://github.com/xamarin/xamarin-macios/issues/9573
Notes
* Even if possible (in metadata) there is no point in setting `final` on
a method if we remove `virtual`. This match ILLink version of the sealer
and makes the same test pass on both.
* Don't apply optimization on non-AOT builds, e.g. simulators, since some
features (like XML serialization) checks for
`RuntimeFeature.IsDynamicCodeSupported` and that requires some types
to be subclassed thru SRE
This is what happens:
1. Mono will write crash dumps in the current directory:
57bfe47451/src/mono/mono/utils/mono-state.c (L302-L322)
2. The current directory is by default the root of the app bundle.
3. If there are any files in the root of the app bundle for macOS or Mac
Catalyst, 'codesign' will fail ("unsealed contents present in the bundle
root").
This leads to the following sequence of events:
1. App developer builds & runs a Mac Catalyst app.
2. The app crashes for some reason.
3. Mono creates a crash dump (in the root directory of the app bundle).
4. The app developer changes something in the project and tries again.
5. The build fails, because 'codesign' fails.
Avoid this by deleting any crash dump files from the root of the app bundle
before signing the app.
This test adds entries to the global reading list in Safari, and there's no
API for the test to clean up after itself, so the reading list becomes an
endless list of entries after a whlie.
Beside the fact that this is somewhat annoying for people who actually use
their reading lists, it can also can end up consuming a significant amount of
space on the hard drive, because Safari will download each site to be
available offline.
* [dotnet] Remove workaround for private symbols for AOT.
* [tools] Make Application.AotArguments a list of string.
This is just a simple refactoring to make Application.AotArguments a list of
strings instead of a comma-separated list of values.
* [tools] Only use direct-icalls when linking mono statically.
Ref: https://github.com/dotnet/runtime/issues/55000
* [mtouch] Fix aot arguments comparison.
* [tests] Adjust mtouch test according to mtouch changes.
* [tests] Add minimum OS version to the Mac Catalyst variation of the MySimpleApp test case.
It's a `Phase` vs `PHASE` lookup that make the tests checking for
fields fail.
```
FieldExists: 3 errors found in 6603 fields validated: PHASESpatialCategoryDirectPathTransmission, PHASESpatialCategoryEarlyReflections, PHASESpatialCategoryLateReverb
```
There's no need in having availability attributes for versions earlier
than the current minimum.
Re-enable the `Introduced` test for _legacy_ Catalyst as it's fine since
it use the older attributes. It's still not possible to enable it for
`NET` until all manual bindings are updated.
This requires a small change to the generator since `Selector.FromHandle`
can return `null` but it does not means the invoked API can (and we are
interested in the later).
Fixed up existing API returning potentially `null` `Selector`, IOW adding
the missing `[NullAllowed]` on them and updating xtro.
On CI we'll collect all the binlogs in the repository and make them available
for post-build analysis if need be, so this will make it easier to diagnose
build problems.
* [introspection] Ignore the ApiAvailabilityTest.LegacyAttribute test on Mac Catalyst as well.
* [introspection] #10883 only applies to Mac Catalyst for legacy Xamarin.
* [xharness] introspection is now green on .NET/Mac Catalyst
* [xharness] Gracefully handle any exceptions that may occur when parsing build logs.
Fixes a harness exception:
Harness exception for 'monotouch-test': System.ArgumentException: '', hexadecimal value 0x1D, is an invalid character.
at System.Xml.XmlEncodedRawTextWriter.InvalidXmlChar (System.Int32 ch, System.Char* pDst, System.Boolean entitize) [0x00026] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/referencesource/System.Xml/System/Xml/Core/XmlEncodedRawTextWriter.cs:1420
at System.Xml.XmlEncodedRawTextWriter.WriteCDataSection (System.String text) [0x00251] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/referencesource/System.Xml/System/Xml/Core/XmlEncodedRawTextWriter.cs:1370
at System.Xml.XmlEncodedRawTextWriter.WriteCData (System.String text) [0x0012a] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/referencesource/System.Xml/System/Xml/Core/XmlEncodedRawTextWriter.cs:470
at System.Xml.XmlEncodedRawTextWriterIndent.WriteCData (System.String text) [0x00007] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/referencesource/System.Xml/System/Xml/Core/XmlEncodedRawTextWriter.cs:1750
at System.Xml.XmlWellFormedWriter.WriteCData (System.String text) [0x00029] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/referencesource/System.Xml/System/Xml/Core/XmlWellFormedWriter.cs:771
at Microsoft.DotNet.XHarness.iOS.Shared.XmlResults.TestReportGenerator.WriteFailure (System.Xml.XmlWriter writer, System.String message, System.IO.TextReader stderr) [0x00031] in /_/src/Microsoft.DotNet.XHarness.iOS.Shared/XmlResults/TestReportGenerator.cs:41
at Microsoft.DotNet.XHarness.iOS.Shared.XmlResults.NUnitV3TestReportGenerator.GenerateFailure (System.Xml.XmlWriter writer, System.String title, System.String message, System.IO.TextReader stderr) [0x0030e] in /_/src/Microsoft.DotNet.XHarness.iOS.Shared/XmlResults/NUnitV3TestReportGenerator.cs:122
at Microsoft.DotNet.XHarness.iOS.Shared.XmlResults.XmlResultParser.GenerateFailureXml (System.String destination, System.String title, System.String message, System.IO.TextReader stderrReader, Microsoft.DotNet.XHarness.Common.XmlResultJargon jargon) [0x00033] in /_/src/Microsoft.DotNet.XHarness.iOS.Shared/XmlResults/XmlResultParser.cs:226
at Microsoft.DotNet.XHarness.iOS.Shared.XmlResults.XmlResultParser.GenerateFailure (Microsoft.DotNet.XHarness.iOS.Shared.Logging.ILogs logs, System.String source, System.String appName, System.String variation, System.String title, System.String message, System.IO.TextReader stderrReader, Microsoft.DotNet.XHarness.Common.XmlResultJargon jargon) [0x000a4] in /_/src/Microsoft.DotNet.XHarness.iOS.Shared/XmlResults/XmlResultParser.cs:248
at Xharness.Jenkins.TestTasks.RunTest.BuildAsync () [0x00274] in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/xharness/Jenkins/TestTasks/RunTest.cs:74
at Xharness.Jenkins.TestTasks.RunTest.ExecuteAsync () [0x000d8] in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/xharness/Jenkins/TestTasks/RunTest.cs:99
at Xharness.Jenkins.TestTasks.TestTasks.RunInternalAsync () [0x00226] in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/xharness/Jenkins/TestTasks/TestTask.cs:283
* Fix missing parenthesis in message.
Fixes this test failure on device:
[FAIL] CurrentDirectory : Current directory at launch
Expected string length 97 but was 89. Strings differ at index 1.
Expected: "/private/var/containers/Bundle/Application/4824129A-8668-4CD9..."
But was: "/var/containers/Bundle/Application/4824129A-8668-4CD9-9280-7F..."
Fixes these test failures:
MonoTouchFixtures.HealthKit.CategoryTypeIdentifier
[FAIL] EnumValues_22351 : AppleWalkingSteadinessEvent could not be created: System.ArgumentNullException: Value cannot be null.
Parameter name: hkCategoryTypeIdentifier
at ObjCRuntime.NativeObjectExtensions.GetNonNullHandle (ObjCRuntime.INativeObject self, System.String argumentName) [0x00003] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/ObjCRuntime/INativeObject.cs:27
at HealthKit.HKObjectType.GetCategoryType (Foundation.NSString hkCategoryTypeIdentifier) [0x00000] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/build/ios/native/HealthKit/HKObjectType.g.cs:111
at HealthKit.HKCategoryType.Create (HealthKit.HKCategoryTypeIdentifier kind) [0x00000] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/HealthKit/HKObjectType.cs:26
at MonoTouchFixtures.HealthKit.CategoryTypeIdentifier.EnumValues_22351 () [0x001fd] in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/monotouch-test/HealthKit/CategoryTypeIdentifierTest.cs:115
at MonoTouchFixtures.HealthKit.CategoryTypeIdentifier.EnumValues_22351 () [0x0024f] in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/monotouch-test/HealthKit/CategoryTypeIdentifierTest.cs:120
MonoTouchFixtures.HealthKit.QuantityTypeIdentifier
[FAIL] EnumValues_22351 : AppleWalkingSteadiness could not be created: System.ArgumentNullException: Value cannot be null.
Parameter name: hkTypeIdentifier
at ObjCRuntime.NativeObjectExtensions.GetNonNullHandle (ObjCRuntime.INativeObject self, System.String argumentName) [0x00003] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/ObjCRuntime/INativeObject.cs:27
at HealthKit.HKObjectType.GetQuantityType (Foundation.NSString hkTypeIdentifier) [0x00000] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/build/ios/native/HealthKit/HKObjectType.g.cs:162
at HealthKit.HKQuantityType.Create (HealthKit.HKQuantityTypeIdentifier kind) [0x00000] in /Users/builder/azdo/_work/1/s/xamarin-macios/src/HealthKit/HKObjectType.cs:19
at MonoTouchFixtures.HealthKit.QuantityTypeIdentifier.EnumValues_22351 () [0x0017a] in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/monotouch-test/HealthKit/QuantityTypeIdentifierTest.cs:87
at MonoTouchFixtures.HealthKit.QuantityTypeIdentifier.EnumValues_22351 () [0x001cc] in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/monotouch-test/HealthKit/QuantityTypeIdentifierTest.cs:92
Also make these tests show all failing enum values at once, instead of having
to run the test after adding each new case.
* A lot of availability attribute updates.
* Some conditional "#if !__MACCATALYST__" in manual binding files.
* xtro updates.
* Misc other minor tweaks.
* Rearrange some MSBuild logic so that the packaging/archiving code for macOS
can also be used for Mac Catalyst.
* Make the .NET build logic package/archive when requested to do so.
* Add tests.
Partial fix for https://github.com/xamarin/xamarin-macios/issues/10413.
List all the assemblies in the app bundle and pass them to MonoVM/CoreCLR's in
the TRUSTED_PLATFORM_ASSEMBLIES initialization property.
This way CoreCLR knows where to find System.Private.CoreLib.dll for fat apps
(it's in the runtimeidentifier-specific subdirectory, and by default CoreCLR
will only look next to libcoreclr.dylib).
Fixes https://github.com/xamarin/xamarin-macios/issues/12265.
A new check was added to ensure that empty .todo files are not added,
yet when the sanitizer removes all lines we get an error per empty file.
Since we are auto-sanitizing, we want to remove those empty files.
* Update dependencies from https://github.com/dotnet/installer build 20210727.4
Microsoft.Dotnet.Sdk.Internal
From Version 6.0.100-rc.1.21376.3 -> To Version 6.0.100-rc.1.21377.4
Dependency coherency updates
Microsoft.NET.ILLink.Tasks
From Version 6.0.100-preview.6.21370.1 -> To Version 6.0.100-preview.6.21376.2 (parent: Microsoft.Dotnet.Sdk.Internal
* Bump Mono.Cecil from 0.11.3 to 0.11.4.
* [dotnet-linker] Reference Mono.Cecil 0.11.4 directly.
Works around https://github.com/mono/linker/issues/2173.
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
* [tests] Add a .NET version of introspection for Mac Catalyst.
It shows a lot of failures (so it's disabled by default), but this way we can
at least start to fix the failures.
* [xharness] Always ignore the new test.
* [xharness] Ignored projects should be ignored.
That way we can do this in api definitions:
[BaseType (typeof (NSObject))]
interface MyType : MyProtocol { }
[Protocol]
[NoMacCatalyst]
interface MyProtocol {}
instead of this:
[BaseType (typeof (NSObject))]
interface MyType
#if __MACOS__
: MyProtocol
#endif
{
}
[Protocol]
[NoMacCatalyst]
interface MyProtocol {}
for a type that implements a protocol on macOS, but not on Mac Catalyst.
* Merged a MonoMac-only version of NSMutableCharacterSet + a non-MonoMac version
of NSMutableCharacterSet into a single definition.
* Add a few [NullAllowed] where new API triggered xtro warnings (I either had to
add more ignores to xtro, or fix the issues - I decided to fix the issues).
* Remove numerous "#if MONOMAC" blocks and switched to availability attributes.
* Merged a MonoMac-only list of NSWindow fields and a non-MonoMac list of NSWindow
fields into a single definition (which was quite useless because NSWindow is only
present on macOS, so the non-MonoMac list was just dead code).
* Misc other availability attribute additions/fixes.
Otherwise this happens when running tests from within the IDE:
error BI0000: Unexpected error - Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new
System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
File name: 'System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
at System.ReadOnlySpan`1[T].op_Implicit (T[] array) [0x00000] in <16786cfd571c4686983021cfcee42fb4>:0
at System.Reflection.TypeLoading.CoreTypes..ctor (System.Reflection.MetadataLoadContext loader, System.String coreAssemblyName) [0x0003d] in <49552709e6e14610b2a2f34b9d5f4c52>:0
at System.Reflection.MetadataLoadContext..ctor (System.Reflection.MetadataAssemblyResolver resolver, System.String coreAssemblyName) [0x00046] in <49552709e6e14610b2a2f34b9d5f4c52>:0
at BindingTouch.Main3 (System.String[] args) [0x00e91] in /Users/rolf/work/maccore/msbuild/xamarin-macios/src/btouch.cs:454
at BindingTouch.Main2 (System.String[] args) [0x00007] in /Users/rolf/work/maccore/msbuild/xamarin-macios/src/btouch.cs:199
at BindingTouch.Main (System.String[] args) [0x00002] in /Users/rolf/work/maccore/msbuild/xamarin-macios/src/btouch.cs:91
at System.Environment.get_StackTrace () [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System/Environment.cs:316
at ErrorHelper.ShowInternal (System.Exception e) [0x0010f] in /Users/rolf/work/maccore/msbuild/xamarin-macios/src/error.cs:175
at ErrorHelper.Show (System.Exception e, System.Boolean rethrow_errors) [0x00089] in /Users/rolf/work/maccore/msbuild/xamarin-macios/src/error.cs:125
at BindingTouch.Main (System.String[] args) [0x0000d] in /Users/rolf/work/maccore/msbuild/xamarin-macios/src/btouch.cs:93
at Xamarin.Tests.BGenTool.Execute () [0x000a1] in /Users/rolf/work/maccore/msbuild/xamarin-macios/tests/generator/BGenTool.cs:228
at Xamarin.Tests.BGenTool.AssertExecute (System.String message) [0x00001] in /Users/rolf/work/maccore/msbuild/xamarin-macios/tests/generator/BGenTool.cs:207
at GeneratorTests.BGenTests.BuildFile (Xamarin.Tests.Profile profile, System.Boolean nowarnings, System.Boolean processEnums, System.Collections.Generic.IEnumerable`1[T] references, System.String[] filenames) [0x000ab] in /Users/rolf/work/maccore/msbuild/xamarin-macios/tests/generator/BGenTests.cs:764
at GeneratorTests.BGenTests.BuildFile (Xamarin.Tests.Profile profile, System.Boolean nowarnings, System.Boolean processEnums, System.String[] filenames) [0x00001] in /Users/rolf/work/maccore/msbuild/xamarin-macios/tests/generator/BGenTests.cs:750
at GeneratorTests.BGenTests.BuildFile (Xamarin.Tests.Profile profile, System.String[] filenames) [0x00001] in /Users/rolf/work/maccore/msbuild/xamarin-macios/tests/generator/BGenTests.cs:740
at GeneratorTests.BGenTests.IgnoreUnavailableProtocol () [0x00001] in /Users/rolf/work/maccore/msbuild/xamarin-macios/tests/generator/BGenTests.cs:636
at System.Reflection.RuntimeMethodInfo.InternalInvoke (System.Reflection.RuntimeMethodInfo , System.Object , System.Object[] , System.Exception& ) [0x00000] in <08f46039e5064c628bf7795f9b970b7b>:0
at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.Reflection/RuntimeMethodInfo.cs:395
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/external/corefx/src/Common/src/CoreLib/System/Reflection/MethodBase.cs:53
at NUnit.Framework.Internal.Reflect.InvokeMethod (System.Reflection.MethodInfo method, System.Object fixture, System.Object[] args) [0x00000] in <be0e2b70ca254bb684417cccea7d5290>:0
at NUnit.Framework.Internal.MethodWrapper.Invoke (System.Object fixture, System.Object[] args) [0x00000] in <be0e2b70ca254bb684417cccea7d5290>:0
at NUnit.Framework.Internal.Commands.TestMethodCommand.InvokeTestMethod (NUnit.Framework.Internal.TestExecutionContext context) [0x00000] in <be0e2b70ca254bb684417cccea7d5290>:0
at NUnit.Framework.Internal.Commands.TestMethodCommand.RunTestMethod (NUnit.Framework.Internal.TestExecutionContext context) [0x00000] in <be0e2b70ca254bb684417cccea7d5290>:0
at NUnit.Framework.Internal.Commands.TestMethodCommand.Execute (NUnit.Framework.Internal.TestExecutionContext context) [0x00000] in <be0e2b70ca254bb684417cccea7d5290>:0
at NUnit.Framework.Internal.Execution.SimpleWorkItem.PerformWork () [0x00000] in <be0e2b70ca254bb684417cccea7d5290>:0
at NUnit.Framework.Internal.Execution.WorkItem.RunOnCurrentThread () [0x00000] in <be0e2b70ca254bb684417cccea7d5290>:0
at NUnit.Framework.Internal.Execution.WorkItem.Execute () [0x00000] in <be0e2b70ca254bb684417cccea7d5290>:0
at NUnit.Framework.Internal.Execution.TestWorker.TestWorkerThreadProc () [0x00000] in <be0e2b70ca254bb684417cccea7d5290>:0
at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) [0x00014] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/threading/thread.cs:74
at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00071] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/threading/executioncontext.cs:968
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/threading/executioncontext.cs:910
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) [0x0002b] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/threading/executioncontext.cs:899
at System.Threading.ThreadHelper.ThreadStart () [0x00008] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/threading/thread.cs:111
unless the snippet-based attribute also set the `Optimizable` property.
IOW this is now required to _opt-in_ (to optimize) instead of default,
with no ~easy~ way to turn it off.
Re-enabled each of the `[Dispose]` cases after protecting the required
extra calls they make.
Fix https://github.com/xamarin/xamarin-macios/issues/12150
* Add test for [Dispose] and SnippetAttribute subclasses
* Opt-in all [*Snippet] to be optimizable
This is exactly what we have been shipping for years (no changes).
Unlike [Dispose] there is no change in the generated code or the
optimizations.
Future snippets should come with tests - which is _normal_ for any
manual code (which they are) added to the SDK
* Add support for the interpreter everywhere.
* Add support for the AOT compiler everywhere we didn't support it before,
because the interpreter needs it (at least System.Private.CoreLib.dll must
be AOT-compiled when using the interpreter).
* Do FullAOT compilation on Mac Catalyst/ARM64 if we're not using the
interpreter, since we can't use the JIT.
* Fix monotouch-test to be green on Mac Catalyst/ARM64.
Fixes https://github.com/xamarin/xamarin-macios/issues/11724.
Fixes https://github.com/xamarin/xamarin-macios/issues/11421.
Modifying the test to use UTC datetimes instead of local datetimes + specify
the timezone for the NSCalendar to make the results predictable everywhere and
at all times.
Fixes https://github.com/xamarin/maccore/issues/2471.
Make the NSWritingDirection enum from Foundation the main version, and
deprecate the others (AppKit.NSWritingDirection,
UIKit.UITextWritingDirection).
This makes things a bit easier with Mac Catalyst, which ships both AppKit and UIKit.
Ref: https://github.com/xamarin/xamarin-macios/issues/6573
* [gamekit] Remove `isPresentingFriendRequestViewController` from Catalyst
The selector is not annotated by itself (wrt Catalyst) but it maps to
`presentFriendRequestCreatorFromViewController` which is not available
on Catalyst. That part is clear in the headers
```diff
+#if TARGET_OS_IOS && !TARGET_OS_MACCATALYST
+/**
+ * presentFriendRequestCreatorFromViewController:
...
+#elif TARGET_OS_OSX
+/**
+ * presentFriendRequestCreatorFromWindow:
```
* [dotnet] Add support for implicit namespace imports. Fixes#12084.
Also update our templates to remove any using statements for implicitly imported
namespaces.
Fixes https://github.com/xamarin/xamarin-macios/issues/12084.
* [monotouch-test] Fix compilation error due to implicit namespace causing type conflict.
Fixes these errors:
xamarin-macios/tests/monotouch-test/ImageIO/MutableImageMetadataTest.cs(54,54): error CS0104: 'CGImageProperties' is an ambiguous reference between 'CoreGraphics.CGImageProperties' and 'ImageIO.CGImageProperties'
xamarin-macios/tests/monotouch-test/ImageIO/MutableImageMetadataTest.cs(54,88): error CS0104: 'CGImageProperties' is an ambiguous reference between 'CoreGraphics.CGImageProperties' and 'ImageIO.CGImageProperties'
xamarin-macios/tests/monotouch-test/ImageIO/ImageMetadataTest.cs(40,54): error CS0104: 'CGImageProperties' is an ambiguous reference between 'CoreGraphics.CGImageProperties' and 'ImageIO.CGImageProperties'
xamarin-macios/tests/monotouch-test/ImageIO/ImageMetadataTest.cs(40,88): error CS0104: 'CGImageProperties' is an ambiguous reference between 'CoreGraphics.CGImageProperties' and 'ImageIO.CGImageProperties'
* [monotouch-test] Check a few more permissions that sometimes make the app crash due to a TCC violation on Mac Catalyst.
* [monotouch-test] Adjust CaptureDeviceTest to only verify camera permission for Audio+Video, any other value is not supported by the OS.
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
This pull request updates the following dependencies
## From https://github.com/dotnet/installer
- **Subscription**: df3e6147-3e41-4928-6775-08d8f479343c
- **Build**: 20210720.12
- **Date Produced**: 7/21/2021 6:57 AM
- **Commit**: d7279fc09fcfb108c5fb97fa290dbbb11c4c441b
- **Branch**: refs/heads/main
- **Updates**:
- **Microsoft.Dotnet.Sdk.Internal**: [from 6.0.100-preview.7.21330.1 to 6.0.100-rc.1.21370.12][1]
- **Microsoft.NET.ILLink.Tasks**: [from 6.0.100-preview.6.21329.2 to 6.0.100-preview.6.21370.1][2]
[1]: 823ff33...d7279fc
[2]: f549b4e...6eae019
## Coherency Updates
The following updates ensure that dependencies with a *CoherentParentDependency*
attribute were produced in a build used as input to the parent dependency's build.
See [Dependency Description Format](https://github.com/dotnet/arcade/blob/master/Documentation/DependencyDescriptionFormat.md#dependency-description-overview)
- **Coherency Updates**:
- **Microsoft.NET.ILLink.Tasks**: from 6.0.100-preview.6.21329.2 to 6.0.100-preview.6.21370.1 (parent: Microsoft.Dotnet.Sdk.Internal)
* Add proper .NET project files for dont link, link sdk and link all. This
includes a Mac Catalyst variant, and adding helpful Makefile targets for
simple execution.
* Adjust various tests to work with Mac Catalyst.
* Add the new Mac Catalyst variants to xharness.
This is a partial fix for #10833.
* [AppKit/UIKit] Merge the definitions of NSTextLayoutOrientationProvider.
It looks like this might be a breaking change for macOS, but the macOS
definition had only a [Model] attribute, which won't make the generator
generate any public API.
* [AppKit/UIKit] Merge the definitions of NSTextContainer.
* [AppKit/UIKit] Merge the definitions of NSExtendedStringDrawing.
* [src] Share the NSTextStorage[Delegate] implementations between AppKit and UIKit.
* [AppKit/UIKit] Merge the definitions of NSCollectionLayoutAnchor.
* [AppKit/UIKit] Merge the definitions of the NSCollectionLayout* classes.
* [AppKit/UIKit] Merge the definitions of NSDataAsset.
* [AppKit/UIKit] Merge the definitions of NSShadow.
* [AppKit/UIKit] Merge the definitions of NSTextTab.
* Update xtro.
It would create a file in the current directory, which is the root directory of the app bundle.
This would work in the simulator (because the directory is read-write), fail
on device (because the directory is read-only), and cause rebuilds to fail
with Mac Catalyst (because the directory is read-write the test would succeed,
but it would write files in the root directory of the app bundle, which is not
allowed for macOS apps, and thus codesign would fail when rebuilding the app).
So change the test to create any files in a temporary directory, and adjust it
to always expect the file to be created.
And just in case also delete the file at the end of the test.
This fixes a problem where the html report wouldn't be re-generated if there
was a problem loading a device (which for instance could happen if xharness
was unable to create a required simulator).
* 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).
* [src] Share [I]NSCollectionLayoutVisibleItem implementation between AppKit and UIKit.
* [src] Share several NSLayout* implementations between AppKit and UIKit.
* 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.
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.
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
* We need to specify a minimum OS version, because otherwise we'll pick the
latest OS version we support, and at least for macOS, we might very well try
to execute on earlier OS versions, leading to confusing failures like this:
Xamarin.Tests.DotNetProjectTest.BuildAndExecuteNativeReferencesTestApp("NativeDynamicLibraryReferencesApp",MacOSX,"osx-x64"): Contains magic word
Expected: String containing "dc8bd019-bea2-4c86-92dc-dda22e2e6b88"
But was: "dyld: Library not loaded: /System/Library/Frameworks/CHIP.framework/Versions/A/CHIP
Referenced from: /Users/builder/azdo/_work/1/s/xamarin-macios/tests/dotnet/NativeDynamicLibraryReferencesApp/macOS/bin/Debug/net6.0-macos/osx-x64/NativeDynamicLibraryReferencesApp.app/Contents/MacOS/NativeDynamicLibraryReferencesApp
Reason: image not found
* We only need a minimum OS version (for now at least) in the Info.plist, so
remove everything else.
Co-authored-by: Rachel Kang <rachelkang@microsoft.com>
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
* initial changes for EventKit Xcode13 Beta1
* adding delegate
* fixing delegates
* removing NoMacCatalyst from MONOMAC
* removing rest of monomac maccatalysts
* Apply suggestions from code review
Co-authored-by: Alex Soto <alex@alexsoto.me>
* there was one more EKVirtualConferenceURLDescriptor
Co-authored-by: tj_devel709 <antlambe@microsoft.com>
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
Co-authored-by: Alex Soto <alex@alexsoto.me>
Add support for universal / fat apps for iOS, macOS and Mac Catalyst.
We detect if we need to build a universal app by checking if `RuntimeIdentifiers` (plural) is set, and in that case we do a complete inner build for every `RuntimeIdentifier`, and then once those inner builds are done, we merge the resulting .app bundles together (using a new MSBuild task called `MergeAppBundles`).
When merging app bundles together, we'll run into files that exist in both apps. Depending on the file type, we do different things:
* MachO flies: lipo'ed together.
* Managed assemblies: we do a binary comparison, if the assemblies are different, we put them in a RID-specific subdirectory. At runtime we know to look for assemblies in this directory.
* runtimeconfig.bin, icudt.dat: put in a RID-specific subdirectory.
* Info.plist: computed in the outer (fat) build, the one from the inner build is ignored.
* Other files: for identical files we just copy one, otherwise we show an error.
If we run into files that are different between apps, but we should handle somehow, then we'll have to decide on a case-to-case basis what to do.
Some code shuffling was required to increase code sharing between the tools/ code, the msbuild/ code, and tests.
I've also added support for a default `RuntimeIdentifier`.
Fixes https://github.com/xamarin/xamarin-macios/issues/10294.
Fixes https://github.com/xamarin/xamarin-macios/issues/10861.
Update tests regarding the deprecated fields and classes.
Co-authored-by: Rachel Kang <rachelkang@microsoft.com>
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
* Initial changes for xcode13 GameController beta1
* syntax and name change
* name change and adding async
Co-authored-by: tj_devel709 <antlambe@microsoft.com>
* Bump min watchOS simulator to 6.0.
Fixes https://github.com/xamarin/maccore/issues/2454.
* Try to keep using the iOS 12 simulator for watchOS 8.0
* [introspection] Fix running on watchOS 6.0.
* [AVFoundation] Adjust availability of AVPlayerWaitingDuringInterstitialEventReason.
to make sure the latest locally build nuget are used
Also document `make strip-dotnet` as a time-saver to analyze the binary
assemblies produced for dotnet
* Do an inner build per RuntimeIdentifier.
* In the outer build, execute the new MergeAppBundles task to
merge the resulting app bundles from the inner builds.
Also add tests:
* Remove RuntimeIdentifier from a few sample projects. These projects should
continue to build just fine.
* Add tests for invalid RuntimeIdentifiers.
Fixes https://github.com/xamarin/xamarin-macios/issues/10861.
* [tools] Fix quoting quotes in StringUtils.QuoteForProcess.
Previously quoting a string with a quote:
a"b
would result in:
"a\"""b"
There are way too many quotes there.
We'll now get:
"a\"b"
which is correct.
* Add unit test.
* It's easier to fix up the path to the linker description in xharness when
cloning project files. This way maybe we'll be able to remove the [hardcoded
logic in xharness][1] to handle ${ProjectDir}.
* .NET doesn't understand the ${ProjectDir} syntax, so this makes it possible
to build these projects from the command line.
[1]: b2297d610d/src/Microsoft.DotNet.XHarness.iOS.Shared/Utilities/ProjectFileExtensions.cs (L1268)
TL&DR: They were removed from headers so we can't use them for our tests.
Long Story:
To avoid app being rejected the selectors must be removed from the app.
This means the removal of the `[Export]` and `[Bind]` attributes inside
the platform assemblies. That, in turn, makes the binding generator
unable to create bindings for those types.
If some 3rd party bindings extended those types then they also need to
remove them (they will not be able to submit with the symbols anyway).
Stubs can be used, whether or not binary compatibility is provided for
the 3rd party bindings consumers.
Fix https://github.com/xamarin/xamarin-macios/issues/11947
Most of the API were removed in Xcode 13 beta 1.
The App Store also started to reject some of the (already deprecated)
selectors that were removed, making the API not usable anymore (even
on older versions of the OS).
The base ApiSelectorTest class already handles these selectors, and does it
almost right, so just remove this special case and fix the base class logic.
Fixes these failures on macOS 10.15:
Introspection.MacApiSelectorTest
[FAIL] InstanceMethods : 4 errors found in 27001 instance selector validated:
Selector not found for CoreML.MLDictionaryFeatureProvider : encodeWithCoder: in Void EncodeTo(Foundation.NSCoder) on CoreML.MLDictionaryFeatureProvider
Selector not found for CoreML.MLMultiArray : encodeWithCoder: in Void EncodeTo(Foundation.NSCoder) on CoreML.MLMultiArray
Selector not found for CoreML.MLFeatureValue : encodeWithCoder: in Void EncodeTo(Foundation.NSCoder) on CoreML.MLFeatureValue
Selector not found for CoreML.MLSequence : encodeWithCoder: in Void EncodeTo(Foundation.NSCoder) on CoreML.MLSequence
Fixes https://github.com/xamarin/xamarin-macios/issues/11885.
* Bump maccore.
New commits in xamarin/maccore:
* xamarin/maccore@9acbbed1f6 [mlaunch] Add support for Xcode 13 beta 1. (#2452)
* xamarin/maccore@e48f75c0b6 [Xamarin.Hosting] Fix the --stdout arg not being forwarded to DeviceLaunchConfig (#2435)
* xamarin/maccore@109c695b1b [Xamarin.Hosting] Fix help string for launchdev argument (#2429)
Diff: cddbd1915d..9acbbed1f6
* [xtro] Fix generation of .pch files
* [xtro] Fix deprecated check to handle (anonymous) declarations and enable latest C# syntax in project
* [xtro] Fix _sanity_ checks
* [xtro] Update todo for beta 1
* [Siminstaller] Force siminstaller to use the xcode 12.5 url
Related issue: https://github.com/xamarin/xamarin-macios/issues/11881
* Fix introspection failures (due to [breaking] changes)
* [tests][intro] Fix hang for tvOS
Creating an instance of `NSMetadataQuery` hangs the simulator.
Even after (xharness) timeout the simulator is not in a good state
to run further tests and every new (tvOS) test will also hang...
* [tests][intro] Same hang for watchOS
except that further test execution does not seem affected (like tvOS)
```
CoreSimulator 772.1 - Device: Apple Watch Series 3 - 38mm (watchOS 8.0) - created by XHarness (42262867-E060-40C0-803E-6DA676AF50CC) - Runtime: watchOS 8.0 (19R5266p) - DeviceType: Apple Watch Series 3 - 38mm
Thread 0 Crashed:: tid_103 Dispatch queue: com.apple.main-thread
0 com.apple.Foundation 0x00007fff21470bd0 -[NSMetadataQuery dealloc] + 432
1 libobjc.A.dylib 0x00007fff200d11f7 objc_object::sidetable_release(bool, bool) + 177
2 com.apple.Foundation 0x00007fff21470a03 -[NSMetadataQuery init] + 64
3 com.xamarin.introspection_watch.watchkitapp.watchkitextension 0x0000000107efc139 xamarin_dyn_objc_msgSend + 217 (trampolines-x86_64-objc_msgSend.s:15)
4 ??? 0x000000010c76d4f6 0 + 4504081654
5 com.xamarin.introspection_watch.watchkitapp.watchkitextension 0x0000000107cffc85 mono_jit_runtime_invoke + 1621 (mini-runtime.c:3197)
6 com.xamarin.introspection_watch.watchkitapp.watchkitextension 0x0000000107e177d8 do_runtime_invoke + 54 (object.c:3052) [inlined]
7 com.xamarin.introspection_watch.watchkitapp.watchkitextension 0x0000000107e177d8 mono_runtime_invoke_checked + 136 (object.c:3220)
8 com.xamarin.introspection_watch.watchkitapp.watchkitextension 0x0000000107e1e3c5 mono_runtime_try_invoke_array + 2101 (object.c:5601)
9 com.xamarin.introspection_watch.watchkitapp.watchkitextension 0x0000000107daf977 ves_icall_InternalInvoke + 871 (icall.c:3927)
10 com.xamarin.introspection_watch.watchkitapp.watchkitextension 0x0000000107dc0167 ves_icall_InternalInvoke_raw + 103 (icall-def.h:667)
11 ??? 0x000000010a232799 0 + 4465043353
12 ??? 0x000000010c76e08b 0 + 4504084619
```
* [tests][monotouch-test] Fix failures with xcode 13 beta 1
* [tests][mmptest] Use a FAT framework that's build with x86_64 and arm64
Co-authored-by: Alex Soto <alex@alexsoto.me>
Co-authored-by: Sebastien Pouliot <sebastien.pouliot@microsoft.com>
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
The entire `.framework` directory needs to be copied back to Windows
when a native reference is a [xc]framework. Otherwise important files
will be missing and the app bundle will be unusable.
Fix https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1339824
This is possible because both types are toll-free bridged [0].
How ?
* Renamed `CFString.FetchString` to `FromHandle` so it match `NSString` API
* Make it `public` so it can be used for generated/3rd party bindings
* Update generator to use the new API (instead of the `NSString` version)
* Update manual bindings to use the new API
Why ?
It's no secret that p/invoke (C) are faster than calling a selector
(ObjC). In most cases we do not have a choice what to call... but in a
few, but commonly used, cases we can pick the fastest call.
```
// * Summary *
BenchmarkDotNet=v0.12.1.1528-nightly, OS=macOS Big Sur 11.3.1 (20E241) [Darwin 20.4.0]
Intel Core i7-4790K CPU 4.00GHz (Haswell), 1 CPU, 8 logical and 4 physical cores
[Host] : Mono 6.12.0 (2020-02/c633fe92383), X64
Job=InProcess Toolchain=InProcessEmitToolchain InvocationCount=1
IterationCount=3 LaunchCount=1 WarmupCount=3
| Type | Method | UnrollFactor | ArraySize | Mean | Error | StdDev | Median |
|-------------------- |------------------------------------ |------------- |---------- |----------------:|-----------------:|----------------:|----------------:|
| TollFreeString | ReturnString_NSString | 16 | ? | 2,522.0 ns | 878.81 ns | 48.17 ns | 2,541.7 ns |
| TollFreeString | ReturnString_CFString | 16 | ? | 808.1 ns | 7.48 ns | 0.41 ns | 808.2 ns |
```
Next ?
The next step is to reduce other `NSString` selectors usage,
then `NSArray`...
[0] https://developer.apple.com/library/archive/documentation/General/Conceptual/CocoaEncyclopedia/Toll-FreeBridgin/Toll-FreeBridgin.html
* [tests] Augment the .NET unit tests to verify that more runtime identifiers build.
* [dotnet] Show a better error if the AOT compiler doesn't exist.
* [dotnet] Use the official path for the AOT compiler.
* [dotnet] Use platform-specific templates for WorkloadManifest.json.
* [dotnet] Generate the workload targets before the nupkgs.
This avoids a random build failure when doing parallel make.
* [builds] Install the runtime workloads for iOS and tvOS so that we have the AOT compilers downloaded for our local tests.
* [dotnet] Make the iOS and tvOS workloads load the AOT compiler packages from Mono.
* [dotnet] Move the workloads into a common subdirectory.
Also delete the watchOS workload, we're not shipping it for now.
* [dotnet] Set DOTNETSDK_WORKLOAD_MANIFEST_ROOTS when install workloads to get our local ones.
* Set DOTNETSDK_WORKLOAD_MANIFEST_ROOTS to where our local workloads are to use them when installing our locally built workloads into .NET (the local one).
* Stop installing workloads from builds/
* Get NuGet.config with local feed, and make sure those feed contain local build before running 'workload install'.
* Fix makefile logic.
* Another tweak.
* [monotouch-test] Use TestRuntime.RunAsync instead of AppDelegate.RunAsync so that the system sound tests work on macOS as well.
* [AudioToolbox] Don't use a generic Action type in a P/Invoke, CoreCLR doesn't support it.
Fixes these test failures:
[FAIL] FromFile : System.Runtime.InteropServices.MarshalDirectiveException : Cannot marshal 'parameter #4': Non-blittable generic types cannot be marshaled.
at AudioToolbox.SystemSound.AudioServicesAddSystemSoundCompletion(UInt32 soundId, IntPtr runLoop, IntPtr runLoopMode, Action`2 completionRoutine, IntPtr clientData)
at AudioToolbox.SystemSound.AddSystemSoundCompletion(Action routine, CFRunLoop runLoop) in Xamarin.Mac.dll:token 0x600bfd4+0x2b
at MonoTouchFixtures.AudioToolbox.SystemSoundTest.FromFile() in xamarin-macios/tests/monotouch-test/AudioToolbox/SystemSoundTest.cs:line 40
[FAIL] TestCallbackPlayAlert : System.ArgumentException : The specified Type must not be a generic type. (Parameter 'delegate')
at System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegateInternal(Delegate d)
at System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(Delegate d) in System.Private.CoreLib.dll:token 0x6004586+0xe
at ObjCRuntime.BlockLiteral.SetupBlockImpl(Delegate trampoline, Delegate userDelegate, Boolean safe, String signature) in Xamarin.Mac.dll:token 0x6001306+0xb
at ObjCRuntime.BlockLiteral.SetupBlock(Delegate trampoline, Delegate userDelegate, Boolean safe) in Xamarin.Mac.dll:token 0x6001305+0x5e
at ObjCRuntime.BlockLiteral.SetupBlockUnsafe(Delegate trampoline, Delegate userDelegate) in Xamarin.Mac.dll:token 0x6001307+0x0
at AudioToolbox.SystemSound.PlayAlertSound(Action onCompletion) in Xamarin.Mac.dll:token 0x600bfc8+0x20
at MonoTouchFixtures.AudioToolbox.SystemSoundTest.<>c__DisplayClass3_1.<<TestCallbackPlayAlert>b__0>d.MoveNext() in xamarin-macios/tests/monotouch-test/AudioToolbox/SystemSoundTest.cs:line 93
--- End of stack trace from previous location ---
at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__140_0(Object state) in System.Private.CoreLib.dll:token 0x6002d4d+0x0
at Foundation.NSAsyncSynchronizationContextDispatcher.Apply() in Xamarin.Mac.dll:token 0x6016560+0x0
--- End of stack trace from previous location ---
at ObjCRuntime.Runtime.InvokeMethod(MethodBase method, Object instance, IntPtr native_parameters) in Xamarin.Mac.dll:token 0x60011d1+0x274
at ObjCRuntime.Runtime.InvokeMethod(MonoObject* methodobj, MonoObject* instanceobj, IntPtr native_parameters) in Xamarin.Mac.dll:token 0x60011d0+0x0
at ObjCRuntime.Runtime.bridge_runtime_invoke_method(MonoObject* method, MonoObject* instance, IntPtr parameters, IntPtr& exception_gchandle) in Xamarin.Mac.dll:token 0x6001124+0x26
at ObjCRuntime.Messaging.void_objc_msgSend_IntPtr(IntPtr receiver, IntPtr selector, IntPtr arg1)
at TestRuntime.RunAsync(DateTime timeout, Action action, Func`1 check_completed, NSImage imageToShow) in xamarin-macios/tests/common/mac/TestRuntime.macos.cs:line 18
at MonoTouchFixtures.AudioToolbox.SystemSoundTest.TestCallbackPlayAlert() in xamarin-macios/tests/monotouch-test/AudioToolbox/SystemSoundTest.cs:line 92
[FAIL] TestCallbackPlaySystem : System.ArgumentException : The specified Type must not be a generic type. (Parameter 'delegate')
at System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegateInternal(Delegate d)
at System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(Delegate d) in System.Private.CoreLib.dll:token 0x6004586+0xe
at ObjCRuntime.BlockLiteral.SetupBlockImpl(Delegate trampoline, Delegate userDelegate, Boolean safe, String signature) in Xamarin.Mac.dll:token 0x6001306+0xb
at ObjCRuntime.BlockLiteral.SetupBlock(Delegate trampoline, Delegate userDelegate, Boolean safe) in Xamarin.Mac.dll:token 0x6001305+0x5e
at ObjCRuntime.BlockLiteral.SetupBlockUnsafe(Delegate trampoline, Delegate userDelegate) in Xamarin.Mac.dll:token 0x6001307+0x0
at AudioToolbox.SystemSound.PlaySystemSound(Action onCompletion) in Xamarin.Mac.dll:token 0x600bfca+0x20
at MonoTouchFixtures.AudioToolbox.SystemSoundTest.<>c__DisplayClass2_1.<<TestCallbackPlaySystem>b__0>d.MoveNext() in xamarin-macios/tests/monotouch-test/AudioToolbox/SystemSoundTest.cs:line 74
--- End of stack trace from previous location ---
at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__140_0(Object state) in System.Private.CoreLib.dll:token 0x6002d4d+0x0
at Foundation.NSAsyncSynchronizationContextDispatcher.Apply() in Xamarin.Mac.dll:token 0x6016560+0x0
--- End of stack trace from previous location ---
at ObjCRuntime.Runtime.InvokeMethod(MethodBase method, Object instance, IntPtr native_parameters) in Xamarin.Mac.dll:token 0x60011d1+0x274
at ObjCRuntime.Runtime.InvokeMethod(MonoObject* methodobj, MonoObject* instanceobj, IntPtr native_parameters) in Xamarin.Mac.dll:token 0x60011d0+0x0
at ObjCRuntime.Runtime.bridge_runtime_invoke_method(MonoObject* method, MonoObject* instance, IntPtr parameters, IntPtr& exception_gchandle) in Xamarin.Mac.dll:token 0x6001124+0x26
at ObjCRuntime.Messaging.void_objc_msgSend_IntPtr(IntPtr receiver, IntPtr selector, IntPtr arg1)
at TestRuntime.RunAsync(DateTime timeout, Action action, Func`1 check_completed, NSImage imageToShow) in xamarin-macios/tests/common/mac/TestRuntime.macos.cs:line 18
at MonoTouchFixtures.AudioToolbox.SystemSoundTest.TestCallbackPlaySystem() in xamarin-macios/tests/monotouch-test/AudioToolbox/SystemSoundTest.cs:line 73
* making sure new strings get added to designer and resources plus the test
* Next wave of changes to csproj to incorporate Rolf's changes
* fixing path
* Update tests/msbuild/Xamarin.MacDev.Tasks.Tests/TaskTests/LocalizationStringTest.cs
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
* Update tests/mtouch/LocalizationTests.cs
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
* forgot the include
Co-authored-by: tj_devel709 <antlambe@microsoft.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
* [monotouch-test] It doesn't look like the TryCopyCurrentNetworkInfo test works in the iOS 11 simulator either.
Partial fix for #11504.
* Always assert null.
Try to fix these warnings that show up at runtime by checking if the root view
controller is a UINavigationController, and doing the right thing:
> Unbalanced calls to begin/end appearance transitions for <...>
Using the AOT LLVM-backend is recommended for release and should be used
when comparing sizes.
Also add some basic instruction to ease comparing `oldnet` and `dotnet`
app bundles since IL stripping is not yet available to dotnet builds (and
without considering this the _real_ numbers are a bit off)