There are numerous checks that don't make much sense to report for deprecated
API, so skip those. This also required updating a few .ignore and .todo files.
Apple does this in their headers:
#define DISPATCH_ALIAS_V2(sym) __asm__("_" #sym "$V2")
dispatch_queue_t
dispatch_queue_create_with_target(const char *_Nullable label,
dispatch_queue_attr_t _Nullable attr, dispatch_queue_t _Nullable target)
DISPATCH_ALIAS_V2(dispatch_queue_create_with_target);
Which means that the native compiler will call
'dispatch_queue_create_with_target$V2' when the source code says to call
'dispatch_queue_create_with_target'.
The only place I've run into this problem, is when building for tvOS (device),
and targetting exactly tvOS 10.0 (neither earlier or later), in which case the
linker fails:
Undefined symbols for architecture arm64:
"_dispatch_queue_create_with_target", referenced from:
wrapper_managed_to_native_CoreFoundation_DispatchQueue_dispatch_queue_create_with_target_string_intptr_intptr in Xamarin.TVOS.dll.o
I filed this as a feedback with Apple some time ago [1], and Apple resolved it
as by design, saying "These symbols are renamed, please use the SDK."
Now I ran into it again with .NET, and it's become a bit more important, since
tvOS 10.0 is the earliest tvOS version we support, which means it'll be more
likely that customers use _exactly_ 10.0 as their target tvOS version. So I
looked into it again, and as far as I can tell, we can just call the '$V2'
variant instead of the original name everywhere.
Apple does the same thing for two other functions, but we haven't bound any of
those, so this only affects 'dispatch_queue_create_with_target' for us.
[1]: Bug ID 48076044: Can't reference 'dispatch_queue_create_with_target' when min tvOS version is exactly 10.0
This version of Xcode requires macOS 11.0 or later.
New commits in xamarin/maccore:
* xamarin/maccore@de616ca53e [mlaunch] Fix dependencies for Xcode 12.5 beta 1 (#2387)
* xamarin/maccore@e93375583c [Actions] Fix rebase trigger.
* xamarin/maccore@0dfeb85ff6 [CI][VSTS] Add information when the external tool fails. (#2377)
* xamarin/maccore@87e165fdbb Remove Vincent as a code owner 😞 (#2368)
* xamarin/maccore@55a700bb5b [build] Add /restore to Xamarin.Analysis build (#2366)
* xamarin/maccore@2d9f8a9685 Bump to xamarin/xamarin-analysis@95245313 (#2362)
Diff: 428964bf32..de616ca53e
* Bump system mono to the latest available 2020-02 package. (#10402)
This makes xamarin-macios build on Apple Silicon, and also seems to get an
updated csc that fixes a problem with nullability warnings/errors.
* [tests] Fix mmp-regression build
```
10:59:46.5383210 Making all in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/mmp-regression
10:59:46.5392610 TargetFrameworkFallbackSearchPaths=/Users/builder/azdo/_work/1/s/xamarin-macios/_mac-build/Library/Frameworks/Mono.framework/External/xbuild-frameworks MSBuildExtensionsPathFallbackPathsOverride=/Users/builder/azdo/_work/1/s/xamarin-macios/_mac-build/Library/Frameworks/Mono.framework/External/xbuild make all
10:59:46.6208220 /Applications/Xcode_12.5.0-beta.app/Contents/Developer/usr/bin/make clean
10:59:46.6956100 /Applications/Xcode_12.5.0-beta.app/Contents/Developer/usr/bin/make build
10:59:46.7422460 GEN dylib/libTest.dylib
10:59:46.8094820 ld: library not found for -lSystem
10:59:46.8097590 clang: error: linker command failed with exit code 1 (use -v to see invocation)
10:59:46.8110310 make[2]: *** [dylib/libTest.dylib] Error 1
10:59:46.8112570 make[1]: *** [run] Error 2
10:59:47.0030120 Process make exited with 2
```
This happens on BigSur as it does not find the default location anymore...
* [tests] Do not test GKLeaderboardViewController on BigSur
The issue is the OS version, not the Xcode version. Update check
to skip that test on macOS 11+
* [tests] Fix MSBuild tests / integration
The test cannot work on BigSur since while you can `dlopen` the library
you can open `fopen` it as a file (and can't embed it for the test).
```
12:31:23.9407820 CSC : error CS1566: Error reading resource 'libz.dylib' -- 'Could not find file "/usr/lib/libz.dylib"' [/Users/builder/azdo/_work/1/s/xamarin-macios/tests/msbuild/Xamarin.MacDev.Tests/bin/Debug/net472/tmp-test-dir/msbuild-tests201/XM45Binding.csproj]
12:31:23.9407900 Done Building Project "/Users/builder/azdo/_work/1/s/xamarin-macios/tests/msbuild/Xamarin.MacDev.Tests/bin/Debug/net472/tmp-test-dir/msbuild-tests201/XM45Binding.csproj" (default targets) -- FAILED.
```
* [tests] Fix MTouch tests failures
* `nm` changed it's output and test was updated
* `clang` linking has a much higher limit for it's command-line length
At least it does not seem to be OS specific since both 10.15 and 11.0
returns the same maximum
```
$ getconf ARG_MAX
1048576
```
* [xcode12] Initial bump for Xcode 12 GM
* [tests][intro] We cannot load CoreNFC framework on iOS simulator anymore
* [tests][xtro] New Metal API are not abstract (before XAMCORE_4_0)
* [tests][intro] Fix crash when CSLocalizedString 'description' selector is called
* [tests][xtro] Add support for excluding platforms
Based on `Make.config` variables `INCLUDE_[IOS|TVOS|WATCH|MAC]`
This required moving some entries (common -> macOS) to keep the
sanitizer happy.
* [xtro] Ignore Intents watchOS differences since they will likely match iOS in the future
* Update to use Xcode 12 GMb instead of the old GM
* [tests][xtro] Remove OSLog for iOS and tvOS (changed in GM)
* [tests][msbuild] Disable FrameworkListTest based on the active/disabled platforms
* [tests][msbuild] Track new directory/file inside CoreML projects
* [mlaunch] Bump maccore and disable mlaunch if mac build is disabled
New commits in xamarin/maccore:
* xamarin/maccore@ba332d4d07 Disable mlaunch if Mac is not built (#2314)
Diff: 87a96d21c9..ba332d4d07
Co-authored-by: Sebastien Pouliot <sebastien.pouliot@microsoft.com>
When working on https://github.com/xamarin/maccore/issues/940 we noticed
that clone the array would be a better approach.
The CFArrayCreateCopy add some nice things:
* The pointer values from theArray are copied into the new array.
* The values are also retained by the new array.
* The count of the new array is the same as theArray
* The new array uses the same callbacks as theArray. [IMPORTANT]
Whith this in, we can have a better fix for https://github.com/xamarin/maccore/issues/940
Since there's no `NSString` or .NET equivalent. This requires a mutable
`CFString` so the new type `CFMutableString` is also added.
* Switch `CFString` base type to `NativeObject` to ease `CFMutableString` implementation;
* Add unit tests for `CFMutableString` both for `CFStringTransform` and some unicode variety to `CFStringAppendCharacters tests` wrt `numChars` being unicode or not (bytes)
Fixes https://github.com/xamarin/xamarin-macios/issues/5705
* [CoreFoundation, ObjCRuntime] Add DispatchBlock APIs, in particular those that surface QOS
* Make the struct readonly
Co-Authored-By: migueldeicaza <miguel@gnome.org>
* Make the field read-only
Co-Authored-By: migueldeicaza <miguel@gnome.org>
* Add Qos to the list of accepted words
* To add a finalizer that can dispose the object, turn this into a class,
rather than being just a wrapper around the native handle.
* Fix copyright.
* Fix whitespace issues.
* Adjust visibility of existing DispatchBlock method we don't want to make public
* Refactor a bit.
* Make DispatchObject inherit from NativeObject to avoid some code duplication.
* Put all P/Invokes in BlockLiteral.
* Simplify block code somewhat.
* Sprinkle [BindingImpl (Optimizable)] where needed.
* Add both constructors and static Create methods to create DispatchBlocks.
* Add an explicit operator to get an Action delegate from a DispatchBlock, and
an Invoke method to directly call said delegate.
* Add a few convenience API:
* Wait with a TimeSpan overload.
* Cancelled property.
* Notify with an Action overload.
* Add some DispatchQueue overloads to make DispatchBlock actually usable.
* Seal DispatchBlock.
Users shouldn't subclass DispatchBlock.
* Add tests.
* DispatchBlockFlags is native-sized (nuint).
* Fix a few more nint issues.
* Add availability attributes.
* Fix introspection tests.
* Fix xtro.
* Fix xammac tests.
* [CoreFoundation] Fetch a few static values lazily.
This avoids using static constructors, and also avoids fetching the values
unless they're needed.
* Generate the code for _dispatch_data_destructor_free instead of using a manual binding.
* [CoreFoundation] Bind kCFBooleanTrue/kCFBooleanFalse using the generator.
Since the generator doesn't know about CFBoolean, bind as IntPtr instead, and
fix most callers to use the handle directly, instead of getting a CFBoolean
object and then immediately getting the handle.
* Add back comment.
* Update xtro.
* Fix typo check.
* Use complete path for the library in the Field attribute.
* Update xtro.
* [CoreGraphics] Add first batch of Xcode10 APIs, added an enum that we did not surface before
* [xcode10] CoreGraphics support
* Fix whitespace/formatting and add comma after last enum value.
* Make CFPropertyList follow normal INativeObject creation pattern.
* Make CFPropertyList.AsData return the error as a tuple.
* Fix CFPropertyList.AsData to not leak.
* CFPropertyList.Value: use Runtime.GetNSObject so that we don't accidentally create duplicate wrappers for the same native object.
* [CoreGraphics] Update to beta 5.
* Update xtro definitions.
* Add tests.
* Don't compare value type with null.
* Use PascalCase for named return tuples.
* [CoreFoundation] Make CFPropertyList enums native and fix code accordingly.
* [tests] Fix fetching 64-bit int to actually fetch a 64-bit int and not a nint.
* [tests] Teach introspection's ApiCMAttachmentTest about CFPropertyList.
* Not every old annotations have been migrated (work in progress, to be completed in another PR);
* Sanitation of the data files (e.g. removal of dupes and fixed, by Apple, entries) is done, but not automated (also a work in progress)
Even then this is immediately useful, i.e. better merged before 15.6 gets branched.