* [ScreenCaptureKit] Add ScreenCaptureKit bindings up to Xcode 13.3
* Use more appropriate exceptions.
* Remove ScreenCaptureKit from Mac Catalyst.
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
The bug in the AOT compiler is being fixed, but until then we can just ignore
the warning, with the idea of removing this code once the AOT bug has been
fixed.
Fixes these MTouch test failures:
* Xamarin.MTouch.BuildWithCulture("sl_SI"):
No warnings expected, but got:
Native linking warning: warning: '/Users/builder/azdo/_work/2/s/xamarin-macios/tests/mtouch/bin/Debug/tmp-test-dir/Xamarin.Tests.BundlerTool.CreateTemporaryDirectory107/mtouch-test-cache/arm64/Xamarin.iOS.dll.o' was built with class_ro_t pointer signing enabled, but previous .o files were not
* Xamarin.MTouch.BuildWithCulture("ur_IN"):
No warnings expected, but got:
Native linking warning: warning: '/Users/builder/azdo/_work/2/s/xamarin-macios/tests/mtouch/bin/Debug/tmp-test-dir/Xamarin.Tests.BundlerTool.CreateTemporaryDirectory109/mtouch-test-cache/arm64/Xamarin.iOS.dll.o' was built with class_ro_t pointer signing enabled, but previous .o files were not
* Xamarin.MTouch.MT0095_NotSharedCode:
No warnings expected, but got:
Native linking warning: warning: '/Users/builder/azdo/_work/2/s/xamarin-macios/tests/mtouch/bin/Debug/tmp-test-dir/Xamarin.Tests.BundlerTool.CreateTemporaryDirectory274/mtouch-test-cache/arm64/Xamarin.iOS.dll.o' was built with class_ro_t pointer signing enabled, but previous .o files were not
Native linking warning: warning: '/Users/builder/azdo/_work/2/s/xamarin-macios/tests/mtouch/bin/Debug/tmp-test-dir/Xamarin.Tests.BundlerTool.CreateTemporaryDirectory272/mtouch-test-cache/arm64/Xamarin.iOS.dll.o' was built with class_ro_t pointer signing enabled, but previous .o files were not
Ref: https://github.com/xamarin/xamarin-macios/issues/14601
Ref: https://dev.azure.com/devdiv/DevDiv/_workitems/edit/1505990/
* Move the logic to create the Xamarin.iOS and Xamarin.Mac symlinks together,
so easier spot differences (both expected and unexpected).
* Fix an issue with the logic where we'd make
/Library/Frameworks/Xamarin.iOS.framework/Versions/git point to
/Library/Frameworks/Xamarin.Mac.framework/Versions/Current.
Try hard to always add a GitHub comment after (trying to) running macOS tests on other bots.
We now:
* Create a file with a generic error message at the very beginning.
* Update the error message if something we detect goes wrong (with a better error message).
* Delete the file in case of success.
* Check for the file at the very end, reporting any contents as a failure, and only if it doesn't exist, then we report success.
This way we'll pretty much always report _something_.
This is what Azure Devops defines:
* Build.SourceBranchName: the last path component of the branch.
* Build.SourceBranch: the complete ref spec for the branch.
We want the branch name without the 'refs/heads/' part. Unfortunately we can't
use Build.SourceBranchName, because for a branch name like
'release/6.0.3xx-rc1' the last path component is '6.0.3xx-rc1', not
'release/6.0.3xx-rc' - in other words it doesn't have all the information we
need.
That means we need to use the Build.SourceBranch value instead, and remove the
'refs/heads/' part. We already compute BRANCH_NAME like this everywhere else,
so just copy that implementation.
Backport of #14568
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
* Remove existing attributes
* Attribute Conversion
* let's add some options and put in feedback
* don't need this check anymore
* Don't copy paste code without reading, Steve
* fallout from no more nulls
* catch exception from options parsing, check for file existence, fix white space
* whitespace
* add --force-overwrite
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Some tests will build xibuild automatically when needed, some won't. This
means that the ones that don't won't succeed if executed before the ones that
do.
To avoid this scenario, just manually build xibuild before running the tests.
The internal bots are giving issues running xtro, public ones are ok.
There is no real reason to use the internal pool to run tests and we can
debug the bots in that pool better.
We move to run tests in the public bots unless told otherwise (when
using devices for example).
This reverts commit 073165fef6.
Fixes this build error:
/Library/Frameworks/Mono.framework/Versions/6.12.0/lib/mono/msbuild/Current/bin/Microsoft.Common.CurrentVersion.targets(1232,5): error MSB3971: The reference assemblies for ".NETFramework,Version=v5.0" were not found. You might be using an older .NET SDK to target .NET 5.0 or higher. Update Visual Studio and/or your .NET SDK. [/Users/rolf/work/maccore/dotnet/xamarin-macios/tools/nnyeah/nnyeah/nnyeah.csproj]
gmake[2]: *** [Makefile:9: bin/Debug/net5.0/nnyeah.dll] Error 1
It can happen that we use the same agent for more than one bot, if that
is the case, we need to make sure that we do not have the same name for
the logs. We use the job id + job name for that.
Adding the needed Makefile and the dir to the parent one so that the
tool is also built in the CI.
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
The problem is:
1. On Mac Catalyst we AOT-compile managed code by default (since we can't JIT).
2. We recently added a binding for the `ASAuthorizationAllSupportedPublicKeyCredentialDescriptorTransports` native function, which is only available on Mac Catalyst 15+. The containing framework (`AuthenticationServices`) is available in Mac Catalyst 13+ (which means we won't link weakly with the framework).
3. The AOT compiler emits a non-weak reference to the `ASAuthorizationAllSupportedPublicKeyCredentialDescriptorTransports` symbol.
4. macOS verifies that there aren't any undefined non-weak symbol references at launch.
5. The `ASAuthorizationAllSupportedPublicKeyCredentialDescriptorTransports` symbol doesn't exist on macOS 11, and thus the app crashes at launch on macOS 11.
I tried the same thing on iOS, and the problem doesn't occur because iOS doesn't to step 4 - the symbol reference are resolved at first use, which means that everything works just fine until the first time the P/Invoke is called (and then the app aborts).
The workaround is to tell the AOT compiler to not emit a direct reference to the P/Invoke (and use dlsym instead) - this fixes case 3) above. Drawbacks: dlsym is slower than a direct reference.
Fixes https://github.com/xamarin/xamarin-macios/issues/14437.