System.Private.CoreLib.dll contains P/Invokes to a libhostpolicy library,
which isn't shipped.
An isssue has been filed to fix this in the runtime: https://github.com/dotnet/runtime/issues/38543
Goals
* Reflect Apple nullability annotations in our bindings using C#8
* No warnings when building bindings
Non-Goals
* Update (add or fix) `[NullAllowed]` to match Apple headers (next phase)
* Make the generator or internal code fully nullable aware (`nowarn` is used)
Notes
* Apple's own annotations are not 100% accurate :(
* Where known issue exists we have _fixed_ our attributes to match reality :)
* We also do additional null-checks internally that might seems not required (better safe than sorry).
Goals
* Reflect Apple nullability annotations in our bindings using C#8
* No warnings when building bindings
Non-Goals
* Update (add or fix) `[NullAllowed]` to match Apple headers (next phase)
* Make the generator or internal code fully nullable aware (`nowarn` is used)
Notes
* Apple's own annotations are not 100% accurate :(
* Where known issue exists we have _fixed_ our attributes to match reality :)
* We also do additional null-checks internally that might seems not required (better safe than sorry).
This optimization can be enabled when it's not possible to use the
managed linker (e.g. **Don't link**) or when the managed linker cannot
remove references to deprecated types that would cause an application
to be rejected by Apple.
References to the existing types will be renamed, e.g. `UIWebView` to
`DeprecatedWebView`, in every assemblies.
The type definition is also renamed (for validity) and all custom
attributes on the types and their members will be removed.
Code inside the members will be replaced with a
`throw new NotSupportedException ();`.
The msbuild test app `MyReleaseBuild` has been updated to test that the
optimization is working as expected (device builds are slow so reusing
this test has little impact in test time).
Basically the test ensure that `UIWebView` is used and cannot be removed
by the compiler (optimization) or the managed linker (since it's
referenced). Since the optimization is enabled then we can `grep` then
final `.app` directory to ensure there's no mention of `UIWebView` inside
any of the files that would be submitted.
The application can be run, by itself, and will turn green if OK, red if
`DeprecatedWebView` can't be found (skeleton replacement for `UIWebView`)
or orange if a `NotSupportedException` is thrown.
Finally introspection tests have been updated to skip over the deprecated
(and renamed) types. It should not be an issue right now, since this
optimization is not enabled by default, but it made testing easier.
This optimization can be enabled when it's not possible to use the
managed linker (e.g. **Don't link**) or when the managed linker cannot
remove references to deprecated types that would cause an application
to be rejected by Apple.
References to the existing types will be renamed, e.g. `UIWebView` to
`DeprecatedWebView`, in every assemblies.
The type definition is also renamed (for validity) and all custom
attributes on the types and their members will be removed.
Code inside the members will be replaced with a
`throw new NotSupportedException ();`.
The msbuild test app `MyReleaseBuild` has been updated to test that the
optimization is working as expected (device builds are slow so reusing
this test has little impact in test time).
Basically the test ensure that `UIWebView` is used and cannot be removed
by the compiler (optimization) or the managed linker (since it's
referenced). Since the optimization is enabled then we can `grep` then
final `.app` directory to ensure there's no mention of `UIWebView` inside
any of the files that would be submitted.
The application can be run, by itself, and will turn green if OK, red if
`DeprecatedWebView` can't be found (skeleton replacement for `UIWebView`)
or orange if a `NotSupportedException` is thrown.
Finally introspection tests have been updated to skip over the deprecated
(and renamed) types. It should not be an issue right now, since this
optimization is not enabled by default, but it made testing easier.
* XAMARIN_MAC: Used once, replace with MONOMAC.
* UNIFIED: Use once elsewhere, replace with __UNIFIED__.
* OBJECT_REF_TRACKING: not used anywhere.
* XAMARIN_MODERN: not used anywhere.
* NET_2_0: not used anywhere.
Also update the README a bit.
This will spot cases like https://github.com/xamarin/xamarin-macios/issues/7959
where a type (static) constructor can fail at runtime, leading to
`TypeLoadException`
Ideally it's covered by it's own tests but it's better covered twice
than never :)
On iOS 64bits [1] simulator we hit some failures [2], later, if the
`.cctor` is executed. It's not a big deal to avoid those types since
we it will be executed on devices later.
[1] API not present on 32bits
[2] Fixing the following triggers similar failures for `DCDevice`
```
ApiClassPtrTest.VerifyClassPtr: class_ptr and RegisterAttribute are different: NFCIso15693CustomCommandConfiguration
Expected: 0
But was: 140735471513712
ApiSelectorTest.StaticMethods: 7 errors found in 2788 static selector validated:
CoreNFC.NFCIso15693ReaderSession : readingAvailable
CoreNFC.NFCNdefMessage : ndefMessageWithData:
CoreNFC.NFCNdefPayload : wellKnownTypeURIPayloadWithString:
CoreNFC.NFCNdefPayload : wellKnownTypeURIPayloadWithURL:
CoreNFC.NFCNdefPayload : wellKnownTypeTextPayloadWithString:locale:
CoreNFC.NFCNdefReaderSession : readingAvailable
CoreNFC.NFCReaderSession : readingAvailable
Expected: 0
But was: 7
```
Co-authored-by: Sebastien Pouliot <sebastien.pouliot@gmail.com>
This will spot cases like https://github.com/xamarin/xamarin-macios/issues/7959
where a type (static) constructor can fail at runtime, leading to
`TypeLoadException`
Ideally it's covered by it's own tests but it's better covered twice
than never :)
On iOS 64bits [1] simulator we hit some failures [2], later, if the
`.cctor` is executed. It's not a big deal to avoid those types since
we it will be executed on devices later.
[1] API not present on 32bits
[2] Fixing the following triggers similar failures for `DCDevice`
```
ApiClassPtrTest.VerifyClassPtr: class_ptr and RegisterAttribute are different: NFCIso15693CustomCommandConfiguration
Expected: 0
But was: 140735471513712
ApiSelectorTest.StaticMethods: 7 errors found in 2788 static selector validated:
CoreNFC.NFCIso15693ReaderSession : readingAvailable
CoreNFC.NFCNdefMessage : ndefMessageWithData:
CoreNFC.NFCNdefPayload : wellKnownTypeURIPayloadWithString:
CoreNFC.NFCNdefPayload : wellKnownTypeURIPayloadWithURL:
CoreNFC.NFCNdefPayload : wellKnownTypeTextPayloadWithString:locale:
CoreNFC.NFCNdefReaderSession : readingAvailable
CoreNFC.NFCReaderSession : readingAvailable
Expected: 0
But was: 7
```
* [xcode11.4] Add xcode 11.4 b1 initial support
* [xtro] re-enable PDFKit
* Disable watchOS and fix xtro
Unfortunately watchOS simulator hangs when we try to deploy to it
and it keeps our tests timing out. Disabling for now until we
can investigate more.
Disables PDFKit on xtro in macOS
* [jenkins] Switch to use the catalina bot group (#7819)
* Bump maccore to get fix for launching the simulator for watch apps.
New commits in xamarin/maccore:
* xamarin/maccore@546270c8f9 [Xamarin.Hosting] Fix the name of the notification we get when the simulator has launched. (#2145)
Diff: 55957e908d..546270c8f9
* [tests] Diable watch due to time out, enable 10,15,4 in intro, fix min version
* Bump macios-binaries to get updated binary mlaunch as well.
New commits in xamarin/macios-binaries:
* xamarin/macios-binaries@f8c6e63 Bump mlaunch to xamarin/maccore@546270c8f9
Diff: eb6980e8b6..f8c6e63228
* [msbuild] Reflect ibtool changes in our tests
Looks like Apple reverted some changes introduces in Xcode 11
in ibtool, for more context see xamarin/xamarin-macios#6970
* [mtouch] Workaround strange behavior of realpath.
Co-authored-by: Sebastien Pouliot <sebastien.pouliot@gmail.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
The order of the check matters, we only skip with a sim && not on
xcode11.
The other whay around will do the wrong short circuit. Since if we are
not on Xcode11 we will always skip, including device, which is not
correct.
Fixes: https://github.com/xamarin/xamarin-macios/issues/6243.
* Add xamarin_os_log function
See the comment in the function for an explanation
of why this wrapper function is required.
* Add Darwin/OSLog.cs
* Add xamarin_os_log to header
This ensures that the symbol will not be subject
to C++ name mangling, therefore breaking mmp.
With this change applied, OSLog works as expected.
* Resolve stylistic PR feedback
* Move OSLog into CoreFoundation namespace
This is where the NativeObject class lives, and it
also feels like a better fit for a low-level API
that is available on non-Mac platforms than the
macOS-only Darwin namespace.
There are a number of namespaces that do not support the API and can be
completly skipped. Also some of the classes in those namspaces are
expensive to create and the test is not providing any useful
information.
Fixes: https://github.com/xamarin/maccore/issues/2038
* [SceneKit] Adjust deprecation message.
Fixes this introspection failure:
[FAIL] [Rule 4] Don't use availability keywords in attribute's message: "OpenGL API deprecated, please use Metal instead." - Type: SCNLayer
[FAIL] [Rule 4] Don't use availability keywords in attribute's message: "OpenGL API deprecated, please use Metal instead." - Member name: get_OpenGLContext, Type: SCNView
[FAIL] [Rule 4] Don't use availability keywords in attribute's message: "OpenGL API deprecated, please use Metal instead." - Member name: set_OpenGLContext, Type: SCNView
[FAIL] [Rule 4] Don't use availability keywords in attribute's message: "OpenGL API deprecated, please use Metal instead." - Member name: get_PixelFormat, Type: SCNView
[FAIL] [Rule 4] Don't use availability keywords in attribute's message: "OpenGL API deprecated, please use Metal instead." - Member name: set_PixelFormat, Type: SCNView
* [AppKit] Adjust deprecation messages.
* [tests] Fix introspection and xammac tests on Catalina. (#7200)
* [tests] Adjust NaturalLanguage.EmbeddingTest to cope with non-existent embeddings. Fixesxamarin/maccore#2011.
Fixes https://github.com/xamarin/maccore/issues/2011.
* [tests] Fix typo test on macOS 10.15. Fixes#7116.
Fixes https://github.com/xamarin/xamarin-macios/issues/7116.
* [introspection] Ignore MTLCounterSampleBufferDescriptor's selectors.
They're implemented using a different/internal type:
$ nm /System/Library/Frameworks/Metal.framework/Metal | grep MTLCounterSampleBuffer
00000000000458ab t +[MTLCounterSampleBufferDescriptor allocWithZone:]
0000000000045897 t +[MTLCounterSampleBufferDescriptor alloc]
000000000004591e t -[MTLCounterSampleBufferDescriptor copyWithZone:]
000000000004598e t -[MTLCounterSampleBufferDescriptorInternal copyWithZone:]
0000000000045c0f t -[MTLCounterSampleBufferDescriptorInternal counterSet]
0000000000045936 t -[MTLCounterSampleBufferDescriptorInternal dealloc]
0000000000045b65 t -[MTLCounterSampleBufferDescriptorInternal hash]
0000000000045a31 t -[MTLCounterSampleBufferDescriptorInternal isEqual:]
0000000000045c58 t -[MTLCounterSampleBufferDescriptorInternal label]
0000000000045c7f t -[MTLCounterSampleBufferDescriptorInternal sampleCount]
0000000000045c25 t -[MTLCounterSampleBufferDescriptorInternal setCounterSet:]
0000000000045c6e t -[MTLCounterSampleBufferDescriptorInternal setLabel:]
0000000000045c90 t -[MTLCounterSampleBufferDescriptorInternal setSampleCount:]
0000000000045c47 t -[MTLCounterSampleBufferDescriptorInternal setStorageMode:]
0000000000045c36 t -[MTLCounterSampleBufferDescriptorInternal storageMode]
000000000010b0b8 S _OBJC_CLASS_$_MTLCounterSampleBufferDescriptor
000000000010b0e0 S _OBJC_CLASS_$_MTLCounterSampleBufferDescriptorInternal
0000000000107070 S _OBJC_IVAR_$_MTLCounterSampleBufferDescriptorInternal._counterSet
0000000000107078 S _OBJC_IVAR_$_MTLCounterSampleBufferDescriptorInternal._label
0000000000107088 S _OBJC_IVAR_$_MTLCounterSampleBufferDescriptorInternal._sampleCount
0000000000107080 S _OBJC_IVAR_$_MTLCounterSampleBufferDescriptorInternal._storageMode
000000000010b108 S _OBJC_METACLASS_$_MTLCounterSampleBufferDescriptor
000000000010b130 S _OBJC_METACLASS_$_MTLCounterSampleBufferDescriptorInternal
Fixes these test failures:
1) ApiSelectorTest.InstanceMethods (Introspection.MacApiSelectorTest.ApiSelectorTest.InstanceMethods)
8 errors found in 26658 instance selector validated:
Selector not found for Metal.MTLCounterSampleBufferDescriptor : counterSet
Selector not found for Metal.MTLCounterSampleBufferDescriptor : setCounterSet:
Selector not found for Metal.MTLCounterSampleBufferDescriptor : label
Selector not found for Metal.MTLCounterSampleBufferDescriptor : setLabel:
Selector not found for Metal.MTLCounterSampleBufferDescriptor : sampleCount
Selector not found for Metal.MTLCounterSampleBufferDescriptor : setSampleCount:
Selector not found for Metal.MTLCounterSampleBufferDescriptor : storageMode
Selector not found for Metal.MTLCounterSampleBufferDescriptor : setStorageMode:
* [introspection] Ignore some API we've bound incorrectly. Fixes#7116.
There are also a few API fixes, those will be submitted in a different PR.
Fixes https://github.com/xamarin/xamarin-macios/issues/7116.
Fixes this on macOS 10.9:
1) ApiCtorInitTest.DefaultCtorAllowed (Introspection.MacApiCtorInitTest.ApiCtorInitTest.DefaultCtorAllowed)
1 potential errors found in 860 default ctor validated:
CoreImage.CIMaskedVariableBlur : Handle
Expected: 0
But was: 1
at Introspection.ApiCtorInitTest.DefaultCtorAllowed () [0x0019b] in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/tests/introspection/ApiCtorInitTest.cs:295
at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
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/xamarin-macios/xamarin-macios/external/mono/mcs/class/corlib/System.Reflection/RuntimeMethodInfo.cs:395
2) ApiCoreImageFiltersTest.Keys (Introspection.MacCoreImageFiltersTest.ApiCoreImageFiltersTest.Keys)
System.ArgumentNullException : Value cannot be null.
Parameter name: array
at System.Array.IndexOf[T] (T[] array, T value) [0x0000e] in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/external/mono/external/corert/src/System.Private.CoreLib/src/System/Array.cs:666
at Introspection.ApiCoreImageFiltersTest.Keys () [0x002b7] in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/tests/introspection/ApiCoreImageFiltersTest.cs:445
at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
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/xamarin-macios/xamarin-macios/external/mono/mcs/class/corlib/System.Reflection/RuntimeMethodInfo.cs:395
3) ApiCoreImageFiltersTest.Protocols (Introspection.MacCoreImageFiltersTest.ApiCoreImageFiltersTest.Protocols)
1 potential errors found:
Managed CIMaskedVariableBlur was not part of the native filter list
Expected: 0
But was: 1
at Introspection.ApiCoreImageFiltersTest.Protocols () [0x0104e] in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/tests/introspection/ApiCoreImageFiltersTest.cs:370
at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
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/xamarin-macios/xamarin-macios/external/mono/mcs/class/corlib/System.Reflection/RuntimeMethodInfo.cs:395
And this on macOS 10.10:
1) ApiCoreImageFiltersTest.Keys (Introspection.MacCoreImageFiltersTest.ApiCoreImageFiltersTest.Keys)
1 potential errors found:
CICode128BarcodeGenerator: Property `BarcodeHeight` mapped to key `inputBarcodeHeight` is not part of `InputKeys`.
Expected: 0
But was: 1
at Introspection.ApiCoreImageFiltersTest.Keys () [0x006b1] in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/tests/introspection/ApiCoreImageFiltersTest.cs:524
at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
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/xamarin-macios/xamarin-macios/external/mono/mcs/class/corlib/System.Reflection/RuntimeMethodInfo.cs:395
2) ApiCoreImageFiltersTest.Protocols (Introspection.MacCoreImageFiltersTest.ApiCoreImageFiltersTest.Protocols)
1 potential errors found:
CICode128BarcodeGenerator: Property `BarcodeHeight` mapped to key `inputBarcodeHeight` is not part of `InputKeys`.
Expected: 0
But was: 1
at Introspection.ApiCoreImageFiltersTest.Protocols () [0x0104e] in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/tests/introspection/ApiCoreImageFiltersTest.cs:370
at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
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/xamarin-macios/xamarin-macios/external/mono/mcs/class/corlib/System.Reflection/RuntimeMethodInfo.cs:395
And this on macOS 11.11:
1) ApiCoreImageFiltersTest.Keys (Introspection.MacCoreImageFiltersTest.ApiCoreImageFiltersTest.Keys)
2 potential errors found:
CICode128BarcodeGenerator: Property `BarcodeHeight` mapped to key `inputBarcodeHeight` is not part of `InputKeys`.
CIGaussianBlur: Output Key `outputImageV1` is NOT mapped to a `OutputImageV1` property.
Expected: 0
But was: 2
at Introspection.ApiCoreImageFiltersTest.Keys () [0x006b1] in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/tests/introspection/ApiCoreImageFiltersTest.cs:524
at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
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/xamarin-macios/xamarin-macios/external/mono/mcs/class/corlib/System.Reflection/RuntimeMethodInfo.cs:395
2) ApiCoreImageFiltersTest.Protocols (Introspection.MacCoreImageFiltersTest.ApiCoreImageFiltersTest.Protocols)
2 potential errors found:
CICode128BarcodeGenerator: Property `BarcodeHeight` mapped to key `inputBarcodeHeight` is not part of `InputKeys`.
CIGaussianBlur: Output Key `outputImageV1` is NOT mapped to a `OutputImageV1` property.
Expected: 0
But was: 2
at Introspection.ApiCoreImageFiltersTest.Protocols () [0x0104e] in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/tests/introspection/ApiCoreImageFiltersTest.cs:370
at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
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/xamarin-macios/xamarin-macios/external/mono/mcs/class/corlib/System.Reflection/RuntimeMethodInfo.cs:395
* [SceneKit] Adjust deprecation message.
Fixes this introspection failure:
[FAIL] [Rule 4] Don't use availability keywords in attribute's message: "OpenGL API deprecated, please use Metal instead." - Type: SCNLayer
[FAIL] [Rule 4] Don't use availability keywords in attribute's message: "OpenGL API deprecated, please use Metal instead." - Member name: get_OpenGLContext, Type: SCNView
[FAIL] [Rule 4] Don't use availability keywords in attribute's message: "OpenGL API deprecated, please use Metal instead." - Member name: set_OpenGLContext, Type: SCNView
[FAIL] [Rule 4] Don't use availability keywords in attribute's message: "OpenGL API deprecated, please use Metal instead." - Member name: get_PixelFormat, Type: SCNView
[FAIL] [Rule 4] Don't use availability keywords in attribute's message: "OpenGL API deprecated, please use Metal instead." - Member name: set_PixelFormat, Type: SCNView
* [tests] Fix introspection and xammac tests on Catalina. (#7200)
* [tests] Adjust NaturalLanguage.EmbeddingTest to cope with non-existent embeddings. Fixesxamarin/maccore#2011.
Fixes https://github.com/xamarin/maccore/issues/2011.
* [tests] Fix typo test on macOS 10.15. Fixes#7116.
Fixes https://github.com/xamarin/xamarin-macios/issues/7116.
* [introspection] Ignore MTLCounterSampleBufferDescriptor's selectors.
They're implemented using a different/internal type:
$ nm /System/Library/Frameworks/Metal.framework/Metal | grep MTLCounterSampleBuffer
00000000000458ab t +[MTLCounterSampleBufferDescriptor allocWithZone:]
0000000000045897 t +[MTLCounterSampleBufferDescriptor alloc]
000000000004591e t -[MTLCounterSampleBufferDescriptor copyWithZone:]
000000000004598e t -[MTLCounterSampleBufferDescriptorInternal copyWithZone:]
0000000000045c0f t -[MTLCounterSampleBufferDescriptorInternal counterSet]
0000000000045936 t -[MTLCounterSampleBufferDescriptorInternal dealloc]
0000000000045b65 t -[MTLCounterSampleBufferDescriptorInternal hash]
0000000000045a31 t -[MTLCounterSampleBufferDescriptorInternal isEqual:]
0000000000045c58 t -[MTLCounterSampleBufferDescriptorInternal label]
0000000000045c7f t -[MTLCounterSampleBufferDescriptorInternal sampleCount]
0000000000045c25 t -[MTLCounterSampleBufferDescriptorInternal setCounterSet:]
0000000000045c6e t -[MTLCounterSampleBufferDescriptorInternal setLabel:]
0000000000045c90 t -[MTLCounterSampleBufferDescriptorInternal setSampleCount:]
0000000000045c47 t -[MTLCounterSampleBufferDescriptorInternal setStorageMode:]
0000000000045c36 t -[MTLCounterSampleBufferDescriptorInternal storageMode]
000000000010b0b8 S _OBJC_CLASS_$_MTLCounterSampleBufferDescriptor
000000000010b0e0 S _OBJC_CLASS_$_MTLCounterSampleBufferDescriptorInternal
0000000000107070 S _OBJC_IVAR_$_MTLCounterSampleBufferDescriptorInternal._counterSet
0000000000107078 S _OBJC_IVAR_$_MTLCounterSampleBufferDescriptorInternal._label
0000000000107088 S _OBJC_IVAR_$_MTLCounterSampleBufferDescriptorInternal._sampleCount
0000000000107080 S _OBJC_IVAR_$_MTLCounterSampleBufferDescriptorInternal._storageMode
000000000010b108 S _OBJC_METACLASS_$_MTLCounterSampleBufferDescriptor
000000000010b130 S _OBJC_METACLASS_$_MTLCounterSampleBufferDescriptorInternal
Fixes these test failures:
1) ApiSelectorTest.InstanceMethods (Introspection.MacApiSelectorTest.ApiSelectorTest.InstanceMethods)
8 errors found in 26658 instance selector validated:
Selector not found for Metal.MTLCounterSampleBufferDescriptor : counterSet
Selector not found for Metal.MTLCounterSampleBufferDescriptor : setCounterSet:
Selector not found for Metal.MTLCounterSampleBufferDescriptor : label
Selector not found for Metal.MTLCounterSampleBufferDescriptor : setLabel:
Selector not found for Metal.MTLCounterSampleBufferDescriptor : sampleCount
Selector not found for Metal.MTLCounterSampleBufferDescriptor : setSampleCount:
Selector not found for Metal.MTLCounterSampleBufferDescriptor : storageMode
Selector not found for Metal.MTLCounterSampleBufferDescriptor : setStorageMode:
* [introspection] Ignore some API we've bound incorrectly. Fixes#7116.
There are also a few API fixes, those will be submitted in a different PR.
Fixes https://github.com/xamarin/xamarin-macios/issues/7116.
Apple decided to expose most (but not all) `CIFilter` using protocols
(instead of weakly named dictionaries). Most of this maps well with
our strong bindings but there are cases where we:
* missing some properties (easy, there were added); or
* used a different types [1] and that requires new members / obsoletion
A few other API were also added in Xcode 11 (nothing in 11.1 or 11.2) and
included in this PR.
New introspection tests were also added to minimize the risk that
the API and generator changes produced incorrect code. This lead
to the finding of some missing API (in particular `Output*` properties)
that were added.
[1] Often ours are better (using `float` for a `bool` value is not
optimal) but we do not have `[BindAs]` for protocols :( to _fix_ them
Note: this replace draft PR https://github.com/xamarin/xamarin-macios/pull/7120 but it's has quite a bit of changes in filter generation (inlining protocols) and that affected bindings too.
We ship a default, pre-built, simlauncher for iOS simulator applications.
This speeds up compilation for the default (non linked) simulator builds
quite a lot (no call to `clang` is needed). However it force us to keep
track of frameworks manually - `mtouch` can track them but requires
calling clang/ld to finish things up (killing the optimization).
It's easy to forget some (new) frameworks since they can be loaded
dynamically (on demand) _most_ of the time. Sadly there are a few cases
where doing so cause (hard to diagnose) problems - so we can't depend
on them being loaded, correctly for us.
The new test case loads the `otool -L` output (make when we build
simlauncher[32|64]-sgen) and compares it with mtouch's GetFramework
logic *and* with our namespaces (which is pretty close, with a few
exceptions, to the framework names). This will make it harder to
forget [weak] frameworks when adding new bindings :)
Fixes https://github.com/xamarin/xamarin-macios/issues/6951
Xcode 11 doesn't support anything below iOS 7.0 (the linker will automatically
change the deployment target to 7.0), so we need to drop support as well
(since our native bits will be targetting iOS 7.0, and we can't change that).
https://github.com/xamarin/xamarin-macios/issues/6213
Xcode 10.3 was released over the summer with a very small subset
of the (already out) Xcode 11 betas API.
This PR fix some availability attributes and also ensure we can
run introspection tests successfully on an iOS 12.4 device.
* [WatchKit] Remove this framework for iOS while keeping backwards compatibility. Fixes#6492.
* Copy all generated sources and modify them to throw PlatformNotSupported exceptions.
* Adjust some existing source code to also throw PlatformNotSupported exceptions.
* Sprinkle Obsolete attributes generously.
* Stop generating code for the WatchKit framework for iOS.
Fixes https://github.com/xamarin/xamarin-macios/issues/6492.
* [introspection] Adjust test.
* [mtouch] Don't link with WatchKit, and show a warning if we detect code that want to use WatchKit.
* [xtro] Remove WatchKit for iOS.
* [introspection] Don't check obsoleted NSString fields for null.
There's probably a reason the field was obsoleted.
* [introspection] Add exception for the WatchKit framework.
* [xtro] Ignore obsolete enums.
There's probably a reason they're obsoleted.
In particular it solves a confusion between WKWebKit.WKErrorCode and
WatchKit.WKErrorCode: for iOS, the latter is obsoleted, and this way we always
process the former instead.
* [mtouch] Adjust wording for MT4178 to be more accurate.
* [WatchKit] Make more API obsolete/hidden.
Two classes managed to slip past the first time.
* [tests] Adjust test after WatchKit removal.
Moved some code from uikit.cs since the type moved a while ago. That
ease code sharing with macOS (XM) but it stays into the UIKit namespace
(for XI) until `XAMCORE_4_0` to ensure binary compatibility.
* healthkit b1-b3 updates
* fixes for first round of comments
* remove whitespace noise
* move hkcategorytype enums
* update mono-touch tests, remove [designatedinitializer] attr
* alex nit fixes
* fix formatting for [Deprecated]
* update mono-touch tests with even more enums
* InsertQuantity -> Insert
* remove references to xcode13, which does not exist
* add HKCharacteristicTypeIdentifierActivityMoveMode to .ignore files
* [UIKit] Partial update to Xcode 11 Beta 1, 2 and 3 - Part 2 of ?
Missing bindings for
* NSDiffableDataSourceSnapshot
* UICollectionViewDiffableDataSource
* UITableViewDiffableDataSource
due to a registrar issue git generics.
* Update src/UIKit/UIFont.cs
Co-Authored-By: Rolf Bjarne Kvinge <rolf@xamarin.com>
* Update src/uikit.cs
* More feedback
This also disables
* FloatRangeTest.Equals
* FloatRangeTest.ManagedVersusNative
due to https://github.com/xamarin/maccore/issues/1885
* [UIKIt] Start fixing `UITextWritingDirection` situation
But the complete fix is for another time https://github.com/xamarin/xamarin-macios/issues/6573
Note that the application crash *after* reporting (tests) success.
This is due to ReplayKit triggering an assertion inside UIKit (as it
try to access the status bar). This is filed with Apple
https://feedbackassistant.apple.com/feedback/6306808https://github.com/xamarin/maccore/issues/1823
Avoiding to dispose the culprit (`RPSystemBroadcastPickerView`) sadly
does not workaround the issue :(
* [UIKit] Partial update to Xcode 11 Beta 1 and 2 - Part 1 of ?
Adds new classes included in Xcode 11 Beta 1 and 2, all stuff
included in this PR is up to date with Beta 2.
* Fix whitespace.
* Add tvOS availability attributes.
* UNNotificationResponse is public, it just need a using.
* Update xtro.
* [tests/.gitignore] Update ignored files
Avoid new generated csprojs
```
tests/apitest/apitest-unified-32.csproj
tests/apitest/apitest-unified.csproj
tests/apitest/apitest-unifiedXM45-32.csproj
tests/apitest/apitest-unifiedXM45.csproj
tests/introspection/Mac/introspection-mac-unified-32.csproj
tests/introspection/Mac/introspection-mac-unified.csproj
tests/linker/mac/dont link/dont link-mac-unified-32.csproj
tests/linker/mac/dont link/dont link-mac-unified.csproj
tests/linker/mac/dont link/dont link-mac-unifiedXM45-32.csproj
tests/linker/mac/dont link/dont link-mac-unifiedXM45.csproj
```
* Implement feedback
* More feedback
* [Tests] Fix Apple's lies in headers for tvOS
Whatch is fine
* adding Sound Analysis
* set up error domain and added CMTimeRange for all platforms except watch
* removed whitespaces
* removed more whitespaces
* edited framework files and constants. Changed header names and added todo files
* Apply feedback
* fixing head and skipping functions with class issues
* fixing spacing-tab issues
* [tests] Remove 32-bit Xamarin.Mac tests (both Classic and Unified).
We're removing support for 32-bit Xamarin.Mac apps (#6300), which means we
don't need to run the tests anymore.
This part of the implementation for #6300, I'm starting with the tests because
some of our XM/Classic tests are failing and making the bots unnecessarily red
(since we'll remove XM/Classic support anyway). Also CI will be faster if we
don't run these tests.
* [mmptest] Fix build.
* [tests] Fix build for mono-native-mac.csproj.
Basic application (size) for doing an `HttpClient.GetAsync`, release/llvm, 64bits only
- NSUrlSessionHandler (master): 6.4 MB
- NSUrlSessionHandler (PR#5936): 7.7 MB
- NSUrlSessionHandler (this PR): 6.4 MB
The size increase occurs because of the reference to .net `X509*` types.
This brings a lot of additional code, including managed cryptographic
code, inside the application - even when the feature is **not** used.
The solution is to expose an API that only use native (OS) types, which
are mostly already part of the application. This has a very low impact
on existing applications.
It's still possible to hook back to .NET validation if needed (it should
not in most cases) but, in this case, the extra price will only be
_paid_ if used (and can be lower if the code is needed by something else
from the application).
In comparison using other `HttpClient` handler produce app sizes of
- HttpClientHandler (managed): 10.4 MB
- CFNetworkHandler: 6.8 MB
Based on/supersede https://github.com/xamarin/xamarin-macios/pull/5733
Fix https://github.com/xamarin/xamarin-macios/issues/4170
Basic application (size) for doing an `HttpClient.GetAsync`, release/llvm, 64bits only
- NSUrlSessionHandler (master): 6.4 MB
- NSUrlSessionHandler (PR#5936): 7.7 MB
- NSUrlSessionHandler (this PR): 6.4 MB
The size increase occurs because of the reference to .net `X509*` types.
This brings a lot of additional code, including managed cryptographic
code, inside the application - even when the feature is **not** used.
The solution is to expose an API that only use native (OS) types, which
are mostly already part of the application. This has a very low impact
on existing applications.
It's still possible to hook back to .NET validation if needed (it should
not in most cases) but, in this case, the extra price will only be
_paid_ if used (and can be lower if the code is needed by something else
from the application).
In comparison using other `HttpClient` handler produce app sizes of
- HttpClientHandler (managed): 10.4 MB
- CFNetworkHandler: 6.8 MB
Based on/supersede https://github.com/xamarin/xamarin-macios/pull/5733
Fix https://github.com/xamarin/xamarin-macios/issues/4170
* [msbuild] Add reference to `System.Drawing.Common.dll` to XI projects.
Fixes https://github.com/mono/mono/issues/13483 :
```
@akoeplinger: Since we moved types from Mono.Android.dll and
Xamarin.iOS/WatchOS/TVOS.dll to System.Drawing.Common.dll user projects
would fail to compile. We need to add some msbuild logic to add a
reference to the assembly automatically.
```
* [msbuild] Implement the same fix for XM projects as well.
* [msbuild] Update Xamarin.iOS.Tasks.TargetTests.GetReferencedAssemblies_* tests.
We're including a new assembly, which means the
Xamarin.iOS.Tasks.TargetTests.GetReferencedAssemblies_* must be updated
accordingly.
Also modify these tests so that test assert that fails lists the actual
assembly that's missing, i.e. instead of this:
1) Test Failure : Xamarin.iOS.Tasks.TargetTests.GetReferencedAssemblies_Executable
#1
Expected: 6
But was: 7
we now print:
1) Test Failure : Xamarin.iOS.Tasks.TargetTests.GetReferencedAssemblies_Executable
References
Expected: equivalent to < "mscorlib.dll", "MyLibrary.dll", "System.Core.dll", "System.dll", "System.Xml.dll", "Xamarin.iOS.dll" >
But was: < "mscorlib.dll", "MyLibrary.dll", "System.Core.dll", "System.dll", "System.Drawing.Common.dll", "System.Xml.dll", "Xamarin.iOS.dll" >
* [tests] Adjust Xamarin.MMP.Tests.AssemblyReferencesTests.ShouldNotAllowReference_ToSystemDrawing.
The test was verifying that referencing System.Drawing.dll and trying to use
System.Drawing.RectangleF would fail to compile (because System.Drawing.dll
shouldn't be resolved in this case).
The addition of System.Drawing.Common.dll breaks this assumption, because now
we ship System.Drawing.RectangleF, so the code that was supposed to fail to
compile works just fine instead.
So modify the test to verify that there's no System.Drawing.dll in the final
bundle.
* Remove workarounds for mono/mono#13483.
* [msbuild] Create a way out if automatically referencing System.Drawing.Common.dll causes problems.
* [msbuild] Adjust variable name and boolean logic according to review.
* [msbuild] Add reference to `System.Drawing.Common.dll` to XI projects.
Fixes https://github.com/mono/mono/issues/13483 :
```
@akoeplinger: Since we moved types from Mono.Android.dll and
Xamarin.iOS/WatchOS/TVOS.dll to System.Drawing.Common.dll user projects
would fail to compile. We need to add some msbuild logic to add a
reference to the assembly automatically.
```
* [msbuild] Implement the same fix for XM projects as well.
* [msbuild] Update Xamarin.iOS.Tasks.TargetTests.GetReferencedAssemblies_* tests.
We're including a new assembly, which means the
Xamarin.iOS.Tasks.TargetTests.GetReferencedAssemblies_* must be updated
accordingly.
Also modify these tests so that test assert that fails lists the actual
assembly that's missing, i.e. instead of this:
1) Test Failure : Xamarin.iOS.Tasks.TargetTests.GetReferencedAssemblies_Executable
#1
Expected: 6
But was: 7
we now print:
1) Test Failure : Xamarin.iOS.Tasks.TargetTests.GetReferencedAssemblies_Executable
References
Expected: equivalent to < "mscorlib.dll", "MyLibrary.dll", "System.Core.dll", "System.dll", "System.Xml.dll", "Xamarin.iOS.dll" >
But was: < "mscorlib.dll", "MyLibrary.dll", "System.Core.dll", "System.dll", "System.Drawing.Common.dll", "System.Xml.dll", "Xamarin.iOS.dll" >
* [tests] Adjust Xamarin.MMP.Tests.AssemblyReferencesTests.ShouldNotAllowReference_ToSystemDrawing.
The test was verifying that referencing System.Drawing.dll and trying to use
System.Drawing.RectangleF would fail to compile (because System.Drawing.dll
shouldn't be resolved in this case).
The addition of System.Drawing.Common.dll breaks this assumption, because now
we ship System.Drawing.RectangleF, so the code that was supposed to fail to
compile works just fine instead.
So modify the test to verify that there's no System.Drawing.dll in the final
bundle.
* Remove workarounds for mono/mono#13483.
* [msbuild] Create a way out if automatically referencing System.Drawing.Common.dll causes problems.
* [msbuild] Adjust variable name and boolean logic according to review.
* Bump for Xcode 10.2 final
* Bump macios-binaries so mlaunch works on 10.14.4
* [appkit] Update for Xcode 10.2 final
* [mps] Update for Xcode 10.2 final
* Bump maccore for swift5 runtime support on older macOS versions
* [AppKit] Ignore deprecated API
* [tests] Don't test QTMovie, it's broken (crashes).
QTKit is deprecated (and has been for 5 years), so just don't test QTMovie.
Fixes these crashes:
apitest:
***** DelegateAndDataSourceAllowsNull
Stacktrace:
at <unknown> <0xffffffff>
at (wrapper managed-to-native) ObjCRuntime.Messaging.IntPtr_objc_msgSend (intptr,intptr) [0x0000a] in <e8e733c9728c43cba731719f096ad306>:0
at QTKit.QTMovie..ctor () [0x00018] in /Library/Frameworks/Xamarin.Mac.framework/Versions/5.4.0.70/src/Xamarin.Mac/QTKit/QTMovie.g.cs:330
at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) [0x0004f] in <3ad39e28642b49d2a535a565e6bf6837>:0
at <unknown> <0xffffffff>
at (wrapper managed-to-native) System.Reflection.MonoCMethod.InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&) [0x00016] in <3ad39e28642b49d2a535a565e6bf6837>:0
at System.Reflection.MonoCMethod.InternalInvoke (object,object[],bool) [0x00005] in /Library/Frameworks/Xamarin.Mac.framework/Versions/5.4.0.70/src/Xamarin.Mac/mcs/class/corlib/System.Reflection/MonoMethod.cs:667
at System.Reflection.MonoCMethod.DoInvoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) [0x0007a] in /Library/Frameworks/Xamarin.Mac.framework/Versions/5.4.0.70/src/Xamarin.Mac/mcs/class/corlib/System.Reflection/MonoMethod.cs:657
at System.Reflection.MonoCMethod.Invoke (System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) [0x00000] in /Library/Frameworks/Xamarin.Mac.framework/Versions/5.4.0.70/src/Xamarin.Mac/mcs/class/corlib/System.Reflection/MonoMethod.cs:689
at System.Reflection.ConstructorInfo.Invoke (object[]) [0x00000] in /Library/Frameworks/Xamarin.Mac.framework/Versions/5.4.0.70/src/Xamarin.Mac/mcs/class/corlib/System.Reflection/ConstructorInfo.cs:62
at Xamarin.Mac.Tests.DelegateAndDataSourceTest.DelegateAndDataSourceAllowsNull () [0x00110] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/apitest/src/DelegateAndDataSourceTest.cs:65
at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) [0x0004f] in <3ad39e28642b49d2a535a565e6bf6837>:0
at <unknown> <0xffffffff>
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&) [0x00016] in <3ad39e28642b49d2a535a565e6bf6837>:0
at System.Reflection.MonoMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) [0x0003b] in /Library/Frameworks/Xamarin.Mac.framework/Versions/5.4.0.70/src/Xamarin.Mac/mcs/class/corlib/System.Reflection/MonoMethod.cs:305
at System.Reflection.MethodBase.Invoke (object,object[]) [0x00000] in /Library/Frameworks/Xamarin.Mac.framework/Versions/5.4.0.70/src/Xamarin.Mac/mcs/class/referencesource/mscorlib/system/reflection/methodbase.cs:229
at NUnit.Framework.Internal.Reflect/<>c__DisplayClass9_0.<InvokeMethod>b__0 () [0x00000] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/external/guiunit/src/framework/Internal/Reflect.cs:226
at GuiUnit.InvokerHelper.Invoke () [0x0000e] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/external/guiunit/src/framework/GuiUnit/InvokerHelper.cs:18
at Foundation.NSActionDispatcher.Apply () [0x00000] in /Library/Frameworks/Xamarin.Mac.framework/Versions/5.4.0.70/src/Xamarin.Mac/Foundation/NSAction.cs:62
at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) [0x0004f] in <3ad39e28642b49d2a535a565e6bf6837>:0
at <unknown> <0xffffffff>
at (wrapper managed-to-native) ObjCRuntime.Messaging.void_objc_msgSend (intptr,intptr) [0x0000a] in <e8e733c9728c43cba731719f096ad306>:0
at AppKit.NSApplication.Run () [0x00012] in /Library/Frameworks/Xamarin.Mac.framework/Versions/5.4.0.70/src/Xamarin.Mac/AppKit/NSApplication.g.cs:2253
at Xamarin.Mac.Tests.MainClass/NSRunLoopIntegration.RunMainLoop () [0x00001] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/common/mac/MacTestMain.cs:79
at GuiUnit.TestRunner.ExecuteWithListener (string[],NUnitLite.Runner.TcpWriter) [0x0036f] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/external/guiunit/src/framework/GuiUnit/TestRunner.cs:234
at GuiUnit.TestRunner.Execute (string[]) [0x00093] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/external/guiunit/src/framework/GuiUnit/TestRunner.cs:137
at GuiUnit.TestRunner.Main (string[]) [0x00001] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/external/guiunit/src/framework/GuiUnit/TestRunner.cs:71
at Xamarin.Mac.Tests.MainClass.RunTests (string[]) [0x000a9] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/common/mac/MacTestMain.cs:56
at Xamarin.Mac.Tests.MainClass.Main (string[]) [0x00007] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/common/mac/MacTestMain.cs:35
at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) [0x00051] in <4c10f2ab239246ba9514b976defa64c7>:0
Native stacktrace:
0 apitest 0x000000010c40b388 mono_handle_native_crash + 264
1 apitest 0x000000010c388dd6 altstack_handle_and_restore + 70
2 CoreFoundation 0x00007fff3b6f260b CFStringGetCString + 43
3 QTKit 0x00007fff457b6542 __51-[QTKitServerController startUsingServerForObject:]_block_invoke + 1238
4 libdispatch.dylib 0x00007fff67b4e63d _dispatch_client_callout + 8
5 libdispatch.dylib 0x00007fff67b5a129 _dispatch_lane_barrier_sync_invoke_and_complete + 60
6 QTKit 0x00007fff457b5f7a -[QTKitServerController startUsingServerForObject:] + 179
7 QTKit 0x00007fff457ac602 -[QTMovie_QuickTime initWithError:forParent:] + 98
8 QTKit 0x00007fff456f55b9 -[QTMovie initWithError:] + 59
9 apitest 0x000000010c31fbe9 xamarin_dyn_objc_msgSend + 217
10 ??? 0x0000000112791d05 0x0 + 4604894469
11 apitest 0x000000010c41f659 mono_jit_runtime_invoke + 1433
12 apitest 0x000000010c51a4df mono_runtime_invoke_checked + 127
13 apitest 0x000000010c522e70 mono_runtime_try_invoke_array + 1856
14 apitest 0x000000010c4be091 ves_icall_InternalInvoke + 657
15 ??? 0x0000000111abe261 0x0 + 4591444577
16 ??? 0x0000000114249463 0x0 + 4632908899
=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
1 failing types:
QTKit.QTMovie: Object reference not set to an instance of an object
introspection:
***** ApiCtorInitTest.DefaultCtorAllowed
Stacktrace:
at <unknown> <0xffffffff>
at (wrapper managed-to-native) ObjCRuntime.Messaging.IntPtr_objc_msgSend (intptr,intptr) [0x0000a] in <e8e733c9728c43cba731719f096ad306>:0
at QTKit.QTMovie..ctor () [0x00018] in /Library/Frameworks/Xamarin.Mac.framework/Versions/5.4.0.70/src/Xamarin.Mac/QTKit/QTMovie.g.cs:330
at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) [0x0004f] in <3ad39e28642b49d2a535a565e6bf6837>:0
at <unknown> <0xffffffff>
at (wrapper managed-to-native) System.Reflection.MonoCMethod.InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&) [0x00016] in <3ad39e28642b49d2a535a565e6bf6837>:0
at System.Reflection.MonoCMethod.InternalInvoke (object,object[],bool) [0x00005] in /Library/Frameworks/Xamarin.Mac.framework/Versions/5.4.0.70/src/Xamarin.Mac/mcs/class/corlib/System.Reflection/MonoMethod.cs:667
at System.Reflection.MonoCMethod.DoInvoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) [0x0007a] in /Library/Frameworks/Xamarin.Mac.framework/Versions/5.4.0.70/src/Xamarin.Mac/mcs/class/corlib/System.Reflection/MonoMethod.cs:657
at System.Reflection.MonoCMethod.Invoke (System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) [0x00000] in /Library/Frameworks/Xamarin.Mac.framework/Versions/5.4.0.70/src/Xamarin.Mac/mcs/class/corlib/System.Reflection/MonoMethod.cs:689
at System.Reflection.ConstructorInfo.Invoke (object[]) [0x00000] in /Library/Frameworks/Xamarin.Mac.framework/Versions/5.4.0.70/src/Xamarin.Mac/mcs/class/corlib/System.Reflection/ConstructorInfo.cs:62
at Introspection.ApiCtorInitTest.DefaultCtorAllowed () [0x000f0] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/introspection/ApiCtorInitTest.cs:267
at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) [0x0004f] in <3ad39e28642b49d2a535a565e6bf6837>:0
at <unknown> <0xffffffff>
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&) [0x00016] in <3ad39e28642b49d2a535a565e6bf6837>:0
at System.Reflection.MonoMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) [0x0003b] in /Library/Frameworks/Xamarin.Mac.framework/Versions/5.4.0.70/src/Xamarin.Mac/mcs/class/corlib/System.Reflection/MonoMethod.cs:305
at System.Reflection.MethodBase.Invoke (object,object[]) [0x00000] in /Library/Frameworks/Xamarin.Mac.framework/Versions/5.4.0.70/src/Xamarin.Mac/mcs/class/referencesource/mscorlib/system/reflection/methodbase.cs:229
at NUnit.Framework.Internal.Reflect/<>c__DisplayClass9_0.<InvokeMethod>b__0 () [0x00000] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/external/guiunit/src/framework/Internal/Reflect.cs:226
at GuiUnit.InvokerHelper.Invoke () [0x0000e] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/external/guiunit/src/framework/GuiUnit/InvokerHelper.cs:18
at Foundation.NSActionDispatcher.Apply () [0x00000] in /Library/Frameworks/Xamarin.Mac.framework/Versions/5.4.0.70/src/Xamarin.Mac/Foundation/NSAction.cs:62
at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) [0x0004f] in <3ad39e28642b49d2a535a565e6bf6837>:0
at <unknown> <0xffffffff>
at (wrapper managed-to-native) ObjCRuntime.Messaging.void_objc_msgSend (intptr,intptr) [0x0000a] in <e8e733c9728c43cba731719f096ad306>:0
at AppKit.NSApplication.Run () [0x00012] in /Library/Frameworks/Xamarin.Mac.framework/Versions/5.4.0.70/src/Xamarin.Mac/AppKit/NSApplication.g.cs:2253
at Xamarin.Mac.Tests.MainClass/NSRunLoopIntegration.RunMainLoop () [0x00001] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/common/mac/MacTestMain.cs:79
at GuiUnit.TestRunner.ExecuteWithListener (string[],NUnitLite.Runner.TcpWriter) [0x0036f] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/external/guiunit/src/framework/GuiUnit/TestRunner.cs:234
at GuiUnit.TestRunner.Execute (string[]) [0x00093] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/external/guiunit/src/framework/GuiUnit/TestRunner.cs:137
at GuiUnit.TestRunner.Main (string[]) [0x00001] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/external/guiunit/src/framework/GuiUnit/TestRunner.cs:71
at Xamarin.Mac.Tests.MainClass.RunTests (string[]) [0x000a9] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/common/mac/MacTestMain.cs:56
at Xamarin.Mac.Tests.MainClass.Main (string[]) [0x00007] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/common/mac/MacTestMain.cs:35
at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) [0x00051] in <83b8b910cba94191a35185713f274e89>:0
Native stacktrace:
0 introspection 0x0000000104e33388 mono_handle_native_crash + 264
1 introspection 0x0000000104db0dd6 altstack_handle_and_restore + 70
2 CoreFoundation 0x00007fff3b6f260b CFStringGetCString + 43
3 QTKit 0x00007fff457b6542 __51-[QTKitServerController startUsingServerForObject:]_block_invoke + 1238
4 libdispatch.dylib 0x00007fff67b4e63d _dispatch_client_callout + 8
5 libdispatch.dylib 0x00007fff67b5a129 _dispatch_lane_barrier_sync_invoke_and_complete + 60
6 QTKit 0x00007fff457b5f7a -[QTKitServerController startUsingServerForObject:] + 179
7 QTKit 0x00007fff457ac602 -[QTMovie_QuickTime initWithError:forParent:] + 98
8 QTKit 0x00007fff456f55b9 -[QTMovie initWithError:] + 59
9 introspection 0x0000000104d47be9 xamarin_dyn_objc_msgSend + 217
10 ??? 0x00000001073f6de5 0x0 + 4416564709
11 introspection 0x0000000104e47659 mono_jit_runtime_invoke + 1433
12 introspection 0x0000000104f424df mono_runtime_invoke_checked + 127
13 introspection 0x0000000104f4ae70 mono_runtime_try_invoke_array + 1856
14 introspection 0x0000000104ee6091 ves_icall_InternalInvoke + 657
15 ??? 0x00000001072bd011 0x0 + 4415279121
16 ??? 0x000000010c993d63 0x0 + 4506336611
=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
[FAIL] Default constructor not allowed for QTKit.QTMovie : Object reference not set to an instance of an object
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
* [MetalPerformanceShaders] Update bindings from Xcode 9.2 to 10.2 - Part 2 of 2
Fixesxamarin/xamarin-macios#3553
This is the second part of MPS bindings.
Bindings for:
- MPSNeuralNetwork.framework
* Apply some feedback and fix a test case in 10.13
Fixesxamarin/maccore#1389
* More feedback
* Fix ctor test
Part of 0344842a6b in `xcode10.2` branch
This happens on the latest iOS 12.1.x - but not in the 12.1 simulators
shipped with the current Xcode 10.1 stable release.
However people can hit this error while running tests on (updated)
devices so it's best to include the fix on master.
Most additions are block-based alternatives to callback API. However,
the way we bind them, it produce identical API so they are ignored.
Fix existing API (where an array was used) and add some tests for it
* [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.
* Fix mac classic build
* Fix mac 32 bits (can't load 64bits only libraries)
* Check paths too leading to fixes to old (now incorrect) paths and typo
* apitest (Mac) has a similar test - but assumed that a file that did not exists was fine (missing typos and changes);
* tvOS simulator does not (unlike iOS) support loading the MetalPerformanceShaders.framework
reference: https://github.com/xamarin/xamarin-macios/issues/5047
* [introspection] MPSCnnBinaryKernel's kernelHeight/kernelWidth are missing on iOS too.
* [introspection] CoreNFC is not even available on all devices.
* [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.
* [jenkins] Only XM apps with variations are Classic/32-bit apps, so adjust ignore logic accordingly. Fixes maccore issue 884.
Fixes https://github.com/xamarin/maccore/issues/884.
* [mmp] Fix passing -stdlib=libc++ to clang.
* [tests] Fix 32-bit XM issues.
* [xharness] Add support for building 32-bit XM apps by using Xcode 9.4.
* [xharness] Since xharness can now build 32-bit mac apps, enable them by default.
* Remove debug code.
* Remove unused variable.
a service.
As per documentation the NWAdvertiseDescriptor CreateBonjourService
should always get a type. Added the change which fixes the introspection
failures.
* [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.
Use libc++ instead of stdlibc++ for Xamarin.Mac too.
See 0d31720770 for more info.
Also revert a series of commits that bumps min macOS version from 10.7 to 10.9
Apple re-added some constants that were dropped without any clue (and we
filed a rdar for it since it's a breaking change to remove them).
It's now clear that it's deprecated and why
`QC_GL_DEPRECATED(10_5, 10_14);`
so we can update the attribute (and fix the version).
note: also fix extra `;` in `CBUUIDValidRangeString` tests while removing
the special case added earlier (from beta 1)
* Bump for Xcode 10 beta 3
Include a few changes to have green builds, e.g. it seems
`[GKAchievement init]` and `[GKAchievement initWithIdentifier:nil]`
are different now
```
[FAIL] Default constructor not allowed for GameKit.GKAchievement : Objective-C exception thrown. Name: NSInvalidArgumentException Reason: -[GKAchievement identifier]: unrecognized selector sent to instance 0x6000004a48d0
[FAIL] iOSApiCtorInitTest.ApiCtorInitTest.DefaultCtorAllowed : 1 potential errors found in 1426 default ctor validated:
```
* [xtro] Fix EventKit
* [tests] Make intro tests green in macOS Mojave Beta 3
* [tests] Make xtro happy
Mostly known iOS cases that are now part included in macOS.
Two failures remains until the AppKit update is merged, i.e.
both were _upgraded_ to conform to `NSSecureCoding`
```
[FAIL] NSBezierPath conforms to NSSecureCoding but does not implement INSSecureCoding
[FAIL] NSGradient conforms to NSSecureCoding but does not implement INSSecureCoding
```
Nothing really new beside the OpenGL related deprecation and the fact
that 3 fields were removed, without deprecation, and this requires some
adjustments in the intro tests (while running on 10.14) to ignore them.
1) ApiFieldTest.FieldExists (Introspection.MacApiFieldTest.ApiFieldTest.FieldExists)
3 errors found in 5680 fields validated: QCCompositionInputRSSArticleDurationKey, QCCompositionInputRSSFeedURLKey, QCCompositionProtocolRSSVisualizer
Expected: 0
But was: 3
at Introspection.ApiFieldTest.FieldExists () [0x00127] in /Users/poupou/git/xcode10/xamarin-macios/tests/introspection/ApiFieldTest.cs:245
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in /Users/poupou/git/xcode10/xamarin-macios/external/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:305
2) ApiFieldTest.NonNullNSStringFields (Introspection.MacApiFieldTest.ApiFieldTest.NonNullNSStringFields)
3 errors found in 4904 fields validated: QuartzComposer.QCComposition.InputRSSArticleDurationKey, QuartzComposer.QCComposition.InputRSSFeedURLKey, QuartzComposer.QCComposition.ProtocolRSSVisualizer
Expected: 0
But was: 3
at Introspection.ApiFieldTest.NonNullNSStringFields () [0x0008d] in /Users/poupou/git/xcode10/xamarin-macios/tests/introspection/ApiFieldTest.cs:214
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in /Users/poupou/git/xcode10/xamarin-macios/external/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:305
That issue is filed w/Apple https://bugreport.apple.com/web/?problemID=41125938
* [IntentsUI] Update bindings to Xcode 10 Beta 1
This commit also adds a strong dictionary version to
INPlayMediaIntentResponse.WeakNowPlayingInfo.
* Implement feedback
* [CoreMotion] Update bindings to Xcode 10 Beta 1
* Add a note about why sharpie did not pick up these classes
* Remove CMMovementDisorderManager from simulator checks since it is not available there
Headers mention macOS 10.13 but, upon verification, the latest 10.13.5
still reports the key as missing from the framework.
Also remove the 10,13,4 maximum since we now have Mac(10,14) attributes
in the platform assemblies (which solve the previous issue)
* [tests] Add introspection tests to ensure there are native linking instructions for all frameworks. Fixes#3976
or a good, documented (in test code) reason for not needing it.
https://github.com/xamarin/xamarin-macios/issues/3976
* Fix failures
- static registrar failed on 32bits because one type in PhotoUI missed
its `onlyOn64: true`
- link with the top, not the sub-frameworks
* [tvos] Fix mistakes in tvOS where some extranous types triggered unrequired/unavailable (or missing) frameworks
* [watchos] Fix watchOS frameworks mapping
* Bump to use Xcode 10 beta 1
* Update Versions.plist
* Add a dependency on Xcode 9.4.
* [msbuild] Fix build with Xcode 10 beta 1. (#4182)
Many years ago (in Xcode 7 according to code comment)
Developer/Platforms/iPhoneOS.platform/Developer/usr disappeared, and we coped
by looking at Developer/usr instead (and also the subsequent code to locate
the bin directory was based on the location of the usr directory).
Developer/Platforms/iPhoneOS.platform/Developer/usr reappeared in Xcode 10
beta 1, but it seems useless (for one it doesn't contain a bin directory), so
in order to try to keep things sane don't look for this directory in Xcode 10
and instead go directly for Developer/usr (which is what we've been using as
the usr directory for years anyway).
Fixes this problem when building apps with Xcode 10 beta 1:
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets(626,3): error : Could not locate SDK bin directory [/Users/rolf/Projects/TestApp/test-app.csproj]
* [runtime] Build 32-bit mac executables using Xcode 9.4.
* [mtouch] Work around broken tvOS headers in Xcode 10 beta 1.
* [mtouch] Work around build problem with Apple's simd headers in Objective-C++ mode.
* Use version-agnostic paths to sdk directories.
* [tests][xtro] Add todo files (from unclassified) and adjust ignore files to avoid errors
* [macos][security] Re-enable SSL[Get|Set]AlpnProtocols. Fixes#4001 (#4022)
* [macos][security] Re-enable SSL[Get}Set]AlpnProtocols. Fixes#4001
This was fixed in macOS 10.13.4
https://github.com/xamarin/xamarin-macios/issues/4001
* [tests][monotouch-tests] Disable a few test cases (one crasher, other failures). Causes to be verified later
* [xharness] Fix permission dialog suppression in Xcode 10.
* [xharness] Ignore 32-bit macOS tests by default.
* [tests] Execute mmp regression tests with Xcode 9.4 since many of them are 32-bit and needs porting to 64-bit.
* [mmptest] Ignore 32-bit XM tests if we don't have a 32-bit-capable Xcode.
* [registrar] Add workaround for broken headers in Xcode 10 beta 1 (radar 40824697).
* [mtouch] Restrict another workaround for an Xcode 10 beta 1 bug to a specific Xcode version to remove it asap.
* [tests] Fix some protocol changes (public or not) find by introspection tests
* [tests][intro] Fix DefaultCtorAllowed failures
* [Intents] Obsolete several Intents classes in watchOS.
Several existing Intents classes have been marked as unavailable in watchOS in
the headers in Xcode 10 beta 1, and corresponding tests are now failing.
So obsolete the managed wrapper types, and fix tests accordingly.
* Fix xtro wrt previous Ietents/intro changes
* [tests] Minor adjustments to mtouch tests to work with Xcode 10.
* [msbuild] Update tests to cope with additional files produced by the Core ML compiler.
* [msbuild] Xcode 10 doesn't support building watchOS 1 apps, so show a clear error message explaining it.
Also update tests accordingly.
* [coreimage] Stub new filters and exclude ?removed? ones from tests
* Update GameplayKit and SpriteKit NSSecureCoding _upgrade_ and fix other non-public cases (in tests)
* [tests] Ignore some GameKit selectors that don't respond anymore (but seems to be available, at least in header files)
* [tests] Fix intro 32bits testing for filters resutls
* [msbuild] Slightly change error message to be better English.
* [tests] Add introspection tests to ensure there are native linking instructions for all frameworks. Fixes#3976
or a good, documented (in test code) reason for not needing it.
https://github.com/xamarin/xamarin-macios/issues/3976
* Fix failures
- static registrar failed on 32bits because one type in PhotoUI missed
its `onlyOn64: true`
- link with the top, not the sub-frameworks
* [tvos] Fix mistakes in tvOS where some extranous types triggered unrequired/unavailable (or missing) frameworks
* [watchos] Fix watchOS frameworks mapping
The PR is not final and cannot be merged until the final Xcode 9.4
release from Apple is available.
Since there's no macOS specific changes (at least up to beta 2) we can
directly merge into the _normal_ milestone branch and avoid having
separate branches to maintain for XI and XM (until 15.8).
* [ClassKit] Add Xcode 9.4 Beta 1 Bindings
* ClassKit moved to v11.4 or we'd link against a private frmework in 11.3
* Turn CLSPredicateKeyPath into a static class
CLSPredicateKeyPath does not make much sense as an enum, we'll use
a static class instead so we do not have to call GetConstant() and
use the NSString directly.
Sample code using CLSPredicateKeyPath:
```csharp
var store = CLSDataStore.Shared;
var predicate = NSPredicate.FromFormat ("%K = %@", CLSPredicateKeyPath.Parent, store.MainAppContext);
var ctxs = await store.FindContextsMatchingAsync (predicate);
foreach (var ctx in ctxs) {
Console.WriteLine (ctx.Title);
}
```
* [tests] Exclude WeakTopic incorrect check, bound as smart enum