Граф коммитов

809 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge a2e9b599fe
[CoreFoundation] Fix ownership of objects returned from CFHTTPMessageCreate* P/Invokes. (#6091)
* [CoreFoundation] Fix ownership of objects returned from CFHTTPMessageCreate* P/Invokes.

* [Tests] Fix 'nint' 32 bits build

* [tests] Fix XM/Classic build.
2019-05-22 22:52:46 -07:00
Rolf Bjarne Kvinge 3d0398f915 [monotouch-test] Don't go completely overboard when trying to fill the GC's nursery. 2019-05-22 08:13:22 +02:00
Rolf Bjarne Kvinge 4fe3ce9ae9 [monotouch-test] LLVM's too smart for our tests, so ignore Symbols.FunctionNames when LLVM is enabled. 2019-05-22 08:12:03 +02:00
Rolf Bjarne Kvinge af1a8db426 [monotouch-test] Adjust for arm64_32 abi. 2019-05-22 08:11:56 +02:00
Rolf Bjarne Kvinge eab32da266 [monotouch-test] Don't go completely overboard when trying to fill the GC's nursery. 2019-05-20 18:00:18 +02:00
monojenkins daf5006281 [d16-2] [msbuild] Add reference to `System.Drawing.Common.dll` to XI projects. (#6035)
* [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.
2019-05-10 16:16:01 +02:00
Rolf Bjarne Kvinge adbc87ff1d [monotouch-test] LLVM's too smart for our tests, so ignore Symbols.FunctionNames when LLVM is enabled. 2019-05-10 11:28:22 +02:00
Rolf Bjarne Kvinge c4c17fa293 [monotouch-test] Adjust for arm64_32 abi. 2019-05-10 11:28:22 +02:00
Ankit Jain 3a7bdc0a13 [msbuild] Add reference to `System.Drawing.Common.dll` to XI projects. (#6011)
* [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.
2019-05-10 01:20:52 +02:00
Rolf Bjarne Kvinge d6aa896f03 [tests] Add tests for failing to marshal from managed array to NSArray, 2019-04-30 14:29:24 +00:00
Rolf Bjarne Kvinge e3bafafff0 [tests] Add tests for out/ref parameters. 2019-04-30 14:29:24 +00:00
Rolf Bjarne Kvinge 67ed868f5f [tests] Add tests for failing to marshal from managed array to NSArray, 2019-04-26 11:20:15 +02:00
Rolf Bjarne Kvinge b51aaf4b8b [tests] Add tests for out/ref parameters. 2019-04-26 11:20:15 +02:00
Rolf Bjarne Kvinge c8ed014af7
[runtime] Improve exception creation. (#5944)
* [runtime] Add an inner exception parameter to Runtime.CreateProductException.

This allows us to simplify code by using inner (and outer) exceptions as
a means to provide information instead of passing extra information
around in order to create decent exceptions.

One example is how we pass the selector and method name to the method
that converts from a native id to a managed NSObject instance: passing
this information is not necessary anymore if we can use two exceptions,
one for the failure to convert from an id to a NSObject instance,
wrapped in a second that tells which method/selector call ran into this
conversion problem.

* [runtime] Throw better exceptions when the dynamic registrar can't marshal something.

* [runtime] Throw a better exception when something goes wrong when trying to marshal a return value.

* [runtime] Use inner exceptions to convey failure information instead of trying to create a single exception with all we know.

* Fix merge problem.
2019-04-26 11:16:23 +02:00
Alexander Köplinger 7f717f01ae
Merge pull request #5563 from xamarin/mono-2019-02
Bump to mono:2019-02
2019-04-25 19:24:35 +02:00
Sebastien Pouliot d988124684
Remove private API (#5915)
* [pdfkit] Remove private API

* [vision] Remove VNRequest preferredMetalContext API and add API compatibility stub

Looks like it was removed between iOS 11 beta 4 and 5
http://codeworkshop.net/objc-diff/sdkdiffs/ios/11.0b5/Vision.html

* [gameplaykit] Do not expose selector for 'RemoveData'

* [cloudkit] Remove selector from deprecated 'UsesBackgroundSession' API

* [metalperformanceshaders] Remove private API

* [gamekit] Remove private API

* [avfoundation] Replace AVAssetResourceLoadingRequest 'finished' by 'isFinished'

Apple now reject the original (iOS 6) `finished` selector - even if its
replacement `isFinished` is not available until iOS 7.

* [corebluetooth] 'Primary' and 'UUID' are not mutable

This was not documented (or mis-documented in earlier macOS docs) and
the API are now replaced with empty stubs to maintain binary
compatibility with existing code.

* [coreanimation] Remove CAEmitterBehavior 'initWithType:' and 'behaviorWithType:' API

Corresponding headers were removed in Xcode 9 without any explanation
rdar #33590997 was filled - no news
'initWithType:' and 'behaviorWithType:' API now cause rejection
Tracked in https://trello.com/c/J8BDDUV9/86-33590997-coreanimation-quartzcore-api-removals

* [uikit] Remove (macOS only) API from NSLayoutManager (on other platforms)
2019-04-25 10:16:22 -04:00
Alexander Köplinger 99ea097abf Merge remote-tracking branch 'upstream/master' into mono-2019-02 2019-04-24 23:28:00 +02:00
Rolf Bjarne Kvinge bf3b45973e
[MetalPerformanceShaders] MPSImageNormalizedHistogram isn't available in iOS 11 as the headers claim. (#5942)
A simple test revels the truth:

    dyld: Symbol not found: _OBJC_CLASS_$_MPSImageNormalizedHistogram
      Referenced from: /var/containers/Bundle/Application/4DA44899-5F1D-4BF9-9C2E-B26982AE89F1/uistestappobjc.app/uistestappobjc
      Expected in: /System/Library/Frameworks/MetalPerformanceShaders.framework/MetalPerformanceShaders
     in /var/containers/Bundle/Application/4DA44899-5F1D-4BF9-9C2E-B26982AE89F1/uistestappobjc.app/uistestappobjc

This fixes this test failure on iOS 11:

    [FAIL] MPSImageNormalizedHistogramTests.Constructors : ObjCRuntime.RuntimeException : Wrapper type 'MetalPerformanceShaders.MPSImageNormalizedHistogram' is missing its native ObjectiveC class 'MPSImageNormalizedHistogram'.
2019-04-24 06:38:10 +01:00
Rolf Bjarne Kvinge 66ba411303 [UIKit] Don't crash if UIGestureRecognizer.Dispose is called multiple times. Fixes #5899. (#5921)
Fixes https://github.com/xamarin/xamarin-macios/issues/5899.
2019-04-22 15:52:06 -05:00
Alexander Köplinger 3029a43b1a Merge remote-tracking branch 'upstream/master' into mono-2019-02
# Conflicts:
#	external/mono
2019-04-10 20:53:19 +02:00
Rolf Bjarne Kvinge 06426bd7a0
[Foundation] Improve/fix NSRegularExpression and NSDataDetector bindings. Fixes #5881. (#5882)
* NSDataDetector

    * Add constructor found in header. No idea where the commented-out
      constructor came from, it's not in the header, so I removed it.
    * Add overloads that take NSTextCheckingType in addition to
      NSTextCheckingTypes. Apple's API take NSTextCheckingTypes, but all the
      documentation and samples say that you're supposed to pass one or more
      or'ed NSTextCheckingType values, so support that as well without casting
      between enums.

* NSRegularExpression

    * GetMatches had the wrong return type, so add a GetMatches2 that does it
      right. Also add a test to make sure it's really right.
    * Bind 'regularExpressionWithPattern:options:error:' with a static method.
      There's a corresponding constructor, but constructors returning out
      NSError parameters isn't the nicest API (when the NSError is important),
      so add the static method as well.
    * Add a missing [NullAllowed] on FindFirstMatch's return value.

* NSRegularExpressionOptions

    * Add missing enum value.

Fixes https://github.com/xamarin/xamarin-macios/issues/5881.
2019-04-10 15:12:24 +02:00
Alexander Köplinger 067cbf0a28 Merge remote-tracking branch 'upstream/master' into mono-2019-02
# Conflicts:
#	tools/mmp/driver.cs
2019-04-05 11:19:11 +02:00
Alexander Köplinger 121bb03627 Merge remote-tracking branch 'upstream/master' into mono-2019-02
# Conflicts:
#	external/mono
2019-04-03 23:54:57 +02:00
Vincent Dondain 86d1b42ad2 Merge branch 'xcode10.2' into master-merge-xcode10.2 2019-04-03 13:57:31 -04:00
Rolf Bjarne Kvinge dda50a78c4
[Foundation] Make adding/removing observers in NSNotificationCenter thread safe. (#5833)
NSNotificationCenter is thread-safe, so that observers can be added and
removed in multiple threads simultaneously.

Unfortunately our own helper code wasn't, so make sure to fix that by locking
around all accesses to the observer list.

And add a test case as well.
2019-04-03 11:45:11 +02:00
Vincent Dondain 9c8d8e0a50 Bump for Xcode 10.2 final (#5808)
* 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
2019-03-27 10:51:17 +01:00
Alexander Köplinger 66ebb76e71 Merge remote-tracking branch 'upstream/master' into mono-2019-02 2019-03-18 19:24:52 +01:00
Rolf Bjarne Kvinge 18b13ac876
[runtime] Use mono_array_setref instead of mono_array_set. (#5782)
* [Foundation] Add an NSArray.FromNSObjects overload that can take an array of INativeObjects.

* [runtime] Use mono_array_setref instead of mono_array_set.

Otherwise the GC won't know about the assignment, and the assigned value can
be freed if it's no longer referenced anywhere else.
2019-03-18 15:00:32 +01:00
Alexander Köplinger 2b30e0755e REVERTME: Add workaround for missing System.Drawing.Common reference 2019-03-15 16:43:09 +01:00
Rolf Bjarne Kvinge 8887b615d1
[CoreGraphics] Make CGPattern inherit from NativeObject, and add a CGPattern test. (#5734)
* [CoreGraphics] Make CGPattern inherit from NativeObject, and add a CGPattern test.

* Make test work on all platforms.
2019-03-07 16:49:12 +01:00
Sebastien Pouliot e53b94d27c
[corefoundation] Add missing CFStringTransform API. Fixes #5705 (#5712)
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
2019-03-06 08:04:17 -05:00
Manuel de la Pena a5232f8c5e
[Tests] Make test inconclusive if httpbin does not return the headers. (#5684)
In some cases, httpbin might return errors or other results. In that
case, we cannot assert that the auth headers are not present. We set the
test to inconclusive to ensure that we do not fail due to the external
page.

Fixes https://github.com/xamarin/maccore/issues/1453
2019-02-28 15:35:36 +01:00
Alex Soto 46fbf5e76e
[MetalPerformanceShaders] Update bindings from Xcode 9.2 to 10.2 - Part 2 of 2 (#5630)
* [MetalPerformanceShaders] Update bindings from Xcode 9.2 to 10.2 - Part 2 of 2

Fixes xamarin/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

Fixes xamarin/maccore#1389

* More feedback

* Fix ctor test
2019-02-27 06:36:08 -05:00
Rolf Bjarne Kvinge 3484ebbf08
[monotouch-test] ARImageTrackingConfiguration is iOS 12+, so protect accordingly. (#5594) 2019-02-13 13:49:17 +01:00
Manuel de la Pena e470035431
[Tests] Add some extra info to better debug next time test fails. (#5598)
We have issue https://github.com/xamarin/maccore/issues/701 that states
that there is no exception. Get the received response to check against
null and help debug the issue next time it happens in the CI bots.
2019-02-13 12:22:24 +01:00
Manuel de la Pena 46728f0c6e
[Tests] Do not fail with timeouts. Fixes #1332 (#5596)
The bots sometimes have issues with the network. We do not want red
builds due to a problem in the connection. Lets set the test to
inclonclusive since we cannot assert the headers that have been sent.

Fixes https://github.com/xamarin/maccore/issues/1332
2019-02-12 19:27:23 +01:00
Rolf Bjarne Kvinge 79ec1cc660
[tests] Ignore monotouch-tests that fail with bitcode. (#5566)
This is already a reported bug in mono (and has been for a while).
2019-02-07 16:01:50 +01:00
Chris Hamons 03bf340e56 [AVFAudio] Xcode 10.2 Beta 2 (#5554)
* [AVFAudio] Xcode 10.2 Beta 2

* Add manual test

* Remove unnecessary project change

* Fixed a file name typo

* fix xtro
2019-02-06 16:48:10 -05:00
Marius Ungureanu b357624861
[NSString] Add overloads which are optimized for substring handling (#5517)
* [NSString] Add overloads which are optimized for substring handling

Fixes #5134
2019-01-31 19:09:13 +02:00
Sebastien Pouliot 6eba94964a
[coremedia] Update for xcode 10.2 beta 1 (#5513)
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
2019-01-30 16:51:26 -05:00
Alex Soto fbe591a998
[MetalPerformanceShaders] Apply feedback to Part 1 2019-01-29 15:37:49 -05:00
Alex Soto 3e0bcf2b32
[MetalPerformanceShaders] Update bindings from Xcode 9.2 to 10.2 - Part 1 of 2
Fixes: xamarin/xamarin-macios#5362

This includes updates for:

* MetalPerformanceShaders.framework
* MPSCore.framework
* MPSImage.framework
* MPSMatrix.framework
* MPSRayIntersector.framework

Pending:

* MPSNeuralNetwork.framework
2019-01-29 15:37:49 -05:00
Rolf Bjarne Kvinge dbd247ed38
[NSLayoutManager] Complete bindings for NSLayoutManager. Fixes #4740. (#4853)
Fix numerous issues with NSLayoutManager[Delegate]:

* The classes are available in both AppKit and UIKit, but the bindings are
  duplicated (unsuccessfully) in both appkit.cs and uikit.cs. So create a new
  xkit.cs that is shared between XI and XM, and put a shared version of the
  bindings there.

* Bind everything that hasn't already been bound (or deprecated by Apple).

* Methods that take a nullable NSRangePointer has been bound with three overloads:

	* A protected overridable (exported) method that uses IntPtr.
	* A public method without the parameter.
	* A public method with the parameter typed as 'ref NSRange'.

	This makes sure the native method can be overridden if needed, while at
	the same time making it possible to call without providing the nullable
	parameter.

* Fix numerous ugly bindings:

	* There's a great nint/nuint confusion for parameters referring to
	  'character index' and 'glyph index'. XI seems to prefer nuint, while XM
	  seems to prefer nint. Standardize on nuint, since that's how Apple
	  created them.

	* Many methods have names than sound like Objective-C. Fix them all,
	  either right away when possible, or for XAMCORE_4_0.

	* Several parameter names have been modified to comply with our naming
	  guidelines (no abbreviations).

Fixes https://github.com/xamarin/xamarin-macios/issues/4740.
2019-01-29 15:37:48 -05:00
Vincent Dondain b59b608a7e
[healthkit] Update for Xcode 10.2 beta 1 (#5497)
- Fix `CategoryTypeIdentifierTest` for 10.2 APIs
2019-01-29 13:07:48 -05:00
Vincent Dondain f2ab1f6daf
[tests] Ignore failing GestureRecognizerTest for now (#5486)
- WIP PR https://github.com/xamarin/xamarin-macios/pull/5462 more investigation needed so ignore test which is preventing green builds
2019-01-28 10:07:06 -05:00
Sebastien Pouliot be5e3c9a33
[security] Update for Xcode 10.2 beta 1 (#5481)
The added `SecTrustSetSignedCertificateTimestamps` API existed in older
versions of the OS so I kept the Xcode headers availability (instead of
current SDK version).
2019-01-25 15:00:56 -05:00
Alex Soto 0e8393f1f7
[UIKit] Update bindings to Xcode 10.2 Beta 1 (#5475)
* [UIKit] Update bindings to Xcode 10.2 Beta 1

* Remove the test from tvOS because it will break the build...
2019-01-25 13:01:07 -05:00
Rolf Bjarne Kvinge ab12d72419
[tests] Adjust DispatchBlock tests according to minimum OS. (#5435)
* [tests] Adjust DispatchBlock tests according to minimum OS.

* [tests] Fix monotouch-test build.
2019-01-21 07:49:28 +01:00
Miguel de Icaza c9e424c9ab [CoreFoundation, ObjCRuntime] Add DispatchBlock APIs, in particular those that surface QOS (#5389)
* [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.
2019-01-17 18:40:58 +01:00
Sebastien Pouliot 9baec99be2
[tests] Fix `ARCondigurationTest.GetSupportedVideoFormats` on older devices (#5409)
`ARImageTrackingConfiguration` requires iOS 12 (Xcode 10) so split it in
a separate test case.

Fixes https://github.com/xamarin/maccore/issues/1335
2019-01-15 13:43:52 -05:00
Bernhard Urban 1c60e65423 [tests] fix Symbols test for tvOS with interpreter (#5399)
One more frame must be checked due to different interp2native transition
on that platform.
2019-01-14 11:58:08 -05:00
Manuel de la Pena 81ea2e3e46
[Network] Add test to ensure that auth headers are not fwd on redirects. (#5371) 2019-01-10 17:45:20 +01:00
Sebastien Pouliot aa77c673c2
[arkit] Fix crash in ARConfiguration.SupportedVideoFormats. Fixes #5347 (#5348)
Even if 'supportedVideoFormats' is static the type is abstract.

> Important
> ARConfiguration is an abstract base class, so its implementation of
> this property always returns an empty array. Read this property from
> the configuration subclass you plan to use for your AR session, such
> as ARWorldTrackingConfiguration or ARFaceTrackingConfiguration.
https://developer.apple.com/documentation/arkit/arconfiguration/2942261-supportedvideoformats?language=objc

and this behave differently in Objective-C (than .net) as every (static)
method will be different (and not a single implementation like C#).

The existing implementation (as a property) calls `ARConfiguration`
implementation which simply throws a (native) exception

> NSInvalidArgumentException Reason: Supported video formats should be called on individual configuration class

The solution is to obsolete the property (can't be subclassed in .net
since it's static) and add, only on the subclasses, a method that
call the 'supportedVideoFormats' selector on the current (not base)
type.

Added unit test to detect the addition of newer subclasses - since they
will also need to expose this method.

reference: https://github.com/xamarin/xamarin-macios/issues/5347
2019-01-04 17:29:19 -05:00
Sebastien Pouliot f55db9d7bc
[coretext] Update CTRunDelegate to work on 64 bits. Fixes #5132 (#5302)
Basic fix that does not require a breaking change.

It's _basic_ as it does not fix the performance comments made inside
the issue. Those are different (not a bug, an enhancement) and I'll
file a separate issue to track this.

Reference: https://github.com/xamarin/xamarin-macios/issues/5132
2018-12-21 08:57:32 -05:00
Bernhard Urban e154556e16 [tests] fix symbols test for interpreter (#5264)
`ves_pinvoke_method` / `do_icall` moved a frame up, so make the check
more flexible.
2018-12-13 08:52:02 -05:00
Manuel de la Pena fb4147d78d
[Foundation] Make sure we use the cookies from the cookie storage. Fixes #5148 (#5244)
The response object does not have all the cookie values, instead we must
rust the cookie storage which can be used to retrieve ALL the cookies
for a task.

The header value has to be created manually because the native objects
do not expose a valid way to get the header. Tests have been added to
ensure we return the same as the managed client.

Fixes https://github.com/xamarin/xamarin-macios/issues/5148
2018-12-10 22:59:11 +01:00
Rolf Bjarne Kvinge c814ddb567
[monotouch-test] Tweak DnsFailure a bit. (#5208)
* Make it clearer when a timeout happens that a timeout happened by asserting
  exactly that.
* Don't assert after getting the (unexpected) result from the network request,
  since asserting will throw an exception, which will be caught and stored,
  and then later in the test we assert that an exception was thrown. So
  asserting just after a successful network request effectively hides any
  failures, since we're now passing because of the assertion exception. Ops.
2018-12-03 17:43:58 +01:00
Rolf Bjarne Kvinge 8e61569615
[monotouch-test] Require iOS 9+ for the ActionTest.TimingFunction_* tests. (#5194)
Require iOS 9+ for the ActionTest.TimingFunction_* tests because Apple's
implementation was broken in iOS 8 and causes us to crash.
2018-11-28 15:09:03 +01:00
Rolf Bjarne Kvinge 3aa7582f4c
[monotouch-test] Add version check to SceneKit.ActionTest. Fixes maccore#1119. (#5099)
Fixes https://github.com/xamarin/maccore/issues/1119.
2018-11-08 18:41:19 +01:00
Rolf Bjarne Kvinge 1b32a8dba5
[monotouch-test] Improve diagnostic output when MessageHandlerTest fails. (#5085)
Reference: https://github.com/xamarin/xamarin-macios/issues/4013
2018-11-06 09:57:35 +01:00
Rolf Bjarne Kvinge ac54b7d065
[monotouch-test] Improve VTDecompressionSessionTests asserts to print better info in case of failure. (#5083)
Showing the actual failed value is much more helpful than just "sorry, it failed".

See https://github.com/xamarin/xamarin-macios/issues/4900.
2018-11-06 09:53:59 +01:00
Sebastien Pouliot 121fe236ba
[scenekit] Fix `SCNAction.TimingFunction` signature to `Func<float,float>`. Fixes #5058 (#5068)
This was incorrectly bound as `Action<float>`.
Added unit test for the API compatibility stubs.

reference: https://github.com/xamarin/xamarin-macios/issues/5058

* [tests] Adjust test not to fail

reference: https://github.com/xamarin/xamarin-macios/issues/5072
2018-11-05 14:20:03 -05:00
Sebastien Pouliot f2a05eddc7
Merge xcode10.1 into d15-9 (#5063) 2018-10-31 17:30:44 -04:00
Sebastien Pouliot 0304219723
[tests] Fix some tests to succeed when run on macOS 10.14 (#5057)
Public bots were updated today.

Fixes https://github.com/xamarin/maccore/issues/1106
Fixes https://github.com/xamarin/maccore/issues/1107
2018-10-31 08:32:36 -04:00
Vincent Dondain 51e7a47700 [coregraphics] Make MatrixOrder a normal enum instead of a nested enum (#5036)
This enum might prove useful to other APIs in the future so move outside of `CGAffineTransform`.
2018-10-24 20:10:55 -04:00
Vincent Dondain f87f3b88f8 [coregraphics] Add 'MatrixOrder' overload for Scale, Rotate and Translate (#5011)
- Fixes #4698: CGAffineTransform.Scale does not work like Swift's .scaledBy(x:y:)
  (https://github.com/xamarin/xamarin-macios/issues/4698)
- 'Scale' monotouch-test now covers the new overload for the new multiplication order.
- Changed the Scale test's values so we have different values for 'x0' (it was always 0 before) and so it matches the test case from the bug report.

* Same fix for Rotate and Translate
2018-10-22 08:42:52 -04:00
Miguel de Icaza dca1f4793f [UIKit] UIGestureRecognizer, support a way of unsubscribing without creating cycles (#4729)
* [UIKit] UIGestureRecognizer, support a way of unsubscribing without creating cycles

This now tracks all the uses of AddTarget with delegates by recording
the Token/Selector pair and making `Dispose()` release all the linkage
as well as providing an enumerator that can be used to get all the
registered Action handlers - this can then be used with .First() and
then passed to `RemoveTarget`.

This addresses https://github.com/xamarin/xamarin-macios/issues/4190

This initial patch is here for discussion of the approach, want to
review and test this before we merge.

* Simplify code a little bit.

* Add test.

* [tests] Add an NSAutoreleasePool to make GestureRecognizerTest.NoStrongCycles happy on 32-bit.
2018-10-18 12:31:39 +02:00
Rolf Bjarne Kvinge ee1f7dc33d
[CoreFoundation] Implement missing dispatch API. Fixes #4606. (#4967)
* [CoreFoundation] Add DispatchQueue.DispatchBarrierSync.

* [CoreFoundation] Bind dispatch_queue_[set|get]_specific.

* [CoreFoundation] Bind dispatch_queue_get_qos_class.

* [CoreFoundation] Bind dispatch_queue_create_with_target.

* Add tests.

* Update xtro.

* Add missing availability attributes.

* [tests] Do a version check before testing new API.

* Remove redundant code.
2018-10-17 14:42:29 +02:00
Bernhard Urban 8e72ea8330 [tests] improve MonoWeakReferenceTest to avoid false pinning (#4961)
Fixes an issue when executed with interpreter. Now, the test is closer
to what we do in the runtime test:

831e73abcd/mono/tests/weak-fields.cs
831e73abcd/mono/mini/TestHelpers.cs
2018-10-16 14:05:19 -04:00
Bernhard Urban 60b06b9c98 [tests] make Symbols.FunctionNames aware of interpreter (#4973) 2018-10-16 11:25:35 -04:00
Rolf Bjarne Kvinge 788b63d96f
[NSLayoutManager] Complete bindings for NSLayoutManager. Fixes #4740. (#4853)
Fix numerous issues with NSLayoutManager[Delegate]:

* The classes are available in both AppKit and UIKit, but the bindings are
  duplicated (unsuccessfully) in both appkit.cs and uikit.cs. So create a new
  xkit.cs that is shared between XI and XM, and put a shared version of the
  bindings there.

* Bind everything that hasn't already been bound (or deprecated by Apple).

* Methods that take a nullable NSRangePointer has been bound with three overloads:

	* A protected overridable (exported) method that uses IntPtr.
	* A public method without the parameter.
	* A public method with the parameter typed as 'ref NSRange'.

	This makes sure the native method can be overridden if needed, while at
	the same time making it possible to call without providing the nullable
	parameter.

* Fix numerous ugly bindings:

	* There's a great nint/nuint confusion for parameters referring to
	  'character index' and 'glyph index'. XI seems to prefer nuint, while XM
	  seems to prefer nint. Standardize on nuint, since that's how Apple
	  created them.

	* Many methods have names than sound like Objective-C. Fix them all,
	  either right away when possible, or for XAMCORE_4_0.

	* Several parameter names have been modified to comply with our naming
	  guidelines (no abbreviations).

Fixes https://github.com/xamarin/xamarin-macios/issues/4740.
2018-10-01 14:17:28 +02:00
Manuel de la Pena ddb0948376 [Metal] Fixe the size of structures. Fixes #4611 (#4838)
The structs MTLQuadTessellationFactorsHalf and
MTLTriangleTessellationFactorsHalf are wrong as per the header
definition:

```c
typedef struct {
    /* NOTE: edgeTessellationFactor and insideTessellationFactor are interpreted as half (16-bit floats) */
    uint16_t edgeTessellationFactor[4];
    uint16_t insideTessellationFactor[2];
} MTLQuadTessellationFactorsHalf;

typedef struct {
    /* NOTE: edgeTessellationFactor and insideTessellationFactor are interpreted as half (16-bit floats) */
    uint16_t edgeTessellationFactor[3];
    uint16_t insideTessellationFactor;
} MTLTriangleTessellationFactorsHalf;
```

We set the arrays size to be the correct one.

Fixes https://github.com/xamarin/xamarin-macios/issues/4611

* Add tests that ensure that the size of the managed structs is the same
as the native ones.

The values used have been checked against a native app compiled on 32
and 64 (iphone 5 and iphone X).
2018-09-21 09:33:27 -04:00
Vincent Dondain 49ef936701
Merge pull request #4833 from VincentDondain/master-merge-xcode10
Merge branch 'xcode10' into master
2018-09-19 18:19:35 -04:00
Rolf Bjarne Kvinge 7354052e96
[NSLayoutManager] Fix potential NRE in NSLayoutManager.GetGlyphs when one of the parameters is null, (#4832) 2018-09-19 07:37:26 +02:00
Vincent Dondain d0de806f4a Merge branch 'xcode10' into d15-9 2018-09-18 14:57:49 -04:00
Vincent Dondain 2174ec41a2 Merge branch 'xcode10' 2018-09-18 14:12:39 -04:00
Rolf Bjarne Kvinge 8e32ace58e
[Foundation] Bind NSMutableDictionary's addEntriesFromDictionary:. Fixes #4813. (#4819)
Fixes https://github.com/xamarin/xamarin-macios/issues/4813
2018-09-17 16:14:46 +02:00
Vincent Dondain 91a52a17f5 Merge branch 'xcode10' into d15-9-merge-xcode10 2018-09-14 12:53:17 -04:00
Manuel de la Pena 422da1f8d4 [Tests] Remove IPV6 flaky test with an ignore. (#4815) 2018-09-14 10:05:17 -04:00
Manuel de la Pena eeca0b8780 [Tests] force the IP version to fix tests on bots. (#4805) 2018-09-13 14:13:21 -04:00
Sebastien Pouliot 121212ed37 [tests] Fix flaky SecProtocolMetadata.EarlyDataAccepted result (#4804)
Result is mostly, but not always, `false` and that _might_ be due
to how we're testing the API.

ref: https://github.com/xamarin/maccore/issues/1026
2018-09-13 11:41:27 +02:00
Manuel de la Pena bed3770bae [Tests] Add missing tests for NWProtocolStack and fix NWParameters tests. (#4793) 2018-09-12 19:15:33 -04:00
Sebastien Pouliot 2c8f882896
[security] SecProtocolMetadata update and tests (#4792)
* Avoid `ArgumentNullException` in default/empty `SecProtocolMetadata.PeerPublicKey`
* Add two `SecProtocolMetadata.CreateSecret` API - disabled as the current tests (incomplete?) crash in unit tests
* Add basic unit tests for `[Sec|NW]ProtocolMetadata`
* Update xtro
2018-09-12 13:07:10 -04:00
Rolf Bjarne Kvinge 239d9031d6 [HealthKit] Use generated NSString-backed enums. Fixes #4183. (#4786)
This means less (duplicated) manual code, which means less errors, which also
means we're now getting some new members that previously weren't duplicated
correctly.

Fixes https://github.com/xamarin/xamarin-macios/issues/4183.
2018-09-12 11:23:02 -04:00
Manuel de la Pena e43ca080c7
[Tests] Add missing tests for NWPath. (#4765) 2018-09-12 12:35:40 +02:00
Sebastien Pouliot 6af77f3fbe
[security] Add new SecCertificateCopyKey and SecTrustEvaluateWithError API with unit tests (#4784) 2018-09-11 12:08:05 -04:00
Sebastien Pouliot 46fb26efc8
[security] Fix 'SecCertificate2.Certificate' call and add some tests (#4783) 2018-09-11 08:41:38 -04:00
Sebastien Pouliot 0841238e29
[naturallanguage] Fix helper API for `NLTagger.GetTag` and cleanup/fix other API. Fixes #4774 (#4782)
* Move `NLTag` to static class (instead of enum) since it's not used in API, except along NSString. Fixes https://github.com/xamarin/xamarin-macios/issues/4774
* Add new member to `NLLanguage` to avoid `ArgumentNullException` when it has not been evaludated (API returns `null`), see unit tests;
* Add `[Params]` to `NLTagger` constructors so they are easier to use (no need to create the array in source);
* Fix `GetTag` so it returns (`out`) the `NSRange`, it's natively a `NSRangePointer`;
* Fix `GetTag[s]` API with changes to `NLTag` de-enumification;
* Add unit tests
2018-09-11 08:40:42 -04:00
Sebastien Pouliot 0057b7c58e
[imageio] Add availability attributes to `Maker*Dictionary` fields (#4753)
and remove custom test that introspection already cover (based on
the availability attributes)
2018-09-05 13:27:46 -04:00
Manuel de la Pena fb9ae90937 [Network] Small change in NWParameters to use a property for RequiredInterface. (#4742)
Added missing tests. Also modified the Interface property in
NWParameters and fix a small typo in NWProtocolMetadata.
2018-09-05 08:07:10 -04:00
Vincent Dondain 9754d505ff [ObjCRuntime] Add missing .ctor to 'Class' (#4726)
- Fixes #4441: [generator] Binding with return value of Class [] do not do the right thing
  (https://github.com/xamarin/xamarin-macios/issues/4441)
- Turns out the logic to put INativeObjects into NSArrays was already in place. We simply needed to add the missing (IntPtr handle, bool owns) overload to `Class`.
- Uncommented AppKit `registeredImageRepClasses` since it was using `Class []`. Tested locally and it works fine.
- Reimplemented `Foundation`'s `NSSecureUnarchiveFromDataTransformer` and its test which were also using `Class []`.
2018-08-29 16:23:36 -04:00
Sebastien Pouliot 807efadf38
[coreimage] Add generator support for CIVector[] and enable it in CIMeshGenerator. Fix #4226 (#4715) 2018-08-29 13:29:34 -04:00
Sebastien Pouliot bc2dfe335f
[tests] Add missing availability attribute and adjust tests to run on iOS 7 devices. Fix #4437 (#4719)
Fix https://github.com/xamarin/xamarin-macios/issues/4437 where the Mac check
always returns `true` on iOS so the `||` condition was always `true`.
2018-08-29 09:09:43 -04:00
Sebastien Pouliot d99be7a03e
Merge d15-8 into xcode 10 2018-08-21 09:29:35 -04:00
Sebastien Pouliot d9edf5928d
[avfoundation] Deprecate 'AVMediaTypeTimedMetadata' (#4655)
AVMediaTypeTimedMetadata has been obsoleted since iOS 6 but was totally
removed (returns null) in iOS 12.

Adjust test and provide a (better) deprecation warning for developers.
2018-08-21 08:57:44 -04:00
Manuel de la Pena 92d6e94707 [NaturalLanguage] Change return type to use double instead on nuint. Fixes #4642 (#4654)
The docs or headers do not specify the exact type. Using double to be
sure.

Issue: https://github.com/xamarin/xamarin-macios/issues/4642
2018-08-20 21:44:24 -04:00
Sebastien Pouliot 213590b3c0
[tests] Re-enable AVPlayerViewController.PrepareForPrerollAds test (broken in early betas) (#4656) 2018-08-20 21:15:58 -04:00
Sebastien Pouliot c7e791a514
[tests] Re-enabled CIBarcodeGenerator tests (failed in earlier betas) (#4651) 2018-08-20 15:26:59 -04:00
Rolf Bjarne Kvinge 5f4327ab0f
[CoreGraphics] Fix CGFunction to work after being disposed. (#4644)
We have a test for CGFunction, and in iOS 12 the behavior changed where
previously the CGFunction was invoked immediately when rendering, it's now
retained and only called later.

This is troublesome for the test, because it disposes the managed CGFunction
when it thinks it's completed. Since the function is invoked way later, the
test now crashes. Ops.

The obvious fix is to change the test to dispose the CGFunction later. This
falls flat when finding out that "later" is undetermined. Native code retains
the CGFunction, and can do whatever it wishes with it until it's released, and
there's no way to know when that is.

OK: what about not disposing the CGFunction, and letting the GC do its job?
This also falls flat, because there's a circular reference between the native
CGFunction and the managed wrapper, preventing any of them from being released
automatically by the GC. The only way to break the circular reference is to
dispose the managed wrapper.

So, can we fix the circular reference? Unfortunately not, because we can't
monitor the native CGFunction's retain count, which is required in order to
switch the native->managed link between weak and strong according to the
retain count.

This leaves one solution (that I could come up with at least): make sure
everything works fine after disposing the managed wrapper.

This involves a few things:

* Only break the native->managed connection (the 'gch' GCHandle) when the
  native CGFunction is freed. This is accomplished by using the API provided
  by Apple for exactly that purpose (the 'release' callback field in the
  'CGFunctionCallbacks' struct).

* Use a static variable for the 'CGFunctionCallback' struct and its contents.
  This solves another potential problem: the GC could have collected the
  delegate to the 'EvaluateCallback' function at any point.

* Don't null out the 'evaluate' delegate in Dispose. This leaves the user with
  no way to break a potential circular reference through that delegate (since
  it will never be null), so provide a property that makes it possible for
  users to explicitly null out the delegate ('EvaluateFunction').

* Only call the 'evaluate' callback if it's not null.

This also has the additional advantage that test (and any customer code
running into the same issue) works without modifications.
2018-08-20 07:40:54 +02:00
Rolf Bjarne Kvinge 965e1f7bcc Merge remote-tracking branch 'origin/xcode10' into xcode10-rebase-15.8 2018-08-16 17:09:30 +02:00
Vincent Dondain 3548c44782
[metal] Update for Xcode 10 beta 1, 2, 3 & 4 (#4562) 2018-08-15 10:09:23 -04:00
Vincent Dondain eec95e881c Merge branch 'd15-8' into xcode10-rebase-15.8 2018-08-13 21:04:56 -04:00
Sebastien Pouliot 0b7265193a
[coreservices] Update up to beta 5 (#4590)
Also avoid creating NSString instances for hidden constants where
only the handle is every used.
2018-08-08 12:38:03 -04:00
Manuel de la Pena 82d21bc211
[Tests] Fix failing tests on iOS 8. Fixes #4437 (#4592)
Some of the tests fail because the assert is looking at the wrong iOS
version. Looking at the API definitions:

* UIStackView - Available in iOS 9, not iOS 8.
* AudioServicesPlayAlertSoundWithCompletion - Available in iOS 9, not
iOS 8.

All the other tests reported in the issue pass.

Issue: https://github.com/xamarin/xamarin-macios/issues/4437
2018-08-08 16:14:04 +02:00
Rolf Bjarne Kvinge c77f191064 [CoreGraphics] Add missing API added in Xcode 10 beta 1. (#4547)
* [CoreGraphics] Add CGPDFArray.Get* overloads that take a nint index, since the CGPDFArray.Count property returns nint.

This makes the following code work:

    for (var i = 0; i < array.Count; i++)
    	array.GetInt (i, ...)

* Don't add [MonoPInvokeCallback] to Mac code.

* [CoreGraphics] Rename CGPDFArray.ApplyBlockCallback to ApplyCallback.

Since the fact that the method is implemented using a block is not relevant
for managed code.

This also makes the method named like an equivalent method in CGPDFDictionary.

* [CoreGraphics] Change CGPDFArray.Apply to take an 'object' as the info parameter instead of IntPtr.

This makes it nicer for managed code.

* [CoreGraphics] CGPDFArray.Apply: resolve the iterated object to the actual CGPDFObject type.

* [CoreGraphics] Add an CGPDFDictionary.Apply overload that resolves the iterated object to the actual CGPDFObject type.

This method was previously only available in Classic, so I just reintroduced
it with a few changes to make the API nicer (which isn't a breaking change
since we're not building Classic anymore).

* [tests] Add test for CGPDF types.

* [tests] Don't run the new tests unless the SDK was part of Xcode 10
2018-08-02 20:30:41 -04:00
Alex Soto b808213465 [Vision] Update bindings to Xcode 10 beta 1, nothing in beta 2 (#4321) 2018-08-01 10:50:13 -04:00
Miguel de Icaza 49bb4aa0ca Xcode10 CoreGraphics B1-B5 (#4198)
* [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.
2018-08-01 16:25:40 +02:00
Sebastien Pouliot 745ac8f1db
[foundation] Override Message property in NSErrorException. Fixes #4133 (#4176)
The default `Message` property is not every helpful. Better information
is available inside the `Error` property but it's not general (nor cross
platform) when dealing with exception.

Include unit tests (on an existing test checking NSError values)

https://github.com/xamarin/xamarin-macios/issues/4133
2018-08-01 09:18:04 -04:00
Rolf Bjarne Kvinge 215ab7fc1a
[mtouch] Unify code to detect and handle frameworks that aren't supported in the simulator. Fixes #4422. (#4510)
Unify the code to detect frameworks that aren't supported in the simulator (we
had switches in two places, now this data is stored per framework).

Also remove some of the Metal frameworks for some of the platforms from these
lists (since they're now available in the simulator in some cases), which
fixes #4422.

It also seems CoreAudioKit is now available in the simulator (it wasn't in the
first Xcode 7 beta, but apparently added in a later beta. This made our
exclusion incorrect, but we never noticed).

https://github.com/xamarin/xamarin-macios/issues/4422
2018-07-27 16:30:08 +02:00
Chris Hamons 6d039cb969
Foundation for Xcode 10 Beta 1-2 (#4375)
- Work around #4441 by commenting out binding until fixed
2018-07-13 14:27:29 -04:00
Manuel de la Pena 62017a1405
[iAd] Xcode 10 beta 3 support. (#4425) 2018-07-13 16:23:44 +02:00
Vincent Dondain 2f89775fc2 [arkit] Update to Xcode 10 beta 3 (#4406)
- Updated some ARReferenceObject APIs based on their (better) Swift names. Breaking changes but on new APIs.
- Update ARReferenceObjectTest for device (center and extent have real values on device).
- Reuploaded an arobject file from Beta 3 just in case because of: "ARReferenceObject and ARWorldMap data generated using iOS 12 beta 2 or earlier isn’t compatible with beta 3 or later. Please rescan your objects to generate new ARReferenceObject and ARWorldMap data."
2018-07-05 22:36:33 -04:00
Alex Soto 79e1392823
[Intents|UI] Update bindings to Xcode 10 Beta 3 (#4402) 2018-07-05 15:36:24 -05:00
Rolf Bjarne Kvinge b8b6ef3f5f
Merge pull request #4278 from rolfbjarne/jenkins-mojave
[tests] Run Xamarin.Mac tests on Mojave, and add more Xamarin.Mac tests.

* Add more Xamarin.Mac tests: introspection, link sdk, link all and xammac_tests.
* Fix TextureAtlasTest.Empty to not crash due to Apple not liking null callbacks. (#4003)
* Run Xamarin.Mac tests on Mojave as well, even though the build OS is an earlier OS (High Sierra).
2018-07-05 18:43:17 +02:00
Rolf Bjarne Kvinge 849453a612 [monotouch-test] Adjust DlfcnTest.OpenClose_libSystem to work with Xcode 10. Fixes #4377. (#4391)
Fixed https://github.com/xamarin/xamarin-macios/issues/4377.
2018-07-04 20:38:45 -04:00
Rolf Bjarne Kvinge 1b12348e57 [tests] Refactor API to check/assert current OS version. 2018-07-04 12:35:15 +02:00
Rolf Bjarne Kvinge bcfd6290c3 Merge remote-tracking branch 'origin/xcode10' into jenkins-mojave 2018-07-04 12:35:10 +02:00
Rolf Bjarne Kvinge 17093d4311 [tests] Make MTLDeviceTests work on macOS systems that don't support metal. (#4059) 2018-07-04 00:21:45 +02:00
Rolf Bjarne Kvinge fe8e2cc439 [monotouch-test] Cope with potential symlinks when comparing bundle paths. 2018-07-03 20:47:14 +02:00
Rolf Bjarne Kvinge 392d74754e [monotouch-test] Fix NRE in CentralManagerTest's TearDown method, and improve some failure scenarios. 2018-07-03 20:47:14 +02:00
Rolf Bjarne Kvinge d3baa2b635 [monotouch-test][EventKit] Check for permission before putting up dialogs for EKEventStore. 2018-07-03 20:47:14 +02:00
Rolf Bjarne Kvinge 517bd6b506 [monotouch-test] Fix typo in test name. 2018-07-03 20:47:14 +02:00
Rolf Bjarne Kvinge eaf1e567ac [monotouch-test][CoreGraphics] Fix P/Invokes to work on all platforms. 2018-07-03 20:47:14 +02:00
Rolf Bjarne Kvinge 51cdac8e60 [monotouch-test] Implement a cross-platform way of converting UIColor/NSColor to GCColor, and use it. 2018-07-03 20:47:14 +02:00
Rolf Bjarne Kvinge 5fbb714c09 [monotouch-test] Remove Classic tests and any version checks for versions earlier than the minimum deploymnent target. 2018-07-03 20:47:14 +02:00
Rolf Bjarne Kvinge 9703f17c91 [monotouch-test] Fix versions checks.
* Fix many version checks to be based on Xcode version instead of iOS version.
* Added/fixed a few expected values according to platform version to match behavior in older macOS versions.
2018-07-03 20:47:14 +02:00
Rolf Bjarne Kvinge cbb637630b [tests] Remove Classic-only tests. 2018-07-03 16:57:16 +02:00
Alex Soto 709e855c15
[CoreText] Update bindings to Xcode 10 Beta 1 & 2 (#4368)
* [CoreText] Update bindings to Xcode 10 Beta 1 & 2

* Adds tests and unbreaks API

* Check for Xcode 10 in tests
2018-07-03 09:48:10 -05:00
Rolf Bjarne Kvinge c3237f5d10 [tests] Fix TextureAtlasTest.Empty to not crash due to Apple not liking null callbacks. (#4003)
[tests] Fix TextureAtlasTest.Empty to not crash due to Apple not liking null callbacks.
2018-07-02 19:05:27 +02:00
Alex Soto e45838a1e8
Fix GetMatchingFontDescriptors overload with sort callback (#3871) (#4373)
It incorrectly returned array of arrays instead of array of CTFontDescriptors.

Add CTFontCollectionTest
2018-06-29 16:05:00 -05:00
Sebastien Pouliot 4da64a8355
[systemconfiguration][tvos] CaptiveNetwork API are now marked as prohibited in tvOS (#4357) 2018-06-29 09:35:05 -04:00
Rolf Bjarne Kvinge e110612118
[registrar] Improve error message when failing to create a managed wrapper for a native handle. (#4360)
* Convert it into a MM8027/MT8027 error (with documentation).
* Add information about the selector and managed method that triggered the error.

Now the problem reported in issue #4254 shows up as:

> ObjCRuntime.RuntimeException: Failed to marshal the Objective-C object 0x7f8080412810 (type: UIView). Could not find an existing managed instance for this object, nor was it possible to create a new managed instance (because the type 'UIKit.UIView&' does not have a constructor that takes one IntPtr argument).
> Additional information:
> 	Selector: popoverController:willRepositionPopoverToRect:inView:
> 	Method: UIKit.UIPopoverController+_UIPopoverControllerDelegate.WillReposition(UIKit.UIPopoverController, CoreGraphics.CGRect ByRef, UIKit.UIView ByRef)

instead of just:

> ObjCRuntime.RuntimeException: Failed to marshal the Objective-C object 0x7f8080412810 (type: UIView). Could not find an existing managed instance for this object, nor was it possible to create a new managed instance (because the type 'UIKit.UIView&' does not have a constructor that takes one IntPtr argument).

which makes it much easier to understand, track down, and fix/work around,
both for customers and ourselves.
2018-06-29 14:38:28 +02:00
Rolf Bjarne Kvinge d79bef79a0
[ObjCRuntime] Make Class.GetHandle not handle byref types. Fixes #4254. (#4361)
* [ObjCRuntime] Make Class.GetHandle not handle byref types. Fixes #4254.

This is a regression between d15-6 and d15-7: it's an unindented consequence
of the changes required to link away the dynamic registrar.

This unindented consequence is non-obvious: it made Class.GetHandle
successfully look up byref types, since we're now using metadata tokens to
look up a Class from the managed Type, and it turns out the metadata tokens
are the same for byref types as the corresponding non-byref type, so
Class.GetHandle treats them identically.

This was not the behavior for Class.GetHandle in d15-6, and other code relied
on this behavior (in particular calling isKindOfClass: in Runtime.GetNSObject
with a nil class returns false, and we'd end up in a different code path that
would not try to create the managed peer with a byref type).

So make sure Class.GetHandle doesn't change its behavior compared to d15-6 by
special-casing byref types to return IntPtr.Zero.

Fixes https://github.com/xamarin/xamarin-macios/issues/4254.

* Move byref check earlier to get identical behavior when the dynamic linker is optimized away.

Also add checks for pointer and array types for the same reason.
2018-06-29 14:33:55 +02:00
Rolf Bjarne Kvinge 5245cfab14
[Foundation] Fix NSDictionary string indexers. (#4335)
Creating a new NSString doesn't always lead to creating a new NSString, which
will obviously cause trouble.

The scenario is:

* An NSString with the value @"Bye" is added to an NSDictionary, with the same
  string as both the key and the value.

* The (managed) string indexer is used to try to get the value back. The
  string indexer would call 'new NSString ("Bye")', which would create a new
  managed NSString, and maybe a new native NSString (or maybe it would re-use
  an existing NSString). Then the handle of this NSString would be passed to
  the native API, and the same handle would come back as the result (since the
  same string is both the key and the value). We'd call Runtime.GetNSString on
  the returned handle, get back the same managed instance that was created
  just before the call to the native method. Finally, just before returning
  this managed instance from the indexer, we'd dispose it... since it was
  created in a 'using' block. Then we'd return a disposed NSString object from
  the indexer. Ops.

The fix is to not create a managed wrapper for the NSString handle we need to
pass to the native API, but create and free the native NSString object without
using a managed wrapper.
2018-06-28 14:57:41 +02:00
Rolf Bjarne Kvinge 06fd4029f3
[generator] Fix generated code for INativeObject properties in filters: we don't own such objects. (#4330)
Fixes a crash in the MonoTouchFixtures.CoreImage.FilterTest.ColorSpace on macOS 10.9 and 10.10:

    Assertion failed: (!space->is_singleton), function color_space_dealloc, file ColorSpaces/color-space.c, line 102.
    Stacktrace:

      at <unknown> <0xffffffff>
      at (wrapper managed-to-native) CoreGraphics.CGColorSpace.CGColorSpaceRelease (intptr) [0x00009] in <7709ef494bc84be8a727c0b1d19c4344>:0
      at CoreGraphics.CGColorSpace.Dispose (bool) [0x00016] in /Library/Frameworks/Xamarin.Mac.framework/Versions/4.99.0.103/src/Xamarin.Mac/CoreGraphics/CGColorSpace.cs:116
      at CoreGraphics.CGColorSpace.Finalize () [0x00002] in /Library/Frameworks/Xamarin.Mac.framework/Versions/4.99.0.103/src/Xamarin.Mac/CoreGraphics/CGColorSpace.cs:94
      at (wrapper runtime-invoke) object.runtime_invoke_virtual_void__this__ (object,intptr,intptr,intptr) [0x0001f] in <ea4ecc87ef1044a98fc1b5fdb59119e7>:0

    Native stacktrace:

    	0   xammac_tests                        0x000000010d55fc18 mono_handle_native_crash + 264
    	1   libsystem_platform.dylib            0x00007fff8d4a152a _sigtramp + 26
    	2   ???                                 0x0000000000000000 0x0 + 0
    	3   libsystem_c.dylib                   0x00007fff9aba76df abort + 129
    	4   libsystem_c.dylib                   0x00007fff9ab6edd8 basename + 0
    	5   CoreGraphics                        0x00007fff8c2b58b8 color_space_dealloc + 248
    	6   CoreFoundation                      0x00007fff87997af3 CFRelease + 371
    	7   ???                                 0x00000001248548cd 0x0 + 4907681997
    	8   ???                                 0x000000012416a13c 0x0 + 4900430140
    	9   xammac_tests                        0x000000010d5f7d0e mono_gc_run_finalize + 734
    	10  xammac_tests                        0x000000010d6e859a sgen_gc_invoke_finalizers + 234
    	11  xammac_tests                        0x000000010d5f9754 finalizer_thread + 756
    	12  xammac_tests                        0x000000010d6ae930 start_wrapper + 704
    	13  libsystem_pthread.dylib             0x00007fff8ae8999d _pthread_body + 131
    	14  libsystem_pthread.dylib             0x00007fff8ae8991a _pthread_body + 0
    	15  libsystem_pthread.dylib             0x00007fff8ae87351 thread_start + 13

On newer macOS versions, the API that returns a CGColorSpace returns a global
object that can't be retained/released, and thus won't crash since the
CGColorSpace is never freed.
2018-06-25 10:47:14 +02:00
Vincent Dondain 2f1859733d
[arkit] Update to Xcode 10 beta 1 (ARKit 2.0) (#4209)
I obsoleted `GetProjectPoint` in favor of `Project` because of the introduction of `Unproject` (which made me realize the naming was wrong) and based on the API doc https://developer.apple.com/documentation/arkit/arcamera/2923538-projectpoint?language=objc. 

The `CGPoint` returned is the projection of a point. An other naming option would have been `GetProjectedPoint` but I think `Project` is closer to the original and clear enough. You project/unproject something onto something else and you get the projection back.
2018-06-14 13:44:45 -04:00
Manuel de la Pena f77f44940e
[NaturalLanguage] Added the new framework for Xcode10. (#4236) 2018-06-14 19:21:44 +02:00
Sebastien Pouliot 2d6ce7459d
Bump to use Xcode 10 beta 1 (#4179)
* 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.
2018-06-08 18:45:24 -07:00
Manuel de la Pena c4a64ad7d9 [Compression] Ensure we use the correct linking flags for older versions. Fixes #4129. (#4169) (#4184)
Libcompresison was added after iOS 9.0, TvOS 9.0, MacOS 10.11 and watchOS
2.0. We want to use weak in those older platforms.

Fixes issue https://github.com/xamarin/xamarin-macios/issues/4129
2018-06-05 14:56:49 -04:00
Manuel de la Pena aa7c95eca7
[Compression] Ensure we use the correct linking flags for older versions. Fixes #4129. (#4169)
* [Compression] Ensure we use the correct lonking flags for older versions. Fixes #4129.

Libcompresison was added after iOs 9.0, TvOS 9.0, Mac 10.11 and Watch
2.0. We want to use weak in those older platforms.

Fixes issue https://github.com/xamarin/xamarin-macios/issues/4129
2018-06-05 09:12:27 -07:00
kunigaku 07356b8391 [foundation] Fix empty NSData.ToArray() crash (#4103) 2018-05-18 14:52:47 -04:00
Manuel de la Pena f765d674d3 [Compression] Add compression framework bindings. (#3942) 2018-05-11 15:54:31 -04:00
Rolf Bjarne Kvinge 285062208d
[tests] Make MTLDeviceTests work on macOS systems that don't support metal. (#4059) 2018-05-09 15:14:42 +02:00
Sebastien Pouliot 380821fa1a
[coretext] Enable CTFont tests on watchOS and macOS. Fixes #3925 (#4035)
`CTFontCreateWithGraphicsFont` is actually available on macOS and watchOS,
so it's enabled, in `CGFont`, along with its unit test.

https://github.com/xamarin/xamarin-macios/issues/3925
2018-05-04 13:32:59 -04:00
Sebastien Pouliot 353ce95c70
[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
2018-05-02 20:32:30 -04:00
Rolf Bjarne Kvinge 3385b68e5a
[monotouch-test] Fix WeakReferenceTest.WeakTest to work on watchOS/LLVM. (#4010)
Change WeakReferenceTest.WeakTest so that it doesn't fetch values that should
be garbage collected on the main thread.

Doing so on the main thread may cause those values to stay in registers as
temporary values, thus preventing the garbage collector from collecting them.

Instead do the fetching in a background thread, whose stack won't exist
anymore once it's finished.

Fixes this test failure when running on watchOS device in release mode:

    [FAIL] WeakReferenceTest.WeakTest : 't.Obj4' should be null

The reason it only happens on watchOS in release mode, is probably because
LLVM puts temporary values in different registers than Mono's AOT compiler
does.
2018-04-30 12:50:10 +02:00
Rolf Bjarne Kvinge f7ce5b91c5 [monotouch-test] Make BundleTest.TestPreferredLocalizations laxer. (#4005)
Change test to verify that all preferred localizations are in the list of
available localizations (instead of hardcoding an expected result of 'en').

This makes the TestPreferredLocalizations work if the device language is 'es',
in which case the preferred language between 'en' and 'es' is obviously 'es'.
2018-04-27 12:00:17 -04:00
Rolf Bjarne Kvinge 73f6bf0722
[tests] Determine at runtime instead of compile time whether LinkAll is enabled. Fixes #3812. (#4004)
* [tests] Determine at runtime instead of compile time whether LinkAll is enabled. Fixes #3812.

This way we can remove the LINKALL define, which also means nobody can forget
to define it when building using LinkAll.

https://github.com/xamarin/xamarin-macios/issues/3812
2018-04-27 13:11:27 +02:00
Rolf Bjarne Kvinge 7cbaa2d1a2
[tests] Fix TextureAtlasTest.Empty to not crash due to Apple not liking null callbacks. (#4003)
[tests] Fix TextureAtlasTest.Empty to not crash due to Apple not liking null callbacks.
2018-04-27 07:37:27 +02:00
Sebastien Pouliot bf159969f9
[foundation] Avoid unnecessary native calls for NSNull.Null. Fixes #3544 (#3984)
Repetitive calls to `NSNull.Null.Handle`, e.g. from `NSArray.UnsafeGetItem<T>`,
means several (one by item), costly, calls into ObjC code - but it always
return the same (native) singleton.

This manually cache the managed `NSNull.Null` static value, once it's
initialized the first time, so future calls won't have the performance
penalty.

https://github.com/xamarin/xamarin-macios/issues/3544
2018-04-26 09:24:46 -04:00
Filip Navara 865ee621dc Fix GetMatchingFontDescriptors overload with sort callback (#3871)
It incorrectly returned array of arrays instead of array of CTFontDescriptors.

Add CTFontCollectionTest
2018-04-13 10:22:02 -04:00
Vincent Dondain 2a84c116db Merge branch 'xcode9.3' 2018-04-03 14:14:07 -04:00
Vincent Dondain d34f1fbbd7 Merge branch 'xcode9.3' into d15-7-merge-xcode9.3 2018-03-29 19:31:01 -04:00
Alex Soto da6db5f660
[monotouch-tests] Adds mono's WeakAttribute tests (#3739) (#3760)
* [monotouch-tests] Adds mono's WeakAttribute tests

* Embrace watchOS

Unfortunately this revealed that WeakAttribute is not working for watchOS

* Port mono's WeakAttribute test to our test runner

Test Ported:
5bdaef7e5f/mono/tests/weak-fields.cs

* Fix object leaks and implement suggested approach from 4b9ade0c59

* Remove debug spew and fix formating on header
2018-03-16 08:22:05 -06:00
Alex Soto b6dbebe9d3
[monotouch-tests] Adds mono's WeakAttribute tests (#3739)
* [monotouch-tests] Adds mono's WeakAttribute tests

* Embrace watchOS

Unfortunately this revealed that WeakAttribute is not working for watchOS

* Port mono's WeakAttribute test to our test runner

Test Ported:
5bdaef7e5f/mono/tests/weak-fields.cs

* Fix object leaks and implement suggested approach from 4b9ade0c59

* Remove debug spew and fix formating on header
2018-03-15 08:29:46 -06:00
Sebastien Pouliot 1b3672e2e3
[tests][mac] Fix random failure in KeyTest.RoundtripRSAMinPKCS1 (#3737)
The behaviour is not consistent on macOS (like it is on iOS)

Fixes https://github.com/xamarin/maccore/issues/671
2018-03-14 08:00:06 -05:00
Rolf Bjarne Kvinge 98837dbfd0
[ObjCRuntime] Don't double-retain blocks. (#3717) (#3730)
First there was darkness; no blocks were retained.

Then came the light; and all blocks were retained [1]

Forever.

But all that once is, must one day not be,
and thus the light gave way to darkness,
and blocks were only retained as long as need be [2].

But before there was a balance, there was a crossroad.

In some places the light shone forever,
and all blocks were retained.

In other places there was a balance,
and the light shone only as long as needed.

A desire to unify arose.

Alas, it could not be.

It was a bright and sunny day

When a merge failed [3].

And all blocks were retained. Twice.

Once [here][4] and once [there][5].

For many years we could not see.

Until a dark and rainy night,
when an awareness arose.

And the desire to unify the balance could finally be fulfilled.

[1]: 6efca92acb
[2]: a22f877539
[3]: befa0477cf
[4]: 5158a3c001/src/ObjCRuntime/Runtime.cs (L858)
[5]: 5158a3c001/runtime/runtime.m (L2091)
2018-03-13 19:24:44 +01:00
Rolf Bjarne Kvinge 2fe44b9890
[ObjCRuntime] Don't double-retain blocks. (#3717)
* [ObjCRuntime] Don't double-retain blocks.

First there was darkness; no blocks were retained.

Then came the light; and all blocks were retained [1]

Forever.

But all that once is, must one day not be,
and thus the light gave way to darkness,
and blocks were only retained as long as need be [2].

But before there was a balance, there was a crossroad.

In some places the light shone forever,
and all blocks were retained.

In other places there was a balance,
and the light shone only as long as needed.

A desire to unify arose.

Alas, it could not be.

It was a bright and sunny day

When a merge failed [3].

And all blocks were retained. Twice.

Once [here][4] and once [there][5].

For many years we could not see.

Until a dark and rainy night,
when an awareness arose.

And the desire to unify the balance could finally be fulfilled.

[1]: 6efca92acb
[2]: a22f877539
[3]: befa0477cf
[4]: 5158a3c001/src/ObjCRuntime/Runtime.cs (L858)
[5]: 5158a3c001/runtime/runtime.m (L2091)

* [tests] Fix test builds.

* [monotouch-test] RegistrarTest.BlockCollection: allocate more and wait longer for the GC.

Allocate more objects and wait longer for the GC to run.

Hopefully fixes this problem:

    	[FAIL] RegistrarTest.BlockCollection :   freed blocks
      Expected: greater than 0
      But was:  0

The blocks are freed if we just wait long enough... The problem is that we
don't want to wait very long (makes the tests slow to run), so try to speed
things up by allocating more.
2018-03-13 12:30:32 +01:00
Rolf Bjarne Kvinge c4ddd4da1e
[monotouch-test] Adjust a few tests to cope with optimizations. (#3720)
This fixes the following test failures when building for debug with all optimizations enabled:

    DispatchTests
    	[FAIL] DispatchTests.EverAfter :   thread check hit
      Expected: same as <UIKit.UIKitThreadAccessException>
      But was:  <System.ArgumentNullException>

    		  at MonoTouchFixtures.CoreFoundation.DispatchTests.EverAfter () [0x000e1] in /Users/xamarinqa/vsts/_work/52/s/tests/monotouch-test/CoreFoundation/DispatchTests.cs:259
    		  at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
    	[FAIL] DispatchTests.MainQueueDispatch :   thread check hit
      Expected: same as <UIKit.UIKitThreadAccessException>
      But was:  <System.ArgumentNullException>

    		  at MonoTouchFixtures.CoreFoundation.DispatchTests.MainQueueDispatch () [0x000d1] in /Users/xamarinqa/vsts/_work/52/s/tests/monotouch-test/CoreFoundation/DispatchTests.cs:111
    		  at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
2018-03-13 10:41:38 +01:00
Alex Soto fd746c47fa
[Backport 15-7][monotouch-test] Stop MidiThruConnectionTests.FindTest from randomly failing (#3702)
* [monotouch-test] Stop MidiThruConnectionTests.FindTest from randomly failing (#3696)

Fixes xamarin/maccore#658

When a MidiThruConnection is created but for some reason is not disposed
the system keeps it alive even between app/simulator restarts, if you want
to clean the connections you must reset contents and settings from simulator.

In order to avoid this test from failing randomly and since the intent of the
test is to check if `MidiThruConnection.Find` works we change the assert to
`>= 2` since this is at least the number of connections we expect.

* [monotouch-test] Enhance MidiThruConnectionTests.FindTest from #3696 comments (#3700)
2018-03-09 12:49:33 -06:00
Alex Soto 06d390ce3e [Backport][monotouch-test] Stop MidiThruConnectionTests.FindTest from randomly failing (#3703)
Fixes xamarin/maccore#658

When a MidiThruConnection is created but for some reason is not disposed
the system keeps it alive even between app/simulator restarts, if you want
to clean the connections you must reset contents and settings from simulator.
Which is a bit harder when the issues happens on the macOS.
2018-03-09 08:12:18 -05:00
Alex Soto fc5f57ed8c
[monotouch-test] Enchance MidiThruConnectionTests.FindTest from #3696 comments (#3700) 2018-03-08 12:51:21 -06:00
Alex Soto 4d51294bdf [monotouch-test] Stop MidiThruConnectionTests.FindTest from randomly failing (#3696)
Fixes xamarin/maccore#658

When a MidiThruConnection is created but for some reason is not disposed
the system keeps it alive even between app/simulator restarts, if you want
to clean the connections you must reset contents and settings from simulator.

In order to avoid this test from failing randomly and since the intent of the
test is to check if `MidiThruConnection.Find` works we change the assert to
`>= 2` since this is at least the number of connections we expect.
2018-03-08 07:33:13 +01:00
Vincent Dondain 24e8815004
[security] Strongly typed key generation (#3502) (#3676)
* [security] Modifying structure of bindings

Added strong dictionary for key generation according to
https://developer.apple.com/documentation/security/certificate_key_and_trust_services/keys/key_generation_attributes
in preparation making a strongly typed key generation possible.

* Making strong dictionary and composite of other strong dictionaries.

* Implementing access control as property type of SecPublicPrivateKeyAttrs.

* Adding new overload for SecKey.CreateRandomKey.

* Moving TokenID to strongly typed property.

* Fix coding style + use nameof

* Fixing Xcode version assertion of key generation tests.

* Fixing errors in test case.

* Fixing whitespace issue.

* Resolving inheritance issue

Removing inheritance between SecKeyGenerationParameters and
SecPublicPrivateKeyAttrs and instead add the necessary properties
to SecKeyGenerationParameters. Adds redundant code, but I don't
see a way around it.

* Moving test case to appropriate test class.

* Creating necessary strong dictionaries for key generation.

* [formatting] Mono coding guidelines

Make sure you're following http://www.mono-project.com/community/contributing/coding-guidelines/
In VSMac: Preferences > Source Code > Code Formatting > C# source code > Policy Mono.

* Remove [Advice] that are specific to GenerateKeyPair

`SecKeyGenerationParameters` and `SecKeyParameters` cannot be used for `GenerateKeyPair`.

* Clarify 'ArgumentException' for invalid 'SecKeyType'

* Fixed CreateRandomKeyTest

- Renamed CreateRandomKeyWithParametersTests to CreateRandomKeyTest.
- Add messages to all asserts.

```
keyGenerationParameters = new SecKeyGenerationParameters ();
keyGenerationParameters.KeyType = SecKeyType.Invalid;
Assert.Throws<ArgumentException> (() => { SecKey.CreateRandomKey (keyGenerationParameters, out _); }, "CreateRandomKey - invalid key type");
```
- ^ didn't work because `SecKeyGenerationParameters`'s setter protects against invalid. There's no constant for invalid so null is returned.

```
Assert.That (SecKey.CreateRandomKey (keyGenerationParameters, out _), Is.EqualTo (SecStatusCode.Param), "CreateRandomKey - Param issue, invalid RSA key size");
```
- ^ `SecKey.CreateRandomKey` doesn't return a `SecStatusCode` like `GenerateKeyPair`.

* Fixes based on spouliot's input.

* Mono styling fix.
2018-03-06 17:40:19 -05:00
mdbech 933ab0d70a [security] Strongly typed key generation (#3502)
* [security] Modifying structure of bindings

Added strong dictionary for key generation according to
https://developer.apple.com/documentation/security/certificate_key_and_trust_services/keys/key_generation_attributes
in preparation making a strongly typed key generation possible.

* Making strong dictionary and composite of other strong dictionaries.

* Implementing access control as property type of SecPublicPrivateKeyAttrs.

* Adding new overload for SecKey.CreateRandomKey.

* Moving TokenID to strongly typed property.

* Fix coding style + use nameof

* Fixing Xcode version assertion of key generation tests.

* Fixing errors in test case.

* Fixing whitespace issue.

* Resolving inheritance issue

Removing inheritance between SecKeyGenerationParameters and
SecPublicPrivateKeyAttrs and instead add the necessary properties
to SecKeyGenerationParameters. Adds redundant code, but I don't
see a way around it.

* Moving test case to appropriate test class.

* Creating necessary strong dictionaries for key generation.

* [formatting] Mono coding guidelines

Make sure you're following http://www.mono-project.com/community/contributing/coding-guidelines/
In VSMac: Preferences > Source Code > Code Formatting > C# source code > Policy Mono.

* Remove [Advice] that are specific to GenerateKeyPair

`SecKeyGenerationParameters` and `SecKeyParameters` cannot be used for `GenerateKeyPair`.

* Clarify 'ArgumentException' for invalid 'SecKeyType'

* Fixed CreateRandomKeyTest

- Renamed CreateRandomKeyWithParametersTests to CreateRandomKeyTest.
- Add messages to all asserts.

```
keyGenerationParameters = new SecKeyGenerationParameters ();
keyGenerationParameters.KeyType = SecKeyType.Invalid;
Assert.Throws<ArgumentException> (() => { SecKey.CreateRandomKey (keyGenerationParameters, out _); }, "CreateRandomKey - invalid key type");
```
- ^ didn't work because `SecKeyGenerationParameters`'s setter protects against invalid. There's no constant for invalid so null is returned.

```
Assert.That (SecKey.CreateRandomKey (keyGenerationParameters, out _), Is.EqualTo (SecStatusCode.Param), "CreateRandomKey - Param issue, invalid RSA key size");
```
- ^ `SecKey.CreateRandomKey` doesn't return a `SecStatusCode` like `GenerateKeyPair`.

* Fixes based on spouliot's input.

* Mono styling fix.
2018-03-06 15:25:50 -05:00
Sebastien Pouliot 29676a3662 Merge 15.6 into xcode9.3 2018-03-05 17:16:28 -05:00
Rolf Bjarne Kvinge d0d6f4d0a2 [tests] Fix NSDataTest.Https to use a site with a valid and complete certificate chain. Fixes #644. (#3549) (#3559)
Fixes https://github.com/xamarin/maccore/issues/644.
2018-02-21 11:27:03 -05:00
Rolf Bjarne Kvinge d742f44f3a
[tests] Fix NSDataTest.Https to use a site with a valid and complete certificate chain. Fixes #644. (#3549) (#3556)
Fixes https://github.com/xamarin/maccore/issues/644.
2018-02-21 16:03:35 +01:00
Rolf Bjarne Kvinge f7d907983e
[tests] Fix NSDataTest.Https to use a site with a valid and complete certificate chain. Fixes #644. (#3549)
Fixes https://github.com/xamarin/maccore/issues/644.
2018-02-21 09:09:12 +01:00
Manuel de la Pena 688b3020f9
[Foundation] Add missing NSLinguisticAnalysis category. Fixes 35009. (#3473)
* [Foundation] Add missing NSLinguisticAnalysis category. Fixes 35009.
2018-02-16 16:21:47 +01:00
Rolf Bjarne Kvinge c838a11c4d
Merge pull request #3495 (Implement support for optimizing away the dynamic registrar) from rolfbjarne/full-static-registrar
Implement support for optimizing away the dynamic registrar.

* Add a new property (Runtime.DynamicRegistrationSupported) that indicates at
  runtime whether dynamic registration is available.

* Check this new property whenever we need dynamic registration.

* Add an optimization to mtouch/mmp that detects whether dynamic registration
  is required, and if not, changes Runtime.DynamicRegistrationSupported to
  return false.

* Add an optimization to mtouch/mmp that inlines
  Runtime.DynamicRegistrationSupported as a constant value.

The end result is that the linker will link away the dynamic registrar if
mtouch/mmp detects that it's not needed.

Benchmark
---------

I've compared the size of entire apps built for device:

|test                          | Before |  After |   Diff |     % |
|:-----------------------------|-------:|-------:|-------:|------:|
|[monotouch-test/Release][1]   | 95.7mb | 95.0mb | -680kb | -0.7% |
|[link sdk/Release][2]         | 21.2mb | 20.9mb | -245kb | -1.2% |
|[minimalistic app/Release][3] | 4.58mb | 4.32mb | -259kb | -5.7% |

[1]: https://gist.github.com/rolfbjarne/3871e36d2de8db1a8eee1d9f9276d3d2#monotouch-test-release-wall-optimizations-enabled
[2]: https://gist.github.com/rolfbjarne/3871e36d2de8db1a8eee1d9f9276d3d2#link-sdk
[3]: https://gist.github.com/rolfbjarne/3871e36d2de8db1a8eee1d9f9276d3d2#minimalistic-app
2018-02-15 23:56:00 +01:00
Alex Soto 47163efdb6
[Tests] Fixes CertificateTest for ios < 10 (#3500)
`SecKeyCopyAttributes` is iOS 10+ and is used by `GetAttributes`
2018-02-15 11:47:37 -06:00
Rolf Bjarne Kvinge 8d7f951ea3 [mmp] Don't support removal of the dynamic registrar for XM, it needs more work. 2018-02-15 10:24:31 +01:00
Rolf Bjarne Kvinge b4f0c8b729 [tests] Add test to ensure the dynamic registrar really is removed when we request it to be. 2018-02-15 10:24:30 +01:00
Rolf Bjarne Kvinge e4956ef2cf [ObjCRuntime] Look up managed types from the native class using information from the static registrar if possible. 2018-02-15 10:24:30 +01:00
Rolf Bjarne Kvinge 961878b80b [tests] Update tests to cope with removal of the dynamic registrar. 2018-02-15 10:24:30 +01:00
Vincent Dondain 9408eb081d
[security] Add new 'SecKey.GenerateKeyPair' overloads (#3438)
The new overloads allow to set `kSecPrivateKeyAttrs` and `kSecPublicKeyAttrs`.

Fixes bug #34135: Need some constants exposed in Xamarin.iOS binding
(https://bugzilla.xamarin.com/show_bug.cgi?id=34135)

The new APIs were created according to https://developer.apple.com/documentation/security/1395339-seckeygeneratepair?language=objc

Also add `GenerateKeyPairTest`.
2018-02-14 23:34:52 -05:00
Rolf Bjarne Kvinge 60a8731b35
Merge pull request #3462 from rolfbjarne/optimized-protocol-support
Add a 'register-protocols' optimization that:

Improves static registrar to:

* Generate a new table of protocol -> managed wrapper type. This is required
  to find the wrapper type without having the `[Protocol]` attribute around.

* Make the generated code implement protocols from [Adopts] attributes. This
  makes it possible to link away the `[Protocol]` attribute, because the
  native implementation of `conformsToProtocol:` does the right thing (we
  might even be able to link away our complete `ConformsToProtocol` logic when
  we remove the dynamic registrar).

Improves linker to:

* Not mark protocol interfaces by the mere virtue of having a type that
  implements them. This is implemented by not marking protocol interfaces when
  they're implementing a class, but instead when a method implementation is
  found to implement a method from a protocol interface.

* Mark the wrapper type for protocols (this allows us to remove the Protocol
  attribute, since that's the link between the protocol and its wrapper type).

* Remove the [Protocol], [ProtocolMember] and [Adopts] attributes (but only if
  optimizing protocols).

The static registrar still needs some of the information linked away, so a few
changes are required to make it available post linker.

Benchmark
---------

I've compared the size of entire apps built for device:

|test                          | Before |  After |   Diff |     % |
|:-----------------------------|-------:|-------:|-------:|------:|
|[monotouch-test/Debug][1]     |  101mb |  100mb | -888kb | -0.9% |
|[monotouch-test/Release][2]   | 99.2mb | 95.4mb | -830kb | -0.9% |
|[minimalistic app/Debug][3]   | 10.8mb | 10.4mb | -443kb | -4.1% |
|[minimalistic app/Release][4] |  4.7mb | 4.55mb | -157kb | -3.3% |

[1]: https://gist.github.com/rolfbjarne/0181ab8abe436c34cf4ee68ecfb8cd18#monotouch-test-debug
[2]: https://gist.github.com/rolfbjarne/0181ab8abe436c34cf4ee68ecfb8cd18#monotouch-test-release
[3]: https://gist.github.com/rolfbjarne/0181ab8abe436c34cf4ee68ecfb8cd18#minimal-xi-app-debug
[4]: https://gist.github.com/rolfbjarne/0181ab8abe436c34cf4ee68ecfb8cd18#minimal-xi-app-release
2018-02-14 17:47:31 +01:00
Rolf Bjarne Kvinge a6106fb3a6 [monotouch-test] Second attempt to find protocols available everywhere. 2018-02-14 14:29:06 +01:00
Rolf Bjarne Kvinge 2afed0342c [monotouch-test] Use protocols available in all platforms in ProtocolTest. 2018-02-14 09:35:25 +01:00
Rolf Bjarne Kvinge 3c0ba1b86a [tests] Fix typo. 2018-02-14 09:19:00 +01:00
Rolf Bjarne Kvinge 9e9e479ab2 [monotouch-test] Adjust new test to not try to reference IMDLComponent on watchOS (where it doesn't exist). 2018-02-14 01:11:44 +01:00
Manuel de la Pena 7472c8237d
[Foundation] Add not bound NSDateComponentUndefined. Fixes 60740 (#3471)
Added the value and provided tests that show the API usage. Value was
inferred from the headers:

NSDateComponentUndefined = NSIntegerMax
2018-02-13 20:38:24 +01:00
Rolf Bjarne Kvinge 1de94d444b [static registrar] Create a table of interface -> protocol in the static registrar.
Create a table of interface -> protocol in the static registrar, since we need
to be able to look up a protocol given a managed type without looking at the
(possibly linked away) [Protocol] attribute.
2018-02-13 19:38:35 +01:00
Rolf Bjarne Kvinge 0af9a6744d [xharness] Add a new test variation for xammac tests: release with all optimizations enabled. 2018-02-13 19:38:34 +01:00
Manuel de la Pena d0037ddc42
[Tests] Ensure that tests do not fail due to the locale. Fixes #3445 (#3448) 2018-02-09 21:14:57 +01:00
Manuel de la Pena 62480fb0e2
[Metal] If the device is not supported, skip certain tests. Fixes #3389 (#3444)
* [Metal] If the device is not supported, skip certain tests. Fixes #3389
2018-02-09 18:21:22 +01:00
Alex Soto 5bf7f0c542
[SceneKit] Adds NullAllowed to ISCNSceneRenderer.OverlayScene (#3410) (#3423)
Fixes xamarin/xamarin-macios#3392

It seems swift has this property listed as an optional[0] and
an Apple sample[1] sets this to null so `ISCNSceneRenderer.OverlayScene`
needs to have `[NullAllowed]` even if ObjC headers do not have
nullability information.

[0]: https://developer.apple.com/documentation/scenekit/scnscenerenderer/1524051-overlayskscene
[1]: https://github.com/xamarin/xamarin-macios/issues/3392
2018-02-07 15:02:30 -06:00
Alex Soto 8dbd20000c
[SceneKit] Adds NullAllowed to ISCNSceneRenderer.OverlayScene (#3410)
Fixes xamarin/xamarin-macios#3392

It seems swift has this property listed as an optional[0] and
an Apple sample[1] sets this to null so `ISCNSceneRenderer.OverlayScene`
needs to have `[NullAllowed]` even if ObjC headers do not have
nullability information.

[0]: https://developer.apple.com/documentation/scenekit/scnscenerenderer/1524051-overlayskscene
[1]: https://github.com/xamarin/xamarin-macios/issues/3392
2018-02-07 12:36:41 -06:00
Rolf Bjarne Kvinge 1a260e542b
[tests] Build the native test library for macOS and create a binding project for it. (#3373)
* [tests] Build the native test library for macOS and create a binding project for it.

Also add the new binding project to the xammac and link all XM test projects,
which allows us to stop excluding tests that require the native library and
the corresponding bindings.

* [tests] Include more tests in xammac_tests.

* [tests] Correctly ignore the ObjC exception tests in release mode.
2018-02-02 11:14:44 +01:00
Vincent Dondain 4c25aa94bd
[arkit] Update for Xcode 9.3 beta 1 (#3343)
- Obsolete `ARFaceAnchor`'s default constructor because it's marked as unavailable.
- Obsolete `CreateFaceGeometry` in `ARSCNFaceGeometry` in favor of `Create` (same as `ARSCNPlaneGeometry`).
2018-01-30 17:09:16 -05:00
Vincent Dondain 5cc720ff37
[backport][arkit] Fix 'Vertices', 'TextureCoordinates' and 'TriangleIndices' in 'ARFaceGeometry' (#3090) (#3342)
- Fixes bug #61056: [ARKit] TriangleIndices, Vertices and TextureCoordinates should be respectively short [], Vector3 [] and Vector2 []
(https://bugzilla.xamarin.com/show_bug.cgi?id=61056)
- Obsolete `short TriangleIndices`.
- Obsolete `Vector3 Vertices`.
- Obsolete `Vector2 TextureCoordinates`.
- Introduced new `short [] GetTriangleIndices ()`.
- Introduced new `Vector3 [] GetVertices ()`.
- Introduced new `Vector2 [] GetTextureCoordinates ()`.
2018-01-29 11:07:52 -05:00
Alex Soto a6204f2aa5
[Security] Update to Xcode 9.3 Beta 1 (#3344)
* [Security] Update to Xcode 9.3 Beta 1

Api diff:
- https://github.com/xamarin/xamarin-macios/wiki/Security-iOS-xcode9.3-beta1
- https://github.com/xamarin/xamarin-macios/wiki/Security-tvOS-xcode9.3-beta1
- https://github.com/xamarin/xamarin-macios/wiki/Security-watchOS-xcode9.3-beta1
- https://github.com/xamarin/xamarin-macios/wiki/Security-macOS-xcode9.3-beta1

* Update the xtro files

* Add SecCopyErrorMessageString binding
2018-01-27 16:26:43 -06:00
Sebastien Pouliot fdc70c6526
[tests] Adjust monotouch-test so it does not crash/fail on simulator and devices running 11.3 (#3319)
* Only skip broken tests when using Xcode9.3 SDK
2018-01-26 11:17:46 -05:00
Sebastien Pouliot d6dcbbf37f
[tests][macos] RoundtripRSAMinPKCS1 public/GetPublicKey should be false on 10.13 (#3116) (#3297) 2018-01-25 09:01:32 -05:00
Sebastien Pouliot ca06526793
[tests][monotouch] Remove the ignore on MPVolumeView added in xcode9 beta 3 - it seems to work fine now (#3284) 2018-01-23 08:27:18 -05:00
Sebastien Pouliot f5df902049
[foundation] Add NSBundle.GetLocalizedString returning an NSString. Fixes #41292 (#3266)
The original, now obsoleted, `LocalizedString` API returned a .net
`string` which does not work in most cases.

Different versions of iOS seems to return different (public or internal)
subclasses of `NSString` that are understood by other API (like NSString
`localizedStringWithFormat:`) for further customization.

Our logic to convert NSString to string is correct but it cannot
recreate the custom, required subclass to continue the localization.

So the new API return an `NSString` publicly (which is actually a
subclass) that can do the required job.

Adding a test in monotouch-test is presently blocked by #3265 [2]

[1] https://bugzilla.xamarin.com/show_bug.cgi?id=41292
[2] https://github.com/xamarin/xamarin-macios/issues/3265

* Add tests for new (and old) NSBundle API and adjust old ones since adding a Base.lproj directories changes things

* Add localization to xammac_tests since it shares the same, updated tests
2018-01-20 14:00:01 -05:00
Sebastien Pouliot 431cad0311
[tests] Confirm a device/sim support Metal before running MetalPerformanceShaders tests. Fixes #3237 (#3268) (#3270)
https://github.com/xamarin/xamarin-macios/issues/3237
2018-01-19 16:45:04 -05:00
Sebastien Pouliot dc7b19ce15
[tests] Confirm a device/sim support Metal before running MetalPerformanceShaders tests. Fixes #3237 (#3268)
https://github.com/xamarin/xamarin-macios/issues/3237
2018-01-19 11:21:21 -05:00
Sebastien Pouliot 761a382f01
[macos][mediatoolbox] Add a macOS specific API for XM (#3220)
- added unit test (not much to test)
- xtro data updated
2018-01-16 08:42:11 -05:00
Sebastien Pouliot d1d4446060
[CoreGraphics] Fix issue with the MakeMutable in CGPath where ref count was leaking. (#3228) (#3231) 2018-01-16 08:40:40 -05:00
Manuel de la Pena a52748277d [CoreGraphics] Fix issue with the MakeMutable in CGPath where ref count was leaking. (#3228) 2018-01-15 16:35:05 -05:00
Sebastien Pouliot 1c3c899933
[foundation] Reduce duplication inside NSData.FromString methods (#3221)
and ensure the temporary `NSString` instance is disposed asap.

Found will debugging something else. Unit tests added to confirm there
is no behavior change when the API are used.
2018-01-15 09:08:17 -05:00
Alex Soto 879a61faa7
[SceneKit] Add AddAnimation overload that takes a SCNAnimation (#3192)
Fixes xamarin/xamarin-macios#3166

Apple broke `addAnimation:forKey:` API by changing `CAAnimation` parameter into a
`ISCNAnimationProtocol` that was introduced in Xcode 9 (iOS 11 and company).

We can't break the existing API but we can add an extension method that
reuses the `CAAnimation` overload but takes a `SCNAnimation` and we
turn the `SCNAnimation` into a `CAAnimation` behind the scenes.

For XAMCORE_4_0 we corrected the protocol signature to take `ISCNAnimationProtocol` so there won't be a need for the extension method anymore.
2018-01-12 09:11:46 -06:00
Sebastien Pouliot 07c24949c0
[tests][macos] Enable more tests to be executed on macOS (XM) (#3191)
Largely related to somewhat recent frameworks/API additions to XM

ExternalAccessory was added to macOS 10.13 (Xcode9) and can't be run before that (including on the jenkins sierra bots). Also enable that test on tvOS (which added support in Xcode8)
2018-01-10 20:58:49 -05:00
Sebastien Pouliot f9ceb5c39d
[metalperformanceshaders] Fix MPSImageLanczosScale base class change (#3170)
Sadly this creates a breaking change since the `ScaleTransform`
property was re-introduced with an incorrect signature in the new
base class `MPSImageScale`

Unless someone has an idea how to avoid it (I don't see an option)
then we'll have to document it in the 15.7 release notes.

Also add missing _SetScaleTransform call and related unit tests
2018-01-09 12:03:18 -05:00
Timothy Risi 6ad9014c9f [Xammac_tests] RoundtripRSAMinPKCS1 public/GetPublicKey should be false on 10.13 (#3116) 2017-12-22 10:29:59 -05:00
Sebastien Pouliot 48530bcd8d
[tests][security] Update TrustTest to run faster (without timeouts) (#3108)
The original test was to cover both X509Certificate and X509Certiicate2
when using with SecTrust. However the code diverged over time. That and
the different certificates used caused the `*2` tests to hit a time
loop (designed to reduce incorrect errors randomly reported).

We want to keep the "delay" logic for it's intended purpose - but it
should not be needed normally.

The tests have been refactored to reuse the same logic (between both
types of certificates) which solve this (when used with the same
certificates)

Replace https://github.com/xamarin/xamarin-macios/pull/3068
2017-12-18 11:14:31 -05:00
Manuel de la Pena cb688be5c4
[CoreAnimation] Ensure that we increase the handle refenrece count in MakeMutable. Fixes #3089 (#3099)
* [CoreAnimation] Ensure that we increate the handle referene in MakeMutable. Fixes 3089

Fixes https://github.com/xamarin/xamarin-macios/issues/3089
2017-12-15 16:13:42 +01:00
Vincent Dondain 8899158260
[arkit] Fix 'Vertices', 'TextureCoordinates' and 'TriangleIndices' in 'ARFaceGeometry' (#3090)
- Fixes bug #61056: [ARKit] TriangleIndices, Vertices and TextureCoordinates should be respectively short [], Vector3 [] and Vector2 []
(https://bugzilla.xamarin.com/show_bug.cgi?id=61056)
- Obsolete `short TriangleIndices`.
- Obsolete `Vector3 Vertices`.
- Obsolete `Vector2 TextureCoordinates`.
- Introduced new `short [] GetTriangleIndices ()`.
- Introduced new `Vector3 [] GetVertices ()`.
- Introduced new `Vector2 [] GetTextureCoordinates ()`.
2017-12-12 12:33:48 -05:00
Vincent Dondain 18378d752e Fix merge mistake in monotouch-test.csproj 2017-12-06 15:18:11 -05:00
Vincent Dondain d7b7a6ea02 Merge branch 'xcode9.2' 2017-12-06 14:41:13 -05:00
Chris Hamons 4c966e3e71 Fix macOS 10.13 test failures (#3066) 2017-12-03 19:45:28 -05:00
Rolf Bjarne Kvinge 113e518d9d
[monotouch-test] Update permission checks. (#3071)
Apparently iOS 11 shows system dialogs for more API, so sprinkle permission
checks in more places.
2017-12-01 17:46:47 +01:00
Manuel de la Pena 6135a6c4d8
[MSBuild] Do not set CFBundleDevelopmentRegion if not present. (#2779)
* [MSBuild] Do not set CFBundleDevelopmentRegion if not present.

This is a complicated fix. This is a regression introduced by Apple.
CFLocaleCopyCurrent(), used in the iOS code, will return the value of
the application's CFBundleDevelopmentRegion Info.plist key if all of the
following conditions are true:

* CFBundleDevelopmentRegion is present in the Info.plist
* The CFBundleDevelopmentRegion language is in the list of preferred
languages on the iOS device, but isn't the first one
* There are no localized resources (i.e. no .lproj directory) in the app
for the first preferred locale

This differs from iOS 10 where the presence of the
CFBundleDevelopmentRegion key had no effect.

Note that if the CFBundleDevelopmentRegion key is not present at all,
CFLocaleCopyCurrent() always returns the first preferred locale as it
did in iOS 10.

We are adding the key by default in the plist of the applications which confuses users since they do not see the key in the .plist added by the template. This commit removes it to be more explicit and help users understand the behaviour.
2017-12-01 16:52:25 +01:00
Rolf Bjarne Kvinge 10c5bc10a9
[monotouch-test] Update permission checks. (#3067)
Apparently iOS 11 shows system dialogs for more API, so sprinkle permission
checks in more places.
2017-11-30 17:54:02 +01:00
Sebastien Pouliot e4cbbda64f
[tests] Disable CoreText/FontDescriptorTest on tvOS. Fixes #58929 (#3061)
Since tvOS 11 there's not a single font, on that platform, that
has the ligatures that the test verified.

Test remains enabled for other platforms.

reference:
https://bugzilla.xamarin.com/show_bug.cgi?id=58929
2017-11-29 09:10:25 -05:00
Alex Soto 74d2dcadfb
[tests] Fix introspection tests for macOS (#3054)
* [tests] Fix introspection tests for macOS

It seems that apple forgot to ship SSLSetALPNProtocols and SSLCopyALPNProtocols in macOS
there are already radars filled about this https://bugs.swift.org/browse/SR-6131
So this test will fail once Apple fixes this issue. when this happens we need to do two things, reenable
the API and reenable the [Get|Set]AlpnProtocols tests, the one insides 'StreamDefaults' for the mac.

* Implement feedback
2017-11-28 17:27:20 -06:00
Timothy Risi 87f9e23989 [MetalPerformanceShaders] Xcode 9 bindings (#3005)
* [MetalPerformanceShaders] Activate bindings for Xamarin.Mac and add n… (#2816)

* [MetalPerformaceShaders] Several MPSCnnKernel properties should be readonly (#2938)

The subclasses versions of the properties need Override, cannot be removed since it would break visibility for iOS 10

* Remove some [Model] attributes that sholdn't be needed

* Fix introspection test crashes

* More introspection fixes

* NN does not need to be PascalCased

Remove unneeded Models and BaseTypes

* PR Whitespace fixes and renamings

* Paste fail

* More fixes from PR comments

* [MPS] Adds new intro test, fixes ctors and xtro output

* Removes duplicated availability attributes.
* Removes obsoleted API from macOS since mps is new to it.
* Fixes xtro output.
* Adds missing API.
* Fixes parameterless ctors, some of them do not really work, found
  by our new intro test and disabled the one that seem to not make
  sense due to the presence of DesignatedInitializers.
* Fixes a selector typo.
* Adds new `ShouldNotExposeDefaultCtorTest` to intro.

ShouldNotExposeDefaultCtorTest
==============================

This test checks for types with a parameterless ctor that are subclasses
of `NSObject` and then cheks if the BaseType of said objects also expose
a parameterless ctor (all in .NET land), if this is not the case it reports
them and so they can manually audited. Also this test has the ability to
print alloc/init ObjC code by setting `genObjCTestCode` to `true` so you can
take this code into an Xcode project and easily tests the ctors.

It seems that xtro (sharpie) does not have a complete picture of when a ctor
must be exposed hence the hability to generate this code and manually test.

Right now this test is just enabled for MPS since it is the scope of this PR.
In the future it should be enabled for all other frameworks and the output be
manually audited.

* [MPS] Fixes premature collection possible in bindings (bug 59547) and implements feedback.

https://bugzilla.xamarin.com/show_bug.cgi?id=59547

* Fixes premature collection possible in bindings im MPSKernel.cs
* Fixes MPSImageHistogramTest from using deprecated API.
* Removes renamed selectors and typos from ApiSelectorTest and ApiTypoTest.

* [MPS] Reenable Copy API and DesignatedInitializer xtro feedback

* Implement more feedback

* More feedback
2017-11-28 14:29:05 -06:00
Sebastien Pouliot 4ad96b03fa
[security] Add bindings for Xcode 9 (#3043)
Also covers the missing enum value (added in xcode9) from
https://bugzilla.xamarin.com/show_bug.cgi?id=59278
2017-11-26 09:53:04 -05:00
Sebastien Pouliot f0915df335
[coreimage] Fix the pointer used in CIVector(nfloat[]) until the native call completes (#3038)
However there's a small window between the time we get a pointer
and the call to the native selector where the memory is not fixed.
During this time the GC can move the memory resulting in hard to
diagnose crashes.

Note: `initWithValues:count:` copies the provided memory so what
happens afterward is not an issue.
2017-11-24 09:55:11 -05:00
Sebastien Pouliot 9b7c33e9ca
[photos] Fix incorrect SDPHLivePhotoFrameProcessingBlock. Fixes #58227 (#3011)
The correct signature is a `ref NSError`, the bound API was missing the
`ref` and this required adding support to the generator.

Generated code diff:
https://gist.github.com/spouliot/3cdc7f8a40fe67a962ed9fefc2411d60

Bug: https://bugzilla.xamarin.com/show_bug.cgi?id=58227
2017-11-22 14:42:20 -05:00
Vincent Dondain 30a057ddc0
[CoreImage] Update filters for Xcode 9 (#2974)
- Fixes bug #57350: Review new CoreImage filters added in Xcode 9
(https://bugzilla.xamarin.com/show_bug.cgi?id=57350).
- Adds `AVCameraCalibrationData` and `CIBarcodeDescriptor` to `generator-filters`.
- Fixes `ApiCoreImageFiltersTest`'s `GenerateBinding` to use valid `[CoreImageFilterProperty]`.
- In `CheckManagedFilters` generate code of SuperClass when detected so it's easier to bind.
2017-11-16 16:38:14 -05:00
Rolf Bjarne Kvinge 171cf4987c
[monotouch-test] Tweak CalendarTest yet again. (#3015)
Hopefully third time's the charm...

Don't do date math (adding hours) to a local datetime, since DST *will* muddy
the waters and prove that 1=2.

Instead convert the date we want to calculate on to UTC, which should be DST-agnostic.

I've tested this by running the test for every hour during the next 10 years,
so that should cover mostly everything (although I'm still waiting for the
Delorean I ordered to be able to test both in the future and the past).

Previous attempts:

0442cdf9c0
5caddb3571

Should fix https://github.com/xamarin/maccore/issues/573.
2017-11-16 18:48:37 +01:00
Sebastien Pouliot f4fc3d0be0
[monotouch-test] Fix ContactStoreTest for watchOS (#3006)
Backport/merge of PR #306 to avoid random failures on bots.
Should fix https://github.com/xamarin/maccore/issues/577
2017-11-14 16:10:19 -05:00
Vincent Dondain 311fe265f8
[storekit] Fix SKCloudServiceSetupOptions strong dictionary's 'Action' (#2998)
- Fixes bug #59928: SKCloudServiceSetupViewController.LoadAsync() does not work correctly when passed an SKCloudServiceSetupOptions object instead of a manually-created NSDictionary
(https://bugzilla.xamarin.com/show_bug.cgi?id=59928)
2017-11-14 10:12:58 -05:00
Sebastien Pouliot 526160d12d [tests] Fix XM build for monotouch/xammac-tests 2017-11-07 22:45:31 -05:00
Sebastien Pouliot f702512483 [tests] Handle a 2nd case where ContactStoreTest.GetUnifiedContacts can fail on bots 2017-11-07 20:52:35 -05:00
Sebastien Pouliot e68acf1caa [tests] Handle possible access denied in ContactStoreTest.GetUnifiedContacts
For some reason this happens with the watchOS 4.2 simulator on our
Jenkins bots (but not locally for me).

The test is updated to ignore errors as depending on the sim default
content does not seems possible.
2017-11-07 15:35:10 -05:00
Sebastien Pouliot 93118069ee [tests] Fix monotouch-tests to execute without failure with xcode 9.2 beta 2 2017-11-07 14:48:16 -05:00
Rolf Bjarne Kvinge 5caddb3571
[monotouch-test] Fix regression in CalendarTest to not compare UTC and local time directly. (#2964)
In 0442cdf9c0 the `now` variable was changed to
be a UTC date, but unfortunately the code that compares it to a local date
(NSDate.Now) wasn't updated.

Only year/month/day values were compared, which meant the test would fail if
run when UTC and local time didn't represent the same date (and conversely
would pass if the UTC and local date was the same date, which is why the
changed did not fail the PR test run: the PR was tested during the 19 hours of
the day when EST and UTC represent the sam date).

Fix this by converting the UTC `now` to NSDate instead of using NSDate.Now.

This has the additional benefit of also fixing a (much smaller) race
condition: if midnight occurred just between calculating `now` and NSDate.Now,
the test would also fail.
2017-11-07 16:12:00 +01:00
Rolf Bjarne Kvinge 82e3aaf278
[monotouch-test] Move generated files out of the "all test files" wildcard. (#2958)
monotouch-test has a wildcard to automatically include new test files, but
this should not include generated files, because:

* The generated files are generated when needed, which means we can't rely on
  the wildcard to trigger their generation, because the wildcard won't find
  them before they exist, and as such msbuild won't detect that they're
  needed.
* This means the generated files must be listed separately, but in that case
  they shouldn't be found by the wildcard too, because that leads to:

    /Library/Frameworks/Mono.framework/Versions/5.4.0/lib/mono/msbuild/15.0/bin/Roslyn/Microsoft.CSharp.Core.targets(84,5): error MSB3105: The item "ObjCRuntime/TrampolineTest.generated.cs" was specified more than once in the "Sources" parameter.  Duplicate items are not supported by the "Sources" parameter.

So move the generated files to a different directory, so that the wildcard
doesn't find them.
2017-11-06 17:16:32 +01:00
Rolf Bjarne Kvinge 0442cdf9c0
[monotouch-test] Tweak CalendarTest to work when 1h = 2h due to DST change. (#2957)
At 2:00 AM on November 5h 2017, winter came to our bots in Boston.

This meant that between 2:00 and 3:00 AM, subtracting 1h from the current
time yielded a time difference of 2h.

This was caught by our observant tests:

    [FAIL] CalendarTest.DateComponentsTest :   b hour
        Expected: 1
        But was:  2

To avoid such issues next time this test happens to run during this single
hour of the entire year that causes problems, change the test to use time
calculcation using UTC instead.
2017-11-06 15:17:12 +01:00
Rolf Bjarne Kvinge acbfb063c5
[monotouch-test] Fix MDLVoxelArrayTest to allow for different index extents. (#2956)
This test fails on the bots:

	[FAIL] MDLVoxelArrayTest.BoundingBoxTest :   MaxX (M)
  Expected: -1.0f
  But was:  0.0f

For some unknown reason I'm not able to reproduce locally, but the actual
values look normal, so update the test to accept those as well.
2017-11-06 15:16:37 +01:00
Sebastien Pouliot 8baa15f6c3 [tests] Adjust new tests to build on XM too 2017-11-03 15:30:04 -04:00
Sebastien Pouliot 395feca0d9 Merge branch 'xcode9.1' into master-merge-xcode91-take2 2017-11-03 10:30:07 -04:00
Sebastien Pouliot 03b9d1759e
[security] Add RequestSharedWebCredential overload. Fixes #60423 (#2940)
* The original API was incorrect. Lack of documentation at binding time?
* Use a strong dictionary to expose the credentials

The fixed version cannot be unit tested since it popups an UI.

The test case attached to the bug report [1] can be used to verify it.

reference:
[1] https://bugzilla.xamarin.com/show_bug.cgi?id=60423
2017-11-02 14:54:39 -04:00
Sebastien Pouliot 5239f2528a Merge branch 'xcode9.1' into d15-5-xcode9.1 2017-10-31 23:31:00 -04:00
Sebastien Pouliot 16214f305b Revert "[MetalPerformanceShaders] Activate bindings for Xamarin.Mac and add n… (#2816)"
This reverts commit 531bafcfaa.
2017-10-31 17:17:54 -04:00
Timothy Risi 2926a13f7e
[test] Change monotouch-test and xammac_tests to use all .cs files in monotouch-test/ Fixes #60290 (#2930)
Exclude the registrar/trampoline generated files from xammac_tests
Remove CoreLocation.LocationTest since is covered by introspection
2017-10-31 08:09:21 -08:00
Rolf Bjarne Kvinge 33f8b8bc8f
[monotouch-test] CGColorSpace.CreateIccData is iOS 10+ only. (#2936) 2017-10-30 18:05:41 +01:00
Rolf Bjarne Kvinge 64c3ea2cae [monotouch-test] Fix 2 issues when running on iOS 9. (#2934)
* [monotouch-test][GameplayKit] GKAgent3D isn't available on iOS 9.

Fixes this test failure:

> [FAIL] GKAgent3DTest.RotationTest : ObjCRuntime.RuntimeException : Wrapper type 'GameplayKit.GKAgent3D' is missing its native ObjectiveC class 'GKAgent3D'.

* [monotouch-test][MPS] MPSImageHistogram.HistogramSizeForSourceFormat doesn't seem to work on iOS 9.

Calling MPSImageHistogram.HistogramSizeForSourceFormat seems to abort on iOS 9
due to invalid arguments no matter which pixel format I use:

> /BuildRoot/Library/Caches/com.apple.xbs/Sources/MetalImage/MetalImage-39.3/MetalImage/Filters/MIHistogram.mm:103: failed assertion `[MPSImageHistogram histogramSizeForSourceFormat:] unsupported texture format: 114'

So only call this method on iOS 10+.
2017-10-27 17:06:02 -04:00
Sebastien Pouliot 584da1da18 [uikit] UIAccessibility.RequestGuidedAccessSession completion handler is an ObjC block. Fix #59196 (#2917)
Reference:
https://bugzilla.xamarin.com/show_bug.cgi?id=59196
2017-10-24 16:47:10 -04:00
Sebastien Pouliot 523e95182e [foundation] Fix DateTime from NSDate seconds (decimal) precision loss when converting. Fix #32022 (#2916)
The explicit operator did all it's math using `long` (the internal
representation for DateTime) so the fractional part of the NSDate was
lost. E.g.

> original:  530499149.239266
> roundtrip: 530499149.0

However even when using `double` computations we're still losing some
precision - parts just can be held in the `long` (Ticks) representation
of DateTime.

> original:  530499149.239266
> roundtrip: 530499149.23927

Reference:
https://bugzilla.xamarin.com/show_bug.cgi?id=32022
2017-10-24 10:54:17 -04:00
Timothy Risi 531bafcfaa [MetalPerformanceShaders] Activate bindings for Xamarin.Mac and add n… (#2816) 2017-10-23 11:16:38 -08:00
Alex Soto 2f9a6ca4cd [CoreVideo] Adds API bindings from Xcode 9 Beta 1 to stable (#2902)
* [CoreViceo] Adds API bindings from Xcode 9 Beta 1 to stable

* implement feedback

* adds tests

* exclude watchos from Metal tests
2017-10-19 14:27:32 -05:00
Alex Soto edb7a03da5 [CoreMedia] Adds API bindings from Xcode 9 Beta 1 to stable (#2886)
* [CoreMedia] Adds API bindings from Xcode 9 Beta 1 to stable

* Bindings for CoreMedia API from Xcode 9 beta 1 to Stable
* Adds test for manual bindings of CMVideoFormatDescription HEVC APIs
* Fixed TODO of pending exposure of CMSampleBufferAttachmentSettings API
* Derived of the TODO renamed some internal keys inside CMSampleAttachmentKey
  static class in order for them to follow the [StrongDictionary] conventions
  to avoid uneccesary [Export] on StrongDictionary members. Also removed a
  #if !MONOMAC conditional in favour of [NoMac].

* implement feedback
2017-10-16 10:11:27 +02:00
Alex Soto aae179d008 [VideoToolbox] Adds bindings from Xcode 9 Beta 1 to Stable (#2859)
* [VideoToolbox] Adds bindings from Xcode 9 Beta 1 to Stable

* implement feedback and remove weak prefix that I forgot to change
2017-10-09 13:43:17 -05:00
Rolf Bjarne Kvinge 1a0f0b6903 [AudioToolbox] Free the right GCHandle when failing to create an InputAudioQueue. Fixes #59911. (#2852)
When we fail to create an InputAudioQueue, we need to free the local GCHandle
we previously created, not the instance GCHandle where we'd put the local
GCHandle in case of success.

This fixes bug #59911 to throw the correct (invalid parameter) exception (and
not leak the local GCHandle either).

https://bugzilla.xamarin.com/show_bug.cgi?id=59911
2017-10-06 20:02:43 +02:00
Rolf Bjarne Kvinge 5f6134bca3 [monotouch-test] Fix tests causing trouble for the AOT compiler. (#2846)
Fix tests causing trouble for the AOT compiler by not building those tests on
device (they're testing error conditions in the simulator, which means it's
acceptable to exclude these tests for device builds).

This fixes an AOT-compiler assert:

> * Assertion at /Users/builder/data/lanes/1381/d264709b/source/xamarin-macios/external/mono/mono/metadata/marshal.c:8497, condition `sig->param_count == invoke_sig->param_count + 1' not met

due to invalid [MonoPInvokeCallback] attributes.
2017-10-06 10:16:56 +02:00
Alex Soto aa2c533501 [ModelIO] Adds Xcode 9 Beta 1 to Stable API bindings (#2832)
* [ModelIO] Adds Xcode 9 Beta 1 to Stable API bindings

* implement feedback

* implement Tim's feedback
2017-10-05 20:32:25 +02:00
Timothy Risi 1595206541 [HealthKit] Bind Xcode 9 APIs (#2817)
* [HealthKit] Update to Xcode 9 GM

* Add new xcode 9 beta APIs

* Fix PR comments

Marking SyncVersion as an int based on SpeedySloth sample from Apple:

            guard let version = route.metadata?[HKMetadataKeySyncVersion] as? NSNumber else {
                print("Route does not have a sync version for route \(route)")
                return
            }

            if version.intValue == 1 {
                self.makeWorkoutRouteSlothy(workout: workout, route: route)
            }

* Didn't save after deleting the FIXME

* Fix build issue

* Fix introspection tests

* Add new enum values to HKQuantityType.ToKey

* QuantityTypeIdentifierTest needs xcode version check for new enum types
2017-10-05 07:48:53 +02:00
Rolf Bjarne Kvinge d264709b8d Change BlockLiteral.SetupBlock to keep a reference to the delegate passed as the trampoline. (#2822)
* Change BlockLiteral.SetupBlock to keep a reference to the delegate passed as the trampoline.

Change BlockLiteral.SetupBlock to keep a reference to the delegate passed as
the trampoline, so that it's safer for normal users (crashes due to incorrect
usage are rare and random, and as such they're also hard to track down).

Additionally introduce a BlockLiteral.SetupBlockUnsafe method, that still has
the old behavior, so that we can use it in our own (reviewed) code.

* [ObjCRuntime] Add some validation to BlockLiteral.SetupBlock.

* Use BlockLiteral.SetupBlockUnsafe instead of .SetupBlock

Use SetupBlockUnsafe in our own code, because we know our own code is using it
correctly (by passing a trampoline stored in a static field, so that the GC
doesn't free it).

* [tests] Fix xammac tests build.
2017-10-03 18:59:10 +02:00
Rolf Bjarne Kvinge dbb37b3e4f [CoreGraphics] Implement CoreGraphics bindings for Xcode 9. (#2812)
* [ios11-b1] CoreGraphics bindings

* Updated with feedback from Sebastien

* Fix build, optimize checks

* Add version information

* Address comments

* Tests

* Remove Apply code, add special code for typo

* [CoreGraphics] Add comma after last enum value.

* [CoreGraphics] No need to bind CGColorSpaceGetName.

* [CoreGraphics] Add new field in Xcode 9 beta 5.

* [CoreGraphics] Move kCGPDFContextAccessPermissions to the correct dictionary container and implement the corresponding manual code.

* [CoreGraphics] Adjust nullability acceptance based on new attributes for CGColorSpace.CreateCalibratedGray/RGB functions.

* [CoreGraphics] Bind CGColorSpaceCreateLab, introduced in Xcode 9 beta 5.

* [CoreGraphics] Adjust CGColorSpaceCreateWithICCData and CGColorSpaceCreateWithICCProfile bindings according to Xcode 9 beta 2.

Apple introduced CGColorSpaceCreateWithICCData in b1, and made
CGColorSpaceCreateWithICCProfile a typedef to CGColorSpaceCreateWithICCData.

Apple reversed the typedef in b2 (probably because it creates broken
executables when targetting earlier versions of macOS, since those executables
would use CGColorSpaceCreateWithICCData, which would not exist), and instead
made CGColorSpaceCreateWithICCProfile a normal deprecated method.

So copy this logic in our bindings: deprecate CreateICCProfile, and introduce
CreateICCProfile, with two overloads for NSData and CGDataProvider (since
that's what's accepted according to the documentation).

* [CoreGraphics] Add CGContextPDF constructors to make parity between different overloads.

There are two types of CGContextPDF constructors: the first argument is either
an NSUrl or a CGDataConsumer. Previously the NSUrl type had more overloads,
and also allowed a null CGRect for the second argument. With the overloads are
identical between the two types of CGContextPDF constructors.

Existing constructors:

	CGContextPDF (NSUrl, CGRect, CGPDFInfo)
	CGContextPDF (NSUrl, CGRect)
	CGContextPDF (NSUrl, CGPDFInfo)
	CGContextPDF (NSUrl)
	CGContextPDF (CGDataConsumer, CGRect, CGPDFInfo)

Added constructors:

	CGContextPDF (CGDataConsumer, CGRect)
	CGContextPDF (CGDataConsumer, CGPDFInfo)
	CGContextPDF (CGDataConsumer)

Additionally the code has been fixed to not throw NullReferenceExceptions if
null is passed for any of the values and instead pass on any null values to
the native `CGPDFContextCreate` method (since `CGPDFContextCreate`'s arguments
are all `__nullable`).

* [tests] Add and improve existing tests for new and some existing CoreGraphics API.

* Undo accidental whitespace noise.

* [tests] Remove random characters in assert message.

* [CoreGraphics] Improve argument exception messages in CGColorSpace according to review.

* [CoreGraphics] Use 'Icc' instead of 'ICC' for new API, and also make the change for XAMCORE_4_0.

* [CoreGraphics] Fix availability attribute for High Sierra.

* [tests] Update monotouch-test after API changes.
2017-10-02 12:02:41 +02:00
Vincent Dondain 9b7cc6cbbe [uikit] Add UIContentSizeCategoryCompareToCategory & UIContentSizeCat… (#2805)
- Fixes bug #59422: https://bugzilla.xamarin.com/show_bug.cgi?id=59422)
2017-09-29 12:13:53 -04:00
Rolf Bjarne Kvinge 67dbfbef4b [registrar] Don't verify the SDK for protocol members. Partially fixes #59617.
It's not needed, because protocol members don't end up in the registrar output
anyway (and would thus not prevent the registrar code from compiling).

Classes that implement any protocol members would still run into the SDK
check, so this should not prevent real problematic code from being reported
either.

https://bugzilla.xamarin.com/show_bug.cgi?id=59617
2017-09-28 17:39:06 +02:00
Rolf Bjarne Kvinge 05484c915f [registrar] Don't verify the SDK for protocol members, and fix the SDK check for other cases. Fixes #59617. (#2790)
* [registrar] Remove useless interface.

* [registrar] Don't store LinkContext in the static registrar when in can be fetched from the Target. Partially fixes #59617.

This avoids a problem where our code would store null because LinkContext
wasn't created yet when the static registrar instance was created.

This fixes the missing error from bug #59617.

https://bugzilla.xamarin.com/show_bug.cgi?id=59617

* [registrar] Don't verify the SDK for protocol members. Partially fixes #59617.

It's not needed, because protocol members don't end up in the registrar output
anyway (and would thus not prevent the registrar code from compiling).

Classes that implement any protocol members would still run into the SDK
check, so this should not prevent real problematic code from being reported
either.

https://bugzilla.xamarin.com/show_bug.cgi?id=59617

* [tests][mtouch] Fix tests after registrar changes.
2017-09-28 17:35:21 +02:00
Alex Soto d2415cae1f [CoreAnimation] CATextLayer.Alignment* strings should be CATextLayerAlignment enum / type. Fixes bug 59537 (#2723)
https://bugzilla.xamarin.com/show_bug.cgi?id=59537

Removes constants from `CATextLayer` (only for XAMCORE_4_0) and creates
two smart enums `CATextLayerTruncationMode` and `CATextLayerAlignmentMode`.
Also this introduces two new strong properties into CATextLayer class,
`TextTruncationMode` and `TextAlignmentMode` that takes the new enums
respectively, these new properties are meant to replace their
string counterparts `TruncationMode` and `AlignmentMode`.
2017-09-25 10:12:53 -04:00
Sebastien Pouliot 90bc97c35b [tests] Add a better version check for PR2733 GKAgent3D test (#2747) 2017-09-22 07:15:32 +02:00
Sebastien Pouliot 70728f507d [tests][monotouch] Fix GKAgent3D not to run before iOS 9 (#2733) (#2735) 2017-09-21 10:52:18 -04:00
Sebastien Pouliot 9bdb7643c9 [tests][monotouch] Fix GKAgent3D not to run before iOS 9 (#2733) 2017-09-20 22:19:57 -04:00
Sebastien Pouliot 91a53f73f2 Merge xcode9 into d15-4[-xi] (#2710)
* [FileProvider] Add Xcode 9 Beta 1, 2 & 3 Bindings (#2279)

* [FileProvider] Add Xcode 9 Beta 1 Bindings

* Better naming

* Feedback not related to BindAs

* [FileProvider] Removes BindAs, add manual code for it and updated to Beta 3

* [FileProvider] Implement feedback

* [CoreSpotlight] Updated spotlight bindings for xcode 9 beta 3. (#2193)

Updated spotlight bindings for xcode 9 beta 3.

* Fix warning caused by duplicate (#2354)

* [FileProviderUI] Add Xcode 9 Beta 1 to 3 bindings (#2356)

* Bump to Xcode 9 beta 4

* [arkit] ARLightEstimate does not conform to NSCopying anymore (fix unit test)

* [uikit] NSFileProviderExtension.ReparentItem got a new parameter in beta4 (fix unit test)

* [coreimage] CIImageAccumulator init returns nil in beta 4

There's no header change to mention `init` is not allowed but
it's not clear how this default initializer could be used.

Also make public some other API to construct this type (outside
of XM). It's not clear why there were `internal` as they are
(at least now) part of the header files.

* [photos] Add helpers when PHLivePhotoEditingOption/NSDictionary is null (to avoid ambiguous API) (#2360)

Adding a strongly typed `PHLivePhotoEditingOption` (a strongly typed
version of an `NSDictionary`) can cause a `CS0121` (call is ambiguous)
since using a `null` argument is common (only one option exist so far).

This PR adds overloads that makes the code nicer in such case, e.g.

before Xcode9:

> // null is used when no options are given
> _foo.SaveLivePhoto (output, null, completion);

current (Xcode 9)

> // casting required to remove ambiguity with PHLivePhotoEditingOption
> _foo.SaveLivePhoto (output, (NSDictionary)null, completion);

with this PR

> // no option, no argument
> _foo.SaveLivePhoto (output, completion);

The same applies to `PrepareLivePhotoForPlayback`.

* [tests] Disable/tweak two tests that breaks on (almost) all Xcode updates

Those tests were not added to validate xOS so just keep the parts
that helps us (without constantly checking back the new break flavor)

* Disable watchOS to check if this hides others issues

* [mapkit] Update for beta 4

* [coredata] Update for beta 4

* [wkwebkit] Update for beta 4

Note: WKWindowFeatures.h is not compiled (part of the framework umbrella)
and the `@interface WKWindowFeatures (WKPrivate)` sounds like it should
not have been exposed (it's all fields starting with `_`)

* [corelocation] Update for beta 4

* Revert "Disable watchOS to check if this hides others issues"

This reverts commit fed2249fa4.

* [tests] Disable watchOS from harness only. Workaround #58348

https://bugzilla.xamarin.com/show_bug.cgi?id=58348

* [spritekit] Update for beta 4 (#2368)

* [arkit] Update for beta 4 (#2370)

* Bump version before preview 3 (#2375)

* [generator] Fix smart enum FieldAttribute LibraryName generation (#2376)

This fix is needed by PDFKit because it is a remapped framework[0],
the current code generates incorrect FieldAttribute on smart enums
because it uses `fa.LibraryName` as first option and this causes
remmaped frameworks have incorrect LibraryName generated for example
if a Field uses `+CoreImage` as `LibraryName` the following incorrect
code is generated:

```
	[Field ("First", "+CoreImage")]
	internal unsafe static IntPtr First {
		get {
			fixed (IntPtr *storage = &values [0])
				return Dlfcn.CachePointer (Libraries.+CoreImage.Handle, "First", storage);
		}
	}
```

[0]: f5956d6cc1/src/generator.cs (L5985)

* [FinderSync] Update to beta 4 (#2377)

* [ImageIO] Update to Xcode 9 (#2353)

* [PhotosUI] Move macOS photosui bindings out of photos.cs into photosui.cs (#2358)

* [quicklook] Update up to beta 4 (#2374)

* [uikit] UIDragInteraction & UIDragInteractionDelegate (Xcode 9 b1,2,3) (#2357)

* [safariservices] Update up to beta 4 (#2380)

* [coreanimation] Update to beta 4 (#2382)

Apple removed (mistake?) some API in beta 1. Filed as rdar 33590997

Internal tracking in
https://trello.com/c/J8BDDUV9/86-33590997-coreanimation-quartzcore-api-removals

* [storekit] Update up to beta 4 (#2379)

* [CoreML] Update to Xcode 9 Beta 4 (#2387)

* [uikit] UICollectionView/UITableView Drag & Drop (Xcode 9 b1,2,3 & 4) (#2355)

* Update code after radar 32929318 and 32897776 are fixed in b4 (#2394)

* [xcode9 CoreAudio] New definitions from Beta1 to Beta3 (#2359)

* [Vision] Strongify VNBarcodeSymbology API, Fixes Bug 58512 (#2397)

* [Vision] Strongify VNBarcodeSymbology API, Fixes Bug 58512

https://bugzilla.xamarin.com/show_bug.cgi?id=58512

Created strong API (VNBarcodeSymbology) on the following properties

* VNDetectBarcodesRequest.SupportedSymbologies
* VNDetectBarcodesRequest.Symbologies
* VNBarcodeObservation.Symbology

* Remove modern C# because classic can't do it 😡

* [mediaplayer] Update up to beta 4 (#2388)

* [watchkit] Update to beta 4 (#2398)

* Bump Visual Studio for Mac max version (#2408)

* [coreimage] Add CIBarcodeDescriptor and enabled missing API for VNBarcodeObservation. Fix #58197 (#2411)

https://bugzilla.xamarin.com/show_bug.cgi?id=58197

* [uikit] Update UIFocus related APIs to Xcode 9 beta 4 (#2407)

* [uikit] Update UIFocus related APIs to Xcode 9 beta 4

* [uikit] Fixes based on comments

* [coreimage] CIImageAccumulator API fixes. Fix #58349 (#2412)

* Obsolete the default `init`;

* XM exposed some older APIs using `int` instead of `CIFormat`.
  This is fixed and old APIs are obsoleted;

* Both new & old APIs are now using `CIFormat` for both XI and XM.

https://bugzilla.xamarin.com/show_bug.cgi?id=58349

* [uikit] UIText drag & drop - up to Xcode 9 beta 4 (#2410)

* [uikit] UISplitView & UIStackView up to Xcode 9 beta 4 (#2425)

* Bump XI/XM versions before preview 4 (#2422)

* [PDFKit] Update to Xcode 9 Beta 1, 2, 3 & 4 (#2378)

* [PDFKit] Update to Xcode 9 Beta 1, 2, 3 & 4

* [PDFKit] Implement feedback

* [PDFKit] the forgotten enum

* [PDFKit] More feedback

* [PDFKit] Add Mac changes

* Missing change

* Fix test RectangleF VS CGRect

* Pass -Wunguarded-availability-new to quiet a new clang warning (#2424)

- https://bugzilla.xamarin.com/show_bug.cgi?id=58574

* [mtouch/mmp] Ignore warnings about unguarded code section with regards to availability. (#2441)

* [monotouch-test] Remove workaround for fixed Apple bug. (#2445)

* Bump to Xcode 9 beta 5. (#2447)

* Bump to Xcode 9 beta 5.

* [mmp] Disable the partial static registrar, because Apple's macOS SDK is broken.

> In file included from Xamarin.Mac.registrar.mobile.i386.m:1:
> In file included from ./Xamarin.Mac.registrar.mobile.i386.h:11:
> /Applications/Xcode9-beta5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.h:88:9: fatal error: 'AVFoundation/AVRouteDetector.h' file not found

https://bugzilla.xamarin.com/show_bug.cgi?id=58629

* [mmp] Fix partial static registrar removal.

* [CallKit] Update to Xcode 9 beta 5.

* [ARKit] ARPointCloud doesn't conform to NSCopying anymore in Xcode 9 beta 5.

* [ARKit] Update to Xcode 9 beta 5 enough to make tests happy.

* [CoreImage] Stub out new filters in Xcode 9 beta 5.

* [tests][monotouch] Simplify some MDLMesh asserts since values change a lot between OS versions.

* [mmp] Default to the dynamic registrar for release builds again, due to bug #58629.

https://bugzilla.xamarin.com/show_bug.cgi?id=58629

* [tests][introspection] CXCall started implementing NSCopying without saying so in the headers.

* Disable mmp static registrar tests due to 58629 for now

* [quicklook] Update to beta 5 (#2450)

* [photos] Update for beta 5 (#2452)

Also update some existing enum members were added in beta 1 on macOS

* [safariservices] Update for beta 5 (#2455)

* [mediaplayer] Update to beta 5 (#2456)

* [CoreLocation] Update Xcode 9 Beta 5 (#2453)

* [CoreML] Update to Xcode 9 Beta 5 (#2454)

* [Contacts] Update to Xcode 9 Beta 5 (#2451)

* [Vision] Update to Xcode 9 Beta 5 (#2458)

* [builds] Tell LLVM to stay away from newer macOS functions. (#2459)

Fixes this build problem on Sierra:

> ld: weak import of symbol '_futimens' not supported because of option: -no_weak_imports for architecture x86_64

This is a symbol that was (will be?) introduced in High Sierra.

Interestingly this only occurs if the Xcode 8.X Command Line Tools haven't
been manually installed.

Because if the Xcode 8.X Command Line Tools are installed, this happens:

1. llvm's configure script detects that 'futimens' is not usable.

2. llvm's configure script detects that 'futimens' is not usable, because
   xcrun sets SDKROOT=/ when calling clang.

    a. When the SDKROOT variable is set, clang passes '-syslibroot /usr/lib'
       to ld.
    b. When ld gets '-syslibroot /usr/lib', ld looks in '/usr/lib' for a
       library that contains 'futimens' in the OS itself, and since we're on
       Sierra, that fails to link.
    c. So when llvm's configure script creates a test program that checks if
       'futimens' is present, the program fails. This is correct, and makes
       llvm *not* use futimens.

3. xcrun sets SDKROOT=/ because /usr/share/current-os.sdk/Info.plist exists.
   If that file does not exist, then xcrun sets SDKROOT to Xcode9's macOS SDK
   (because that's what xcode-select reports).

    a. When SDKROOT is set to Xcode9's macOS SDK, the configure check for
       'futimens' succeeds, because the macOS 10.13 SDK contains that
       function.
    b. llvm happily uses 'futimens', and then the final link fails because
       we're using a symbol not available on all target platforms.

* [arkit] Update for Xcode 9 beta 5 - Part 1 (#2460)

* [tests] The container app for watchOS tests should be 64-bit. (#2463)

* [xharness] watchOS tests need to run in a clean environment. Works around #58348. (#2462)

https://bugzilla.xamarin.com/show_bug.cgi?id=58348

* [xharness] It watchOS tests don't need to be clean anymore. Fixes #58348. (#2473)

https://bugzilla.xamarin.com/show_bug.cgi?id=58348

* [uikit] UIView/UIScrollView/UIViewController up to Xcode 9 beta 5 (#2431)

- Add NSDirectionalEdgeInsets type.
- Includes DirectionalEdgeInsetsTest.

* [AudioToolbox] Update bindings to Xcode 9 beta3 (not later changes). (#2294)

* [xharness] Add a file existence check. (#2478)

Fixes this exception:

```
Harness exception for 'introspection': System.IO.FileNotFoundException: Could not find file '/Users/builder/Library/Logs/CoreSimulator/27618A4A-7E49-4BAB-8F77-FA938CE88682/system.log'.
File name: '/Users/builder/Library/Logs/CoreSimulator/27618A4A-7E49-4BAB-8F77-FA938CE88682/system.log'
at System.IO.__Error.WinIOError (System.Int32 errorCode, System.String maybeFullPath) [0x00207] in /private/tmp/source-mono-2017-04/bockbuild-2017-04/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/io/__error.cs:188
at System.IO.FileInfo.get_Length () [0x00038] in /private/tmp/source-mono-2017-04/bockbuild-2017-04/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/io/fileinfo.cs:171
at xharness.CaptureLog.StopCapture () [0x00021] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/xharness/Log.cs:252
at (wrapper remoting-invoke-with-check) xharness.CaptureLog:StopCapture ()
at xharness.AppRunner+<RunAsync>d__68.MoveNext () [0x0127f] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/xharness/AppRunner.cs:642
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /private/tmp/source-mono-2017-04/bockbuild-2017-04/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:151
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /private/tmp/source-mono-2017-04/bockbuild-2017-04/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /private/tmp/source-mono-2017-04/bockbuild-2017-04/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /private/tmp/source-mono-2017-04/bockbuild-2017-04/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128
at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in /private/tmp/source-mono-2017-04/bockbuild-2017-04/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:357
at xharness.RunSimulatorTask+<RunTestAsync>d__7.MoveNext () [0x0029d] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/xharness/Jenkins.cs:2894
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /private/tmp/source-mono-2017-04/bockbuild-2017-04/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:151
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /private/tmp/source-mono-2017-04/bockbuild-2017-04/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /private/tmp/source-mono-2017-04/bockbuild-2017-04/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /private/tmp/source-mono-2017-04/bockbuild-2017-04/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128
at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in /private/tmp/source-mono-2017-04/bockbuild-2017-04/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:113
at xharness.RunTestTask+<ExecuteAsync>d__8.MoveNext () [0x0010b] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/xharness/Jenkins.cs:2538
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /private/tmp/source-mono-2017-04/bockbuild-2017-04/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:151
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /private/tmp/source-mono-2017-04/bockbuild-2017-04/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /private/tmp/source-mono-2017-04/bockbuild-2017-04/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /private/tmp/source-mono-2017-04/bockbuild-2017-04/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128
at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in /private/tmp/source-mono-2017-04/bockbuild-2017-04/profiles/mono-mac-xamarin/build-root/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:113
at xharness.TestTask+<RunInternalAsync>d__87.MoveNext () [0x0010d] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/xharness/Jenkins.cs:1870
```

I'm not sure how this can happen, but it has on the bots [1].

[1] https://jenkins.mono-project.com/job/xamarin-macios-pr-builder/4548/Test_Report/

* Bump versions for preview 5 (#2479)

* [passkit] Update to beta 5 (#2481)

* [tests] Remove workaround for radar #32688391. (#2486)

* [replaykit] Update up to beta 5 (#2484)

* Bump maccore to get fix for bug #55064. (#2487)

* [apidiff] Update definition to new 10.12 (d15-3) stable release (#2490)

* [SceneKit] basic work (#2483)

* [coredata] Update to beta 5 (#2488)

* [homekit] Update for Xcode 9 beta 5 (#2492)

* [Foundation] Update for xcode9 (#2468)

* [Intents] Add bindings for Xcode 9 Beta 1, 2, 3, 4 & 5 (#2493)

* [Intents] Add bindings for Xcode 9 Beta 1, 2, 3, 4 & 5

* [Intents] Implement feedback

* [Intents] Add a generic version for INInteraction.GetParameterValue

* [Intents] Missing check

* [Contacts] Add missing foundation NSItemProviderWriting protocol to CNContact (#2496)

https://bugzilla.xamarin.com/show_bug.cgi?id=58203

This is available on all Contacts supported platforms

```
./iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/Contacts.framework/Headers/CNContact+NSItemProvider.h:@interface CNContact (NSItemProvider) <NSItemProviderReading, NSItemProviderWriting>
./iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/System/Library/Frameworks/Contacts.framework/Headers/CNContact+NSItemProvider.h:@interface CNContact (NSItemProvider) <NSItemProviderReading, NSItemProviderWriting>
./MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Contacts.framework/Headers/CNContact+NSItemProvider.h:@interface CNContact (NSItemProvider) <NSItemProviderReading, NSItemProviderWriting>
./WatchOS.platform/Developer/SDKs/WatchOS4.0.sdk/System/Library/Frameworks/Contacts.framework/Headers/CNContact+NSItemProvider.h:@interface CNContact (NSItemProvider) <NSItemProviderReading, NSItemProviderWriting>
./WatchSimulator.platform/Developer/SDKs/WatchSimulator4.0.sdk/System/Library/Frameworks/Contacts.framework/Headers/CNContact+NSItemProvider.h:@interface CNContact (NSItemProvider) <NSItemProviderReading, NSItemProviderWriting>
```

* [IntentsUI] Update to Xcode 9 Beta 1 & 2 (No changes on later betas) (#2497)

* [IntentsUI] Update to Xcode 9 Beta 1 & 2 (No changes on later betas)

* [IntentsUI] Better use a delegate instead so we have named params

* Bump versions before 6th preview (#2514)

* [arkit] Add missing MarshalDirective to ARPlaneAnchor (#2517)

- Fixes bug #58648: ARPlaneAnchor.Extent property seems incorrect but changes to correct value after Debug access
(https://bugzilla.xamarin.com/show_bug.cgi?id=58648)

* [xtro-sharpie] Fix a compiler warning. (#2516)

Fixes these warnings:

Runner.cs(197,5): warning CS0642: Possible mistaken empty statement
Runner.cs(199,5): warning CS0642: Possible mistaken empty statement
Runner.cs(201,5): warning CS0642: Possible mistaken empty statement
Runner.cs(203,5): warning CS0642: Possible mistaken empty statement
Runner.cs(205,5): warning CS0642: Possible mistaken empty statement

* [uikit] Update for Xcode 9 beta 5 - Part 3 (#2511)

- UIKeyCommand
- UINavigationBar
- UINavigationItem
- UIPasteboard
- UITableViewHeaderFooterView

* [xtro-sharpie] Remove xtro-plugin and misc other fixes. (#2522)

* [xtro-sharpie] Build with msbuild and be as quiet as requested when building.

* [xtro-sharpie] Must run as a 64-bit process, since the required native libraries are 64-bit.

* [xtro-sharpie] Add run configurations to the project file to ease debugging in the IDE.

* [xtro-sharpie] Remove xtro-plugin and the related commands.

This was needed when there wasn't a 64-bit mono, in order to run xtro-sharpie
in a 64-bit process.

Now there is a 64-bit mono, so it's not needed anymore.

Also improve makefile targets a bit, to auto-build stuff when needed, by
setting the right dependencies.

* Bump Xcode 9 to beta 6 (#2519)

Disable watchOS tests again
It seems like the Carousel crash from beta 4 is back to haunt us.
This was working fine with beta 5.

* Backport d15-3 SR2 fixes (#2515)

* [coredata] Update to beta 6 (#2528)

This seems to only revert some nullability changes from beta 5.

* [coreml] Update to beta 6 (#2531)

Fix our rdar 33643011 where additional setters were added in the headers
but did not exists.

* [videosubscriberaccount] Update to beta 6 (#2533)

Only b1 and b2 introduced some additions/changes

* [uikit] Update for Xcode 9 beta 6 - Part 4 (#2527)

The following headers are now up to date:

- UICollectionViewFlowLayout.h
- UIDocumentPickerViewController.h
- UIFontDescriptor.h
- UIImage.h
- UIImageView.h
- UIImagePickerController.h

* [xharness] Re-enable the watchOS tests. (#2534)

It works fine for me locally, so let's see what Jenkins says.

* [macos] Add new APIs in CoreWlan from Xcode9b3 (#2525)

* Update AppKit bindings based on radar 33271241 results (#2518)

* Update AppKit bindings based on radar 33271241 results

- The header comment was updated to note it was NSSliderTouchBarItem view that has the protocol

* Remove NSUserInterfaceCompression where not listed in header

* [vision] Update to beta 6 (#2532)

Removal of some deprecated (during beta) `init*` selectors.

Also sync the versions that were inlined in subclasses - the old
ones were not removed and the new ones were not added.

* [xtro-sharpie] Many methods don't have selectors in Clang's API, so default to the name if no selector. (#2523)

This makes a few more unclassified entries show up (mostly missing designated initializers): https://gist.github.com/rolfbjarne/07aa20f9b50b75bf3e69ac6a825e873a

* [macos] Add ExternalAccessory APIs from xcode9 (#2526)

* [58851] Disable NSMenuView in AllItemsWithNSMenuShouldAllowNull (#2504)

* [arkit] Update for Xcode 9 beta 5 - Part 2 (#2505)

- Add last missing selector.
- Add tests for manual code.

* [monotouch-test] Disable FontDescriptorTest.WithFeature (#2537)

Disabled because it looks like the tvOS font we use: "Gujarati Sangam MN"
does not have rare ligatures anymore (and the entire test is based on it).
Before getting an actual fix for that, let's disable the test so it doesn't break all current builds.
See: https://bugzilla.xamarin.com/show_bug.cgi?id=58929

* [xtro-sharpie] Teach xtro-sharpie about how to get protocol name from the ProtocolAttribute. (#2524)

Teach xtro-sharpie about how to get protocol name from the ProtocolAttribute
to calculate the native name for a TypeDefinition.

Unclassified changes: https://gist.github.com/rolfbjarne/828f8ee41eebb0a3b60a38d71822fe59

* [foundation/uikit] Inline NSItemProvider_UIKitAdditions in NSItemProvider (#2538)

As suggested here: https://github.com/xamarin/xamarin-macios/pull/2527#discussion_r134670981

* [intents] Fix breaking changes (api-diff) (#2543)

Additions of @required members inside `INSpeakable` cannot be `[Abstract]`

* [contacts] Fix breaking change (api-diff) (#2542)

Type Changed: Contacts.CNPostalAddress

Removed method:

	public static string LocalizeProperty (CNPostalAddressKeyOption option);

* [macos] Reenable static registrar since Xcode9b6 un-broke SDK headers (#2544)

- Fix a subtle spacing issues in PartialStaticLibrary property

* [corebluetooth] Update up to beta 6 and enable it on watchOS (#2540)

macOS 10.13 has finally catch up with iOS and this simplifies the
bindings a bit.

* [foundation] API fixes (apidiff) (#2545)

1. Let's not add new, already [Obsolete] API

Type Changed: Foundation.NSDimension

Added constructors:

	[Obsolete ("Not intended to be directly instantiated, this is an abstract class.")]
	public NSDimension ();

2. Fix inconsistently named API, e.g.

Type Changed: Foundation.NSAttributedString

Added properties:

	public static string[] ReadableTypeIdentifiersForItemProvider { get; }
	public static string[] WritableTypeIdentifiers { get; }

* [pdfkit] Do not add already [Obsolete] API in new profiles (#2547)

and ensure using the newer, correct API works cross-platforms

iOS (before)
	[Obsolete ("Use 'Find (string, NSStringCompareOptions)' instead.")]
	public virtual PdfSelection[] Find (string text, nint options);
	public PdfSelection Find (string text, PdfSelection selection, Foundation.NSStringCompareOptions compareOptions);

	[Obsolete ("Use 'Find (string, PdfSelection, NSStringCompareOptions)' instead.")]
	public virtual PdfSelection Find (string text, PdfSelection selection, nint options);
	public void FindAsync (string text, Foundation.NSStringCompareOptions compareOptions);

	[Obsolete ("Use 'FindAsync (string, NSStringCompareOptions)' instead.")]
	public virtual void FindAsync (string text, nint options);
	public void FindAsync (string[] text, Foundation.NSStringCompareOptions compareOptions);

	[Obsolete ("Use 'FindAsync (string [], NSStringCompareOptions)' instead.")]
	public virtual void FindAsync (string[] text, nint options);

iOS (after)
	public virtual PdfSelection[] Find (string text, Foundation.NSStringCompareOptions compareOptions);
	public virtual PdfSelection Find (string text, PdfSelection selection, Foundation.NSStringCompareOptions compareOptions);
	public virtual void FindAsync (string text, Foundation.NSStringCompareOptions compareOptions);
	public virtual void FindAsync (string[] text, Foundation.NSStringCompareOptions compareOptions);

* Bump versions for the 7th preview (#2541)

* Remove additions of AVKit removed in beta5 (#2536)

* NSUrlSessionTask should implement NSProgressReporting for iOS (#2548)

NSUrlSessionTask implements NSProgressReporting on iOS as well as Mac, so the #if MONOMAC isn't needed.

* Add missing availability attributes causing failures on older iOS versions (#2550)

* [vision] Minor fix wrt xtro (#2551)

including some things we need to ignore manually

!missing-field! VNVisionVersionNumber not bound
!missing-pinvoke! VNImagePointForFaceLandmarkPoint is not bound
!missing-pinvoke! VNNormalizedFaceBoundingBoxPointForLandmarkPoint is not bound

* [uikit] NSFileProviderMessaging was removed in beta 2. Fixes #58222 (#2552)

reference:
https://bugzilla.xamarin.com/show_bug.cgi?id=58222

* [uikit] Update for Xcode 9 - Part 5 (#2546)

Bindings for the following headers:
-  UIActivity.h
-  UIActivityItemProvider.h
-  UIAlertController.h
-  UIApplication.h
-  UIBarButtonItem.h
-  UIButton.h
-  UICollectionViewLayout.h
-  UIColor.h
-  UIControl.h
-  UIDocumentMenuViewController.h
-  UIFontMetrics.h
-  UIGestureRecognizer.h
-  UIGraphicsImageRenderer.h
-  UIInputViewController.h

* [CoreText] Fix an extraneous free in CTFont.GetDefaultCascadeList. (#2555)

We do not own the return value from CFArrayGetValueAtIndex, so don't say we do
when creating CTFontDescriptor instances, since that leads to angry dragons:

    2017-08-28 20:15:20.293 monotouchtest[33186:2311738] A_FontTest
    2017-08-28 20:15:20.294 monotouchtest[33186:2311738] 	[PASS] A_FontTest.CTFontCreateWithFontDescriptorAndOptions
    2017-08-28 20:15:20.295 monotouchtest[33186:2311738] 	[PASS] A_FontTest.CTFontCreateWithNameAndOptions
    2017-08-28 20:15:20.296 monotouchtest[33186:2311738] critical: Stacktrace:

    at <unknown> <0xffffffff>
    at (wrapper managed-to-native) CoreText.CTFont.CTFontCopyDefaultCascadeListForLanguages (intptr,intptr) [0x0000a] in <ae65a2b1eea242d2b68fe784749543bf>:0
    at CoreText.CTFont.GetDefaultCascadeList (string[]) [0x00013] in /work/maccore/xcode9/xamarin-macios/src/CoreText/CTFont.cs:2185
    at MonoTouchFixtures.CoreText.A_FontTest.GetCascadeList () [0x0001e] in /work/maccore/xcode9/xamarin-macios/tests/monotouch-test/CoreText/FontTest.cs:78
    at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) [0x0004f] in <7c58d77f8ca548d5b9b32e70a64ba2fd>:0
    at <unknown> <0xffffffff>
    at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&) [0x00016] in <7c58d77f8ca548d5b9b32e70a64ba2fd>:0
    at System.Reflection.MonoMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) [0x00032] in /work/maccore/xcode9/xamarin-macios/external/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:305
    at System.Reflection.MethodBase.Invoke (object,object[]) [0x00000] in /work/maccore/xcode9/xamarin-macios/external/mono/mcs/class/referencesource/mscorlib/system/reflection/methodbase.cs:229
    at NUnit.Framework.Internal.Reflect.InvokeMethod (System.Reflection.MethodInfo,object,object[]) [0x00009] in /work/maccore/xcode9/xamarin-macios/external/mono/external/nunit-lite/NUnitLite-1.0.0/src/framework/Internal/Reflect.cs:215
    at NUnit.Framework.Internal.Commands.TestMethodCommand.RunNonAsyncTestMethod (NUnit.Framework.Internal.TestExecutionContext) [0x00025] in /work/maccore/xcode9/xamarin-macios/external/mono/external/nunit-lite/NUnitLite-1.0.0/src/framework/Internal/Commands/TestMethodCommand.cs:116
    at NUnit.Framework.Internal.Commands.TestMethodCommand.RunTestMethod (NUnit.Framework.Internal.TestExecutionContext) [0x0001a] in /work/maccore/xcode9/xamarin-macios/external/mono/external/nunit-lite/NUnitLite-1.0.0/src/framework/Internal/Commands/TestMethodCommand.cs:90
    at NUnit.Framework.Internal.Commands.TestMethodCommand.Execute (NUnit.Framework.Internal.TestExecutionContext) [0x00000] in /work/maccore/xcode9/xamarin-macios/external/mono/external/nunit-lite/NUnitLite-1.0.0/src/framework/Internal/Commands/TestMethodCommand.cs:66
    at NUnit.Framework.Internal.Commands.SetUpTearDownCommand.Execute (NUnit.Framework.Internal.TestExecutionContext) [0x00007] in /work/maccore/xcode9/xamarin-macios/external/mono/external/nunit-lite/NUnitLite-1.0.0/src/framework/Internal/Commands/SetUpTearDownCommand.cs:84
    at NUnit.Framework.Internal.WorkItems.SimpleWorkItem.PerformWork () [0x00000] in /work/maccore/xcode9/xamarin-macios/external/mono/external/nunit-lite/NUnitLite-1.0.0/src/framework/Internal/WorkItems/SimpleWorkItem.cs:64
    at NUnit.Framework.Internal.WorkItems.WorkItem.RunTest () [0x00071] in /work/maccore/xcode9/xamarin-macios/external/mono/external/nunit-lite/NUnitLite-1.0.0/src/framework/Internal/WorkItems/WorkItem.cs:196
    at NUnit.Framework.Internal.WorkItems.WorkItem.Execute (NUnit.Framework.Internal.TestExecutionContext) [0x00063] in /work/maccore/xcode9/xamarin-macios/external/mono/external/nunit-lite/NUnitLite-1.0.0/src/framework/Internal/WorkItems/WorkItem.cs:136
    at NUnit.Framework.Internal.WorkItems.CompositeWorkItem.RunChildren () [0x00035] in /work/maccore/xcode9/xamarin-macios/external/mono/external/nunit-lite/NUnitLite-1.0.0/src/framework/Internal/WorkItems/CompositeWorkItem.cs:154
    at NUnit.Framework.Internal.WorkItems.CompositeWorkItem.PerformWork () [0x000de] in /work/maccore/xcode9/xamarin-macios/external/mono/external/nunit-lite/NUnitLite-1.0.0/src/framework/Internal/WorkItems/CompositeWorkItem.cs:93
    at NUnit.Framework.Internal.WorkItems.WorkItem.RunTest () [0x00071] in /work/maccore/xcode9/xamarin-macios/external/mono/external/nunit-lite/NUnitLite-1.0.0/src/framework/Internal/WorkItems/WorkItem.cs:196
    at NUnit.Framework.Internal.WorkItems.WorkItem.Execute (NUnit.Framework.Internal.TestExecutionContext) [0x00063] in /work/maccore/xcode9/xamarin-macios/external/mono/external/nunit-lite/NUnitLite-1.0.0/src/framework/Internal/WorkItems/WorkItem.cs:136
    at NUnit.Framework.Internal.WorkItems.CompositeWorkItem.RunChildren () [0x00035] in /work/maccore/xcode9/xamarin-macios/external/mono/external/nunit-lite/NUnitLite-1.0.0/src/framework/Internal/WorkItems/CompositeWorkItem.cs:154
    at NUnit.Framework.Internal.WorkItems.CompositeWorkItem.PerformWork () [0x000de] in /work/maccore/xcode9/xamarin-macios/external/mono/external/nunit-lite/NUnitLite-1.0.0/src/framework/Internal/WorkItems/CompositeWorkItem.cs:93
    at NUnit.Framework.Internal.WorkItems.WorkItem.RunTest () [0x00071] in /work/maccore/xcode9/xamarin-macios/external/mono/external/nunit-lite/NUnitLite-1.0.0/src/framework/Internal/WorkItems/WorkItem.cs:196
    at NUnit.Framework.Internal.WorkItems.WorkItem.Execute (NUnit.Framework.Internal.TestExecutionContext) [0x00063] in /work/maccore/xcode9/xamarin-macios/external/mono/external/nunit-lite/NUnitLite-1.0.0/src/framework/Internal/WorkItems/WorkItem.cs:136
    at NUnit.Framework.Internal.WorkItems.CompositeWorkItem.RunChildren () [0x00035] in /work/maccore/xcode9/xamarin-macios/external/mono/external/nunit-lite/NUnitLite-1.0.0/src/framework/Internal/WorkItems/CompositeWorkItem.cs:154
    at NUnit.Framework.Internal.WorkItems.CompositeWorkItem.PerformWork () [0x000de] in /work/maccore/xcode9/xamarin-macios/external/mono/external/nunit-lite/NUnitLite-1.0.0/src/framework/Internal/WorkItems/CompositeWorkItem.cs:93
    at NUnit.Framework.Internal.WorkItems.WorkItem.RunTest () [0x00071] in /work/maccore/xcode9/xamarin-macios/external/mono/external/nunit-lite/NUnitLite-1.0.0/src/framework/Internal/WorkItems/WorkItem.cs:196
    at NUnit.Framework.Internal.WorkItems.WorkItem.Execute (NUnit.Framework.Internal.TestExecutionContext) [0x00063] in /work/maccore/xcode9/xamarin-macios/external/mono/external/nunit-lite/NUnitLite-1.0.0/src/framework/Internal/WorkItems/WorkItem.cs:136
    at MonoTouch.NUnit.UI.BaseTouchRunner.Run (NUnit.Framework.Internal.Test) [0x0004d] in /work/maccore/xcode9/xamarin-macios/external/Touch.Unit/NUnitLite/TouchRunner/TouchRunner.cs:442
    at MonoTouch.NUnit.UI.BaseTouchRunner.Run () [0x00030] in /work/maccore/xcode9/xamarin-macios/external/Touch.Unit/NUnitLite/TouchRunner/TouchRunner.cs:171
    at MonoTouch.Dialog.StringElement.Selected (MonoTouch.Dialog.DialogViewController,UIKit.UITableView,Foundation.NSIndexPath) [0x00008] in /work/maccore/xcode9/xamarin-macios/external/MonoTouch.Dialog/MonoTouch.Dialog/Elements.cs:765
    at MonoTouch.Dialog.DialogViewController.Selected (Foundation.NSIndexPath) [0x00026] in /work/maccore/xcode9/xamarin-macios/external/MonoTouch.Dialog/MonoTouch.Dialog/DialogViewController.cs:577
    at MonoTouch.Dialog.DialogViewController/Source.RowSelected (UIKit.UITableView,Foundation.NSIndexPath) [0x00016] in /work/maccore/xcode9/xamarin-macios/external/MonoTouch.Dialog/MonoTouch.Dialog/DialogViewController.cs:402
    at (wrapper runtime-invoke) <Module>.runtime_invoke_void__this___object_object (object,intptr,intptr,intptr) [0x0005d] in <32f0c196c5bc4aa18daea2ee64a7814e>:0
    at <unknown> <0xffffffff>
    at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain (int,string[],intptr,intptr) [0x0005c] in <ae65a2b1eea242d2b68fe784749543bf>:0
    at UIKit.UIApplication.Main (string[],intptr,intptr) [0x00005] in /work/maccore/xcode9/xamarin-macios/src/UIKit/UIApplication.cs:79
    at UIKit.UIApplication.Main (string[],string,string) [0x00038] in /work/maccore/xcode9/xamarin-macios/src/UIKit/UIApplication.cs:63
    at monotouchtest.Application.Main (string[]) [0x00011] in /work/maccore/xcode9/xamarin-macios/tests/monotouch-test/Main.cs:27
    at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) [0x00051] in <30a7f7e09de9467b8b454221034a0e38>:0

    Native stacktrace:

    0   monotouchtest                       0x000000010fca03c4 mono_handle_native_crash + 244
    1   monotouchtest                       0x000000010fcadd30 mono_sigsegv_signal_handler + 288
    2   libsystem_platform.dylib            0x000000011feb3b3a _sigtramp + 26
    3   CoreFoundation                      0x000000011de035a2 computeSanitizedString + 146
    4   CoreText                            0x00000001168df314 _ZN15TPurgeableCache19RetainedValueForKeyEPKv + 54
    5   CoreText                            0x00000001168def85 _ZNK17TDescriptorSource22CopyDescriptorUncachedEPK7__CFURLbPK10__CFString + 55
    6   CoreText                            0x00000001168df34f _ZNK17TDescriptorSource14CopyDescriptorEPK7__CFURLbPK10__CFString + 27
    7   CoreText                            0x00000001168e20ad _ZNK17TDescriptorSource35CopyFontDescriptorPerPostScriptNameEPK10__CFStringmm + 297
    8   CoreText                            0x00000001168dfd9e _ZNK17TDescriptorSource30CopySystemFontDescriptorByNameEPK10__CFString10UIFontFlag + 54
    9   CoreText                            0x00000001168e54c4 _ZNK14TFontFallbacks17CopyFontFallbacksEPK10__CFStringS2_PK9__CFArray + 652
    10  CoreText                            0x00000001168e4a00 _ZNK14TFontFallbacks29CopyFontFallbacksForLanguagesEPK10__CFStringPK9__CFArray + 122
    11  CoreText                            0x00000001168e4971 _ZN17TDescriptorSource39CopyDefaultSubstitutionListForLanguagesEPK10__CFStringPK9__CFArray + 61
    12  CoreText                            0x00000001169397a7 _ZNK9TBaseFont28CreateSystemDefaultFallbacksEPK10__CFStringPK9__CFArray + 51
    13  CoreText                            0x000000011693999c _ZNK9TBaseFont15CreateFallbacksE10UIFontFlagPPK16__CFCharacterSetPK9__CFArray + 346
    14  CoreText                            0x00000001168c1036 _ZNK5TFont24CreateDefaultCascadeListEPK9__CFArray + 242
    15  CoreText                            0x00000001168b8ff9 CTFontCopyDefaultCascadeListForLanguages + 97
    16  ???                                 0x0000000140eaefd3 0x0 + 5384105939
    17  ???                                 0x0000000140eae761 0x0 + 5384103777
    18  ???                                 0x000000013c9c8e74 0x0 + 5311860340
    19  monotouchtest                       0x000000010fcb0c89 mono_jit_runtime_invoke + 1273
    20  monotouchtest                       0x000000010fd6e3a8 do_runtime_invoke + 88
    21  monotouchtest                       0x000000010fd71bac mono_runtime_try_invoke_array + 1292
    22  monotouchtest                       0x000000010fd15587 ves_icall_InternalInvoke + 647
    23  ???                                 0x000000013e9fcd13 0x0 + 5345627411
    24  ???                                 0x000000013e9fc738 0x0 + 5345625912
    25  ???                                 0x000000013e9fded5 0x0 + 5345631957
    26  ???                                 0x000000013e9fbb76 0x0 + 5345622902
    27  ???                                 0x000000013e9e237e 0x0 + 5345518462
    28  ???                                 0x000000013e9e237e 0x0 + 5345518462
    29  ???                                 0x000000013e9e237e 0x0 + 5345518462
    30  ???                                 0x000000013e9e237e 0x0 + 5345518462
    31  ???                                 0x000000013e873006 0x0 + 5344014342
    32  monotouchtest                       0x000000010fcb0c89 mono_jit_runtime_invoke + 1273
    33  monotouchtest                       0x000000010fd6e3a8 do_runtime_invoke + 88
    34  monotouchtest                       0x000000010fd6e320 mono_runtime_invoke + 208
    35  monotouchtest                       0x000000010fe71af1 xamarin_invoke_trampoline + 5617
    36  monotouchtest                       0x000000010fe79ddd xamarin_arch_trampoline + 189
    37  monotouchtest                       0x000000010fe7b1a1 xamarin_x86_64_common_trampoline + 110
    38  UIKit                               0x0000000111b9876b -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] + 1810
    39  UIKit                               0x0000000111b98986 -[UITableView _userSelectRowAtPendingSelectionIndexPath:] + 344
    40  UIKit                               0x0000000111a6b5c9 _runAfterCACommitDeferredBlocks + 318
    41  UIKit                               0x0000000111a59dad _cleanUpAfterCAFlushAndRunDeferredBlocks + 280
    42  UIKit                               0x0000000111a89f68 _afterCACommitHandler + 137
    43  CoreFoundation                      0x000000011de3ddb7 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
    44  CoreFoundation                      0x000000011de3dd0e __CFRunLoopDoObservers + 430
    45  CoreFoundation                      0x000000011de22324 __CFRunLoopRun + 1572
    46  CoreFoundation                      0x000000011de21a89 CFRunLoopRunSpecific + 409
    47  GraphicsServices                    0x0000000121b7e9c6 GSEventRunModal + 62
    48  UIKit                               0x0000000111a5f7d0 UIApplicationMain + 159
    49  ???                                 0x000000013c9c4474 0x0 + 5311841396
    50  ???                                 0x000000013c9c40ad 0x0 + 5311840429
    =================================================================
    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.
    =================================================================

* [monotouch-test] Don't subclass MKMapView. (#2556)

MKMapView doesn't like being subclassed (Apple says "you should not subclass the MKMapView class itself").

Bad things like this starts happening:

    Thread 0 name:  tid_303  Dispatch queue: com.apple.main-thread
    Thread 0 Crashed:
    0   libsystem_kernel.dylib        	0x0000000186b25348 __pthread_kill + 8
    1   libsystem_pthread.dylib       	0x0000000186c39354 pthread_kill$VARIANT$mp + 396
    2   libsystem_c.dylib             	0x0000000186a94fd8 abort + 140
    3   monotouchtest                 	0x0000000101c02c14 mono_handle_native_crash + 22047764 (mini-exceptions.c:2548)
    4   monotouchtest                 	0x0000000101c0d02c mono_sigsegv_signal_handler + 22089772 (mini-runtime.c:2886)
    5   libsystem_platform.dylib      	0x0000000186c33b60 _sigtramp + 52
    6   CoreFoundation                	0x0000000186f93108 cow_cleanup + 112
    7   CoreFoundation                	0x0000000186f93108 cow_cleanup + 112
    8   CoreFoundation                	0x0000000186eda51c -[__NSArrayM dealloc] + 68
    9   CoreFoundation                	0x000000018703f5c8 __CFBasicHashDrain + 312
    10  CoreFoundation                	0x0000000186fb5b44 _CFRelease + 224
    11  CoreText                      	0x000000018a808404 TDescriptorSource::PurgeFontFallbacksCache+ 488452 () + 92
    12  CoreText                      	0x000000018a808374 TDescriptorSource::PurgeFromCaches+ 488308 (__CFURL const*) const + 176
    13  CoreText                      	0x000000018a7eec74 CTFontRemoveFromCaches + 168
    14  VectorKit                     	0x0000000196a539b0 +[VKSharedResourcesManager removeResourceUser:] + 324
    15  VectorKit                     	0x0000000196ca27a4 md::MapEngine::~MapEngine+ 2643876 () + 360
    16  VectorKit                     	0x0000000196ca2634 md::MapEngine::~MapEngine+ 2643508 () + 12
    17  libobjc.A.dylib               	0x000000018651eef4 object_cxxDestructFromClass+ 28404 (objc_object*, objc_class*) + 148
    18  libobjc.A.dylib               	0x000000018652c638 objc_destructInstance + 88
    19  libobjc.A.dylib               	0x000000018652c690 object_dispose + 16
    20  QuartzCore                    	0x000000018afca3ac -[CALayer dealloc] + 116
    21  VectorKit                     	0x0000000196a43294 -[VKMapView dealloc] + 940
    22  QuartzCore                    	0x000000018af6aafc CA::release_objects+ 744188 (X::List<void const*>*) + 32
    23  QuartzCore                    	0x000000018afd97d8 CA::Layer::~Layer+ 1198040 () + 276
    24  QuartzCore                    	0x000000018afca37c -[CALayer dealloc] + 68
    25  QuartzCore                    	0x000000018af6b16c CA::Transaction::commit+ 745836 () + 1052
    26  UIKit                         	0x0000000190393290 _afterCACommitHandler + 256
    27  CoreFoundation                	0x0000000186fb38b8 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
    28  CoreFoundation                	0x0000000186fb1270 __CFRunLoopDoObservers + 412
    29  CoreFoundation                	0x0000000186fb182c __CFRunLoopRun + 1292
    30  CoreFoundation                	0x0000000186ed22d8 CFRunLoopRunSpecific + 436
    31  GraphicsServices              	0x0000000188d58f84 GSEventRunModal + 100
    32  UIKit                         	0x000000019040427c UIApplicationMain + 208
    33  monotouchtest                 	0x000000010106eb90 wrapper_managed_to_native_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr + 9907088 (/<unknown>:1)
    34  monotouchtest                 	0x0000000100f0d6ac UIKit_UIApplication_Main_string___intptr_intptr + 8459948 (UIApplication.cs:79)
    35  monotouchtest                 	0x0000000100f0d66c UIKit_UIApplication_Main_string___string_string + 8459884 (UIApplication.cs:63)
    36  monotouchtest                 	0x0000000100b10450 monotouchtest_Application_Main_string__ + 4277328 (Main.cs:27)
    37  monotouchtest                 	0x0000000100e0c244 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 244
    38  monotouchtest                 	0x0000000101c10048 mono_jit_runtime_invoke + 22102088 (mini-runtime.c:2526)
    39  monotouchtest                 	0x0000000101c75eec do_runtime_invoke + 22519532 (object.c:2829)
    40  monotouchtest                 	0x0000000101c78a3c do_exec_main_checked + 22530620 (object.c:4623)
    41  monotouchtest                 	0x0000000101bf9a1c mono_jit_exec + 22010396 (driver.g.c:1040)
    42  monotouchtest                 	0x0000000101d13d60 xamarin_main + 23166304 (monotouch-main.m:482)
    43  monotouchtest                 	0x00000001007de710 main + 927504 (main.m:67)
    44  libdyld.dylib                 	0x00000001869f656c start + 4

* [introspection] Let SkipDueToAttributeInProperty skip setters too (#2557)

`SkipDueToAttributeInProperty` which is used to check the availability attribute of properties
when the Availability info only exist on the property and not on the property Getter or Setter was wrong.
This lead to `setSpringLoaded` (which was introduced in iOS 11) to not be ignored by the test (making it fail).

- Fix bug #59085: [introspection-ios] selector not found for UIKit.UIBarButtonItem : setSpringLoaded: - Broken test
(https://bugzilla.xamarin.com/show_bug.cgi?id=59085)

* [corevideo][watchos] Enable CoreVideo on watchOS (#2553)

* [storekit] Fix CampaignToken typo (#2559) (#2560)

- Fixes bug #59078: StoreProductParameters and invalid property for CampaignToken
(https://bugzilla.xamarin.com/show_bug.cgi?id=59078)

* [coreml][watchos] Enable API using CoreVideo on watchOS. Fix #58097 (#2561)

https://bugzilla.xamarin.com/show_bug.cgi?id=58097

* Add missing [MarshalDirective] attributes. (#2558)

* [bindings-generator] Improve build & project file.

* Add missing [MarshalDirective] attributes.

Add missing [MarshalDirective] attributes, which also requires implementing
support for out parameters in the binding generator, since one of the
signatures missing the [MarshalDirective] contains such an out parameter.

Also add tests for all the API I've added [MarshalDirective] to.

* [bindings-generator] Remove redundant if check.

* [monotouch-test] Rename file to end with 'Test.cs'.

* [tests] Fix a few build errors for Xamarin.Mac.

* [uikit] Fix UIColor and UIInputViewController tvOS availability (#2569)

- Fixes introspection tests on tvOS 10.

* [storekit] Fix SKCloudServiceSetupMessageIdentifier and SKProductStorePromotionController tvOS availability (#2568)

- Fixes introspection tests on tvOS 10.

* [mapkit] Fix MKMapItemTypeIdentifier tvOS availability (#2566)

- Also remove double [Mac] availability attribute.
- Fixes introspection tests on tvOS 10.

* [ARKit] Fix marshalling for ARPointCloud.RawFeaturePoints. (#2565)

ARPointCloud.RawFeaturePoints is an array of Vector3, but each vector is
16-byte aligned (as if it were an array of Vector4).

This means we need to account for this when creating a managed array from
pointer to the native C-style array.

* [ModelIO] Fix MDLVoxelIndexExtent struct. (#2564)

The MDLVoxelIndexExtent is a struct containing two 4-dimensional vectors of
integers (not floats, as originally and incorrectly implemented).

Fix this my creating a new MDLVoxelIndexExtent2 struct with the right fields,
re-implement all the API that exposes this struct and obsolete the old API.

Also add missing [MarshalDirective] attributes.

And write a test to make sure it works fine now and forever.

* [coredata] Enable new fields since rdar #33878590 is fixed w/beta 6 (#2570)

reference:
https://trello.com/c/dlSRYPFx

* [xtro-sharpie] Add a Simd check class to verify signatures with Simd types.

* [Simd] Add simd matrix types.

The OpenTK matrices (Matrix2/3/4) has a different memory layout than Apple's
matrix_float2x2/matrix_float3x3/matrix_float4x4 matrices: the OpenTK versions
are row-major, while Apple's versions are column-major.

This means that when blitting memory from one to the other, the matrix will
appear to have been transposed.

See bug #[58599][2] for an example.

Unfortunately we've already bound several API with Apple's matrix_floatXxX
matrices using OpenTK's matrices, and although they're bound wrong, and the
matrices appear transposed on input/output, we can't change the behavior
because we have to maintain compatibility.

This means we have to introduce new API, and then also just define new matrix
types with the right memory layout (column-major). Additionally, in the future
we might be able to mark these matrices as Simd-matrixes, so that the JIT/AOT
compiler can generate the correct alignment for them, avoiding having to
define a native conversion method (using the [MarshalDirective] hack).

The matrices have been designed to match API-wise the matrices in the
System.Numerics.Vectors namespace [1], but for the moment with only a few
basic operations implemented (Determinant/Transpose/Multiply) defined (we can
always add more later if we want to).

In addition explicit conversion operators to and from the corresponding
OpenTK.MatrixX are implemented, which means any operation defined in the
OpenTK matrices can be used by converting back and forth.

[1]: https://msdn.microsoft.com/en-us/library/system.numerics.matrix4x4(v=vs.111).aspx
[2]: https://bugzilla.xamarin.com/show_bug.cgi?id=58599

* [ARKit] Use the new Simd matrix types.

* [Vision] Use the new Simd matrix types.

* [ModelIO] Use the new Simd-compatible matrix types, and deprecate the old API.

* [GameplayKit] Use the new Simd-compatible matrix types, and deprecate the old API.

* [SpriteKit] Use the new Simd-compatible matrix types, and deprecate the old API.

* [xtro] Don't report missing [MarshalDirective] for obsolete methods.

* [xtro] Remove unnecessary ignores.

The implementation changed, and these stayed accidentally.

* [wkwebkit] Fix (native) protocol names (#2572)

Also ignore xtro's WKSnapshotConfiguration since it's an Apple bug 34185961

reference (xtro)
!missing-protocol! WKURLSchemeHandler not bound
!missing-protocol! WKURLSchemeTask not bound
!unknown-protocol! WKUrlSchemeHandler bound
!unknown-protocol! WKUrlSchemeTask bound

!unknown-type! WKSnapshotConfiguration bound

* [uikit] Fix enums availability attributes (#2575)

- Fixes bug #59132: [uikit] Extra types in watchOS
(https://bugzilla.xamarin.com/show_bug.cgi?id=59132)

* [watchkit] Add missing designated initializers (#2574)

references (xtro)
!missing-designated-initializer! WKInterfaceController::init is missing an [DesignatedInitializer] attribute
!missing-designated-initializer! WKUserNotificationInterfaceController::init is missing an [DesignatedInitializer] attribute

* [xtro] Reword some of the Simd diagnostic messages according to review.

* [tests] Make sure test symbols don't clash between different test libraries.

Fixes this build problem for framework-test:

	clang: error: linker command failed with exit code 1 (use -v to see invocation)
	MTOUCH: error MT5212: Native linking failed, duplicate symbol: '_x_mdltransform_get_rotation_matrix'.
	MTOUCH: error MT5213: Duplicate symbol in: /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/framework-test/obj/iPhoneSimulator/Debug-unified/mtouch-cache/XStaticObjectTest.framework/XStaticObjectTest (Location related to previous error)
	MTOUCH: error MT5213: Duplicate symbol in: /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/framework-test/obj/iPhoneSimulator/Debug-unified/mtouch-cache/XStaticArTest.framework/XStaticArTest(libtest-ar.x86_64.o) (Location related to previous error)
	MTOUCH: error MT5212: Native linking failed, duplicate symbol: '_x_mdltransformcomponent_get_local_transform'.
	MTOUCH: error MT5212: Native linking failed, duplicate symbol: '_x_mdltransform_create_global_transform'.
	MTOUCH: error MT5212: Native linking failed, duplicate symbol: '_x_get_matrix_float4x4'.
	MTOUCH: error MT5212: Native linking failed, duplicate symbol: '_x_get_matrix_float3x3'.
	MTOUCH: error MT5212: Native linking failed, duplicate symbol: '_x_get_matrix_float2x2'.
	MTOUCH: error MT5209: Native linking error: 6 duplicate symbols for architecture x86_64
	MTOUCH: error MT5202: Native linking failed. Please review the build log.

* [tests] Since libtest.a need ModelIO now, the corresponding LinkWith attributes need to state that too.

* [introspection] Don't check native signatures on obsolete members, and ignore the right simd matrix types.

Fixes this introspection/Mac problem:

    ***** ApiSignatureTest.NativeSignatures
    Selector: uniformWithName:matrixFloat2x2: on type SpriteKit.SKUniform, Type: Simd.MatrixFloat2x2, nothing encoded
    Selector: uniformWithName:matrixFloat3x3: on type SpriteKit.SKUniform, Type: Simd.MatrixFloat3x3, nothing encoded
    Selector: uniformWithName:matrixFloat4x4: on type SpriteKit.SKUniform, Type: Simd.MatrixFloat4x4, nothing encoded
    Selector: setMatrixFloat2x2Value: on type SpriteKit.SKUniform, Type: Simd.MatrixFloat2x2, nothing encoded
    Selector: setMatrixFloat3x3Value: on type SpriteKit.SKUniform, Type: Simd.MatrixFloat3x3, nothing encoded
    Selector: setMatrixFloat4x4Value: on type SpriteKit.SKUniform, Type: Simd.MatrixFloat4x4, nothing encoded
    Selector: initWithName:matrixFloat2x2: on type SpriteKit.SKUniform, Type: Simd.MatrixFloat2x2, nothing encoded
    Selector: initWithName:matrixFloat3x3: on type SpriteKit.SKUniform, Type: Simd.MatrixFloat3x3, nothing encoded
    Selector: initWithName:matrixFloat4x4: on type SpriteKit.SKUniform, Type: Simd.MatrixFloat4x4, nothing encoded

* [monotouch-tests] Include more custom asserts for watchOS to make the build work.

Fixes this:

    Simd/MatrixFloat4x4Test.cs(28,12): error CS0117: 'Asserts' does not contain a definition for 'AreEqual'
    Simd/MatrixFloat4x4Test.cs(29,12): error CS0117: 'Asserts' does not contain a definition for 'AreEqual'
    Simd/MatrixFloat4x4Test.cs(37,12): error CS0117: 'Asserts' does not contain a definition for 'AreEqual'
    Simd/MatrixFloat4x4Test.cs(48,12): error CS0117: 'Asserts' does not contain a definition for 'AreEqual'
    [...]

* [monotouch-test] Exclude code that requires the binding project from xammac tests.

Exclude code that requires the test binding project from xammac tests because
there's currently no XM version of the test binding project.

Fixes this:

    tests/monotouch-test/SpriteKit/UniformTest.cs(20,7): error CS0246: The type or namespace name 'Bindings' could not be found (are you missing a using directive or an assembly reference?)
    tests/monotouch-test/ModelIO/MDLMaterialProperty.cs(37,7): error CS0246: The type or namespace name 'Bindings' could not be found (are you missing a using directive or an assembly reference?)
    tests/monotouch-test/ModelIO/MDLTransform.cs(34,7): error CS0246: The type or namespace name 'Bindings' could not be found (are you missing a using directive or an assembly reference?)

* Bump version for preview #8 (#2576)

* [spritekit] Audit fixes (xtro) (#2577)

1.	SKVideoNode is now, partially, available on watchOS and does
	not require the extra, manual code to swicth selectors depending
	on the OS version being run.

!missing-type! SKVideoNode not bound
!missing-selector! SKVideoNode::anchorPoint not bound
!missing-selector! SKVideoNode::initWithCoder: not bound
!missing-selector! SKVideoNode::initWithFileNamed: not bound
!missing-selector! SKVideoNode::initWithURL: not bound
!missing-selector! SKVideoNode::setAnchorPoint: not bound
!missing-selector! SKVideoNode::setSize: not bound
!missing-selector! SKVideoNode::size not bound
!missing-selector! +SKVideoNode::videoNodeWithFileNamed: not bound
!missing-selector! +SKVideoNode::videoNodeWithURL: not bound

2.	SKNodeFocusBehavior is exposed needlessly on watchOS because
	SpriteKit/Enums.cs was not processed by the generator, so [NoWatch]
	did not matter.

!unknown-native-enum! SKNodeFocusBehavior bound

	It's also visible on macOS but nothing uses it (so we do not expose
	it needlessly)

!missing-enum! SKNodeFocusBehavior not bound

3.	Add missing designated initializer on default `init`

!missing-designated-initializer! SKAttributeValue::init is missing an [DesignatedInitializer] attribute
!missing-designated-initializer! SKNode::init is missing an [DesignatedInitializer] attribute

4.	Remove inconsistency for SKNode subclasses wrt XAMCORE_4_0

The trio attributeValues, setAttributeValues and setValue:forAttributeNamed:
that was moved from SKNode (deprecated) into its subclasses. This was done
using XAMCORE_4_0 but not on every subclasses. This adds them everywhere to
be consistent (only SKNode versions are not defined in XAMCORE_4_0)

!missing-selector! SKEffectNode::attributeValues not bound
!missing-selector! SKEffectNode::setAttributeValues: not bound
!missing-selector! SKEffectNode::setValue:forAttributeNamed: not bound
!missing-selector! SKEffectNode::valueForAttributeNamed: not bound
!missing-selector! SKEmitterNode::attributeValues not bound
!missing-selector! SKEmitterNode::setAttributeValues: not bound
!missing-selector! SKEmitterNode::setValue:forAttributeNamed: not bound
!missing-selector! SKEmitterNode::valueForAttributeNamed: not bound
!missing-selector! SKSpriteNode::attributeValues not bound
!missing-selector! SKSpriteNode::setAttributeValues: not bound
!missing-selector! SKSpriteNode::setValue:forAttributeNamed: not bound
!missing-selector! SKSpriteNode::valueForAttributeNamed: not bound

* [introspection] Make sure '[FAIL]' is printed before every failure. (#2578)

This makes xharness able to list the failures in the inline summary.

* [xtro] Reword some of the Simd diagnostic messages according to review.

* [xharness] Add a missing IsServerMode check to generate correct html. (#2581)

* [SpriteKit] SKTransformNode is new in Xcode 9 so no need to keep the broken (and obsolete) non-simd version of RotationMatrix.

* [intents] Fix some (partial) xtro issues and #59156 (#2585)

reference
https://bugzilla.xamarin.com/show_bug.cgi?id=59156

Remaining issues are filled in https://bugzilla.xamarin.com/show_bug.cgi?id=59183

!missing-selector! +INCarSeatResolutionResult::confirmationRequiredWithCarSeatToConfirm: not bound
!missing-selector! +INCarSeatResolutionResult::successWithResolvedCarSeat: not bound
!missing-selector! +INNotebookItemTypeResolutionResult::disambiguationWithValuesToDisambiguate: not bound

* [Intents] Confirm* interface methods should be bound as Confirm, Fixes Bug 59164 (#2591)

* [Intents] Confirm* interface methods should probably be bound as Confirm, Fixes Bug 59164

https://bugzilla.xamarin.com/show_bug.cgi?id=59164

All Confirm* methods from *IntentHandling interfaces should be named
just `Confirm` to avoid confusion because most of them do not directly
confirm as an acion, but instead they **ask** for confirmation also we
would follow swift's naming by doing this.

* [Intents] XAMCORE_4_0 all Confirm* methods from *IntentHandling

Turns any Confirm* into just Confirm inside a XAMCORE_4_0 block,

* [Intents] Fix breaking changes in Intents added in Xcode 9 Bindings (#2590)

Apple added more protocol conformances to INRidesharingDomainHandling and
INPaymentsDomainHandling protocols in Xcode 9, I introduced these breaking
changes back when I did intents binding so fixing them :)

* [Metal] New bindings from Xcode 9 betas (#2457)

* [AVFoundation] Updated bindings for xcode9. (#2272)

* [Xcode9] Add IOSurface bindings (#2363)

* This framework was a private framework before iOS 11.

This framework was a private framework before iOS 11, yet the headers claim
many API were introduced in iOS 10.

So take account of this difference by using the private framework location in
iOS 10.3 or earlier.

Testing these API from Xcode works fine when run on an iOS 10.3 device, and
I've confirmed the IOSurface framework is loaded from the private frameworks
path on older devices (and when built using Xcode 9 and linked with the public
framework path).

* Disable code to make IOSurface work on iOS 10.

Disable the code to make IOSurface work on iOS 10, since it may be rejected by
the App Store.

This also means adjusting the availability attributes, so that the
introspection tests pass (and to document that technically these API won't
work when used with Xamarin.iOS in iOS 10).

I've filed bug #[59201][1] to keep track of this, maybe we can re-enable this later.

[1]: https://bugzilla.xamarin.com/show_bug.cgi?id=59201

* [CoreMedia] Fix leak in CMAttachmentBearer.GetAttachments. (#2593)

The caller owns the return value from CMCopyDictionaryOfAttachments, so tell
Runtime.GetNSObject that.

* [Intents] Adds missing API found by xtro, fixes Bug 59183 (#2596)

https://bugzilla.xamarin.com/show_bug.cgi?id=59183

Fixes

!missing-selector! +INNotebookItemTypeResolutionResult::disambiguationWithValuesToDisambiguate: not bound
!missing-selector! +INCarSeatResolutionResult::confirmationRequiredWithCarSeatToConfirm: not bound
!missing-selector! +INCarSeatResolutionResult::successWithResolvedCarSeat: not bound
!incorrect-protocol-member! INUIHostedViewControlling::configureWithInteraction:context:completion: is OPTIONAL and should NOT be abstract

* [xtro] Fix StartWorkingDirectory to enable debugging (#2598)

* [iosurface] Enable for tvOS and XM classic (to avoid multiple defines around consumer API) (#2597)

* [xtro] Fix EnumCheck (#2600)

* [ARKit] Rename a few method to make them nicer. (#2604)

* DisplayTransform -> GetDisplayTransform since methods should have verbs.

* SessionWasInterrupted -> WasInterrupted and SessionInterruptionEnded ->
  InterruptionEnded since these names match better with the other names
  (CameraDidChangeTrackingState / DidFail / DidOutputAudioSampleBuffer: none
  are prefixed with 'Session'). Additionally, the type is a Model (for the
  delegate pattern), which means all methods are more-or-less event-like, and
  the first argument is always the same (the protocol itself), which is
  another indicator the methods should be named similarly.

* [Foundation] Remove 'Key' suffix from some fields. (#2606)

Of the 168 fields in NSMetadataItem, only these 5 hadn't removed the 'Key'
suffix.

So make them all equivalent by removing the 'Key' suffix from these 5 fields.

* [ImageIO] Fix API to not duplicate the instance in instance methods. (#2609)

An instance method does not need to take the instance as a parameter, so
remove the first (instance) parameter for
CGImageDestination.AddAuxiliaryDataInfo and
CGImageSource.CopyAuxiliaryDataInfo.

An alternative solution would be to make the methods static, but I like the
instance API better.

* [UIKit] De-model UIDataSourceTranslating. (#2603)

It's not clear from neither the documentation nor the headers how this
protocol is supposed to be used, and since it doesn't correspond to the
delegate pattern, remove the [Model] attribute for now.

We can always add it back later.

* [CoreML] Improve API. (#2592)

* [CoreML] Improve API.

* The indices, shape and stride properties for MLMultiArray and
  MLMultiArrayConstraint can logically only be arrays of integers, so type
  them as such. This means adding overloads for MLMultiArray's constructors,
  GetObject and SetObject methods, and the indexers that takes nint[] arrays
  instead of NSNumber[] arrays.

* Change MLFeatureValue's static factory methods to be a method ('Create')
  instead of a preposition, and call all the different factory methods the
  same, since they can be overloaded nicely.

* [tests][monotouch-test] Add version check to MLMultiArrayTest and make sure the arrays we create are big enough for the data we put in them.

* [tests][monotouch-test] MLMultiArray's elements aren't zero-initialized, so don't assume that in the tests.

* Support overloading Objective-C methods based on static/instance. (#2607)

Two Objective-C methods can be named identically as long as one is static and
the other instance.

We must support this since Apple did just this (in the NSItemProviderReading /
NSItemProviderWriting protocols).

We solve it by prepending a '+' or '-' to the selector when hashing it (to
determine selector uniqueness, and to look the method up again at runtime).

* [uikit] Update for Xcode 9 - Part 6 (#2602)

NSAttributedString.h
NSFileProviderExtension.h
NSLayoutAnchor.h
UIAccessibility.h
UIAccessibilityAdditions.h
UIAccessibilityContainer.h
UIAccessibilityContentSizeCategoryImageAdjusting.h
UIAccessibilityCustomRotor.h
UIAccessibilityLocationDescriptor.h
UITabBar.h
UINavigationBar.h
UIScreen.h

* Xcode9 scenekit (#2512)

* [SceneKit] basic work

* Added key

* [xcode9] SCNCameraController

* [xcode9] SCNCamera updates

* [xcode9] SCNMaterial

* [xcode9] SCNGeometryTessellator, SCNCameraControlConfiguration, SCNView, small bits

* Add trailing commas to last enum value

* Remove whitespace noise

* [scenekit] Update deprecated attributes messages

* Addresses some of Rolf's feedback

* Drop the WeakDelegate in SCNCameraController

* Rename method to Render, remove ctor from class that can not be constructed in Palygrounds, add typo exception

* [AppKit] Rename NSBezierPath.AppendBezierPathWithCGGlyph to match its sibling methods. (#2605)

NSBezierPath contains a lot of 'AppendPathWithXXX' methods, that all map to
'appendBezierPathXXX' selectors.

So rename AppendBezierPathWithCGGlyph accordingly, to make it more similar to
the other methods in the same type.

* [uikit] Add all UISpringLoadedInteractionSupporting (#2616)

Types do not conform to the protocol but protocol methods work on those types (see monotouch-test).
Fixed introspection tests accordingly and tested the selectors in monotouch-test.

* [Intents] Add convenience ctor overload and call correct base ctor in manual ctor. (#2613)

Add a convenience constructor overload in
INGetUserCurrentRestaurantReservationBookingsIntent that uses nint instead of
NSNumber, since logically "number of results" will always be some sort of
integer.

Also call the correct base constructor in INSpeakableString's custom
constructor (same as any other generated constructor). Otherwise we end up
doing something like this: [[[INSpeakableString alloc] init] initWith ...],
i.e. calling two different init methods.

* [coreimage] Add new headers API up to beta 6 (#2601)

Filters are not complete (ref: #57350)
https://bugzilla.xamarin.com/show_bug.cgi?id=57350

* Some new constants are not yet documented (type is known), so they
  are commented / ignored
  https://bugzilla.xamarin.com/show_bug.cgi?id=59296

* Filled bug for [Wrap] inside [Category] so strong dictionary helpers
  can be re-enabled later
  https://bugzilla.xamarin.com/show_bug.cgi?id=59294

* [foundation] xtro fixes for watchOS (#2586)

!missing-enum! NSProcessInfoThermalState not bound
!missing-field! NSProcessInfoThermalStateDidChangeNotification not bound
!missing-selector! NSProcessInfo::thermalState not bound

Headers are wrong and preferredPresentationStyle is not in tvOS and watchOS

!missing-selector! NSItemProvider::preferredPresentationStyle not bound
!missing-selector! NSItemProvider::setPreferredPresentationStyle: not bound

* [uikit] Also remove UIPreferredPresentationStyle enum from platform where it's not used

* [Foundation] Improve NSItemProviderReading & NSItemProviderWriting protocols/compliance. (#2614)

* [Foundation] Improve NSItemProviderReading & NSItemProviderWriting protocols/compliance.

* NSItemProviderWriting:
* NSItemProviderReading: Implement correctly and completely by uncommenting
  commented out code.

* NSMutableString:
* NSAttributedString: remove inlined members, since these classes don't
  implement NSItemProviderReading / NSItemProviderWriting (according to the
  headers at least).

* NSUrl: all platforms now seem to implement NSItemProviderReading /
  NSItemProviderWriting.

* NSString: all platforms now seem to implement both NSItemProviderReading and NSItemProviderWriting

* UIColor:
* UIImage: Update inlined protocol members according to the latest beta.

Additionally, due to the following conditions:

* The protocols all have the correct members now.
* In the API definition we tell the generator to inline members from a
  protocol by inheriting from the corresponding interface.
* The generator doesn't inline static members from protocols.

several 'new' keywords had to be added to silence a compiler warning that
occurrs when we manually inline a static member, since the member would be
included in the type both from the inherited interface and the manual
implementation.

* [Foundation] Comment out NSItemProviderWriting.GetItemProviderVisibility to avoid inlining/generating unusable methods.

NSItemProviderWriting.GetItemProviderVisibility is an optional method, and
none of the native classes that implements NSItemProviderWriting actually
imlements the method. This means inlining the method in those classes ends up
creating unusable API; so just comment out the method to avoid generating the
unusable API.

The introspection tests found this:

    [FAIL] Foundation.NSString : itemProviderVisibilityForRepresentationWithTypeIdentifier:
    [FAIL] Foundation.NSUrl : itemProviderVisibilityForRepresentationWithTypeIdentifier:
    [FAIL] Contacts.CNContact : itemProviderVisibilityForRepresentationWithTypeIdentifier:
    [FAIL] MapKit.MKMapItem : itemProviderVisibilityForRepresentationWithTypeIdentifier:
    [FAIL] UIKit.UIColor : itemProviderVisibilityForRepresentationWithTypeIdentifier:
    [FAIL] UIKit.UIImage : itemProviderVisibilityForRepresentationWithTypeIdentifier:
    [FAIL] iOSApiSelectorTest.ApiSelectorTest.StaticMethods : 6 errors found in 2348 static selector validated:

See also https://bugzilla.xamarin.com/show_bug.cgi?id=59308

* [iosurface] Add missing [TV] attributes (#2619)

* [opengles] Enable the new API using IOSurface (#2618)

The symbol only exists inside device libraries, not on simulator,
and the introspection tests were updated to ignore it.

Part of https://bugzilla.xamarin.com/show_bug.cgi?id=58054

* [avfoundation][watchos] Enable AudioBufferList (fix #59145) + audit (xtro) (#2617)

1. AudioBufferList is part of CoreAudio (wrong namespace, which needs
   a few changes in the generator) and now available in watchOS 4
   https://bugzilla.xamarin.com/show_bug.cgi?id=59145

2. Also fixes xtro found issues:

!missing-type! AVAudioRecorder not bound
!missing-selector! AVAudioRecorder::averagePowerForChannel: not bound
!missing-selector! AVAudioRecorder::channelAssignments not bound
!missing-selector! AVAudioRecorder::currentTime not bound
!missing-selector! AVAudioRecorder::delegate not bound
!missing-selector! AVAudioRecorder::deviceCurrentTime not bound
!missing-selector! AVAudioRecorder::format not bound
!missing-selector! AVAudioRecorder::initWithURL:format:error: not bound
!missing-selector! AVAudioRecorder::initWithURL:settings:error: not bound
!missing-selector! AVAudioRecorder::isMeteringEnabled not bound
!missing-selector! AVAudioRecorder::isRecording not bound
!missing-selector! AVAudioRecorder::peakPowerForChannel: not bound
!missing-selector! AVAudioRecorder::recordAtTime: not bound
!missing-selector! AVAudioRecorder::recordAtTime:forDuration: not bound
!missing-selector! AVAudioRecorder::recordForDuration: not bound
!missing-selector! AVAudioRecorder::setChannelAssignments: not bound
!missing-selector! AVAudioRecorder::setDelegate: not bound
!missing-selector! AVAudioRecorder::setMeteringEnabled: not bound
!missing-selector! AVAudioRecorder::settings not bound
!missing-selector! AVAudioRecorder::url not bound

!missing-protocol! AVAudioRecorderDelegate not bound

!missing-selector! AVAudioEngine::inputNode not bound
!missing-selector! AVAudioEngine::manualRenderingBlock not bound
!missing-selector! AVAudioInputNode::setManualRenderingInputPCMFormat:inputBlock: not bound
!missing-selector! AVAudioPlayer::format not bound
!missing-selector! AVAudioSession::requestRecordPermission: not bound

!unknown-field! AVFileType3GPP bound
!unknown-field! AVFileType3GPP2 bound
!unknown-field! AVFileTypeAC3 bound
!unknown-field! AVFileTypeAIFC bound
!unknown-field! AVFileTypeAIFF bound
!unknown-field! AVFileTypeAMR bound
!unknown-field! AVFileTypeAVCI bound
!unknown-field! AVFileTypeAppleM4A bound
!unknown-field! AVFileTypeAppleM4V bound
!unknown-field! AVFileTypeCoreAudioFormat bound
!unknown-field! AVFileTypeDNG bound
!unknown-field! AVFileTypeEnhancedAC3 bound
!unknown-field! AVFileTypeHEIC bound
!unknown-field! AVFileTypeHEIF bound
!unknown-field! AVFileTypeJPEG bound
!unknown-field! AVFileTypeMPEG4 bound
!unknown-field! AVFileTypeMPEGLayer3 bound
!unknown-field! AVFileTypeQuickTimeMovie bound
!unknown-field! AVFileTypeSunAU bound
!unknown-field! AVFileTypeTIFF bound
!unknown-field! AVFileTypeWAVE bound

* [Metal] Implement API using IOSurface now that IOSurface is implemented. Partially fixes #58054. (#2621)

https://bugzilla.xamarin.com/show_bug.cgi?id=58054

* [PdfKit] Improve PdfAnnotation.QuadrilateralPoints binding by making it strongly typed. (#2620)

* Implement Simd vector types (VectorFloat2/3/4/VectorInt4). (#2622)

* Implement Simd vector types (VectorFloat2/3/4/VectorInt4).

* [ARKit/Vision] Use the new simd vector types instead of the OpenTK versions.

* [ModelIO] Use the new simd vectors in new API (MDLVoxelIndexExtent2).

This way we won't have to create a MDLVoxelIndexExtent3 in the future.

* [SpriteKit] Use the new simd vectors in new API.

* [metal] Audit (xtro) based fixes (#2623)

!extra-protocol-member! unexpected selector MTLArgumentEncoder::newArgumentEncoderForBufferAtIndex: found
!extra-protocol-member! unexpected selector MTLComputeCommandEncoder::dispatchThreads:threadsPerThreadgroup: found

macos-only

!missing-field! MTLDeviceRemovalRequestedNotification not bound
!missing-field! MTLDeviceWasAddedNotification not bound
!missing-field! MTLDeviceWasRemovedNotification not bound

!missing-pinvoke! MTLCopyAllDevices is not bound

* [CloudKit] Update bindings to beta 6. (#2615)

* [FileProvider] Turn NSFileProviderItemIdentifier enum into a static class, fixes bug 59329 (#2634)

https://bugzilla.xamarin.com/show_bug.cgi?id=59329

At the time of binding NSFileProviderItemIdentifier it wasn't clear
how it was supposed to be used, I mean apple provides two keys which
I thought were the only possible values hence binding it as an smart
enum. Unfortunately this wasn't the case and the user can use those
two values provided from the SDK or their own NSString Identifier.

Swift provides a wrapper unfortunately we can't do the same due to
NSFileProviderItemIdentifier is used in the NSFileProviderItem protocol
and we currently do not support changing signatures on them.

* [mtouch] Teach mtouch about the 'IOSurface' framework for tvOS. Fixes #59333. (#2630)

https://bugzilla.xamarin.com/show_bug.cgi?id=59333

* Bump Touch.Unit to get fix for API breakage. (#2631)

spouliot/Touch.Unit@8f1e19d [NUnitOutputTextWriter] Reintroduce previous constructor to make sure we don't break binary ABI.
spouliot/Touch.Unit@00b0c0b [NUnitOutputTextWriter] Don't write invalid xml comments.
spouliot/Touch.Unit@de9fe20 [TouchRunner] Restore the original code path when not wrapping NUnit xml output.

* [IOSurface] Add missing availability attributes for tvOS. (#2629)

* Bump versions for preview 9 (#2624)

* [AVFoundation] Add missing interface AVRouteDetector. (#2637)

* [tests] Update xtro to reduce list sizes (#2636)

* Skip OpenTK duplicate declaration (we can't change them);
* Fix rule name change for ARKit / simd;
* Add missing default initializer on `init` to pending actions;
* Add note for AVPersistableContentKeyRequest changes wrt tvOS;

* [ReplayKit] Make RPBroadcastActivityViewController.LoadBroadcastActivityViewController async-capable. (#2639)

* [xcode9] More SceneKit bindings (#2633)

* [GameplayKit] Incorrect GKPath.FromPoints (Vector3[], float, cyclical) implementation, Fixes bug 59380 (#2644)

* [GameplayKit] Incorrect GKPath.FromPoints (Vector3[], float, cyclical) implementation, Fixes bug 59380

https://bugzilla.xamarin.com/show_bug.cgi?id=59380

vector_float3 is 16 bytes, which means the binding is incorrect,
because Vector3 is 12 bytes, and our code does not that difference into account.

* Add tests

* [DeviceCheck] Disable default ctor for DCDevice. (#2642)

It doesn't seem to be useful according to the documentation, since it appears
that the only way to get an instance is to use the static CurrentDevice
property.

* [audiounit] Audit (xtro) fixes for tvOS (#2635)

Availability attributes in non-generated files don't hide symbols/code.

reference:
!unknown-pinvoke! AudioUnitExtensionCopyComponentList bound
!unknown-pinvoke! AudioUnitExtensionSetComponentList bound

* [tests] Make sure tvOS tests don't use the (unexisting) API

* [tests] Add all test project variations to tests-mac.sln (#2579)

* [xharness] Make sure generated mac projects have different project guids.

* [introspection] Change the project guid so that it doesn't match the dontlink-mac project guid.

* [tests] Add all test project variations to tests-mac.sln.

* [xharness] Fix else condition.

* [FileProvider] Adds missing NSFileProviderPage constants, fixes bug 59297. (#2646)

https://bugzilla.xamarin.com/show_bug.cgi?id=59297

Adds NSFileProviderInitialPageSortedByName and NSFileProviderInitialPageSortedByDate
NSData constants

* [Xcode9] Remove NSFileProviderMessage and NSFileProviderMessageInterface (#2647)

APIs were removed in beta 2

* [Foundation/UIKit] Provide LoadObject[s] methods that return the expected type in the callback. Fixes #59049. (#2638)

The callback for these LoadObject[s] methods take an INSItemProviderReading
parameter. This tells our runtime that we must provide an instance of a
managed object that implements this interface (but nothing else), so we create
a `NSItemProviderReadingWrapper` instance, which complies with the API (since
the wrapper type implements the corresponding interface).

Unfortunately these methods are supposed to return an instance of the passed-
in type, so in order to comply with this soft (documentation-only)
requirement, provide a wrapper method that creates instances of the right
types.

https://bugzilla.xamarin.com/show_bug.cgi?id=59049

* [arkit] Ignore deprecated selectors (#2645)

* [FileProvider] Adds missing protocol and keys from audit (#2652)

```
!missing-protocol! NSFileProviderServiceSource not bound
!missing-field! NSFileProviderErrorCollidingItemKey not bound
!missing-field! NSFileProviderErrorNonExistentItemIdentifierKey not bound
!missing-field! NSFileProviderFavoriteRankUnranked not bound
```

Also adds `NSXpcListenerEndpoint` to foundation, needed by `NSFileProviderServiceSource` protocol.

* [tests][xtro] Workaround xtro runner dupe entry exception and update data files (#2654)

* [AVFoundation] Rename field to match others. (#2657)

* [homekit] Audit (xtro) fixes (#2653)


- HMCharacteristicEvent conforms to NSMutableCopying on iOS11
  which makes it 64 bits only (so adjust intro tests)

- Ignore extra setters on HMMutablePresenceEvent, rdar 33883958

!missing-selector! HMMutablePresenceEvent::setPresenceEventType: not bound
!missing-selector! HMMutablePresenceEvent::setPresenceUserType: not bound

* [xtro] Add missing pinvoke to pending (#2662)

- Bug 59422: [uikit] Missing UIContentSizeCategoryCompareToCategory & UIContentSizeCategoryIsAccessibilityCategory
(https://bugzilla.xamarin.com/show_bug.cgi?id=59422)

* Merge latest d15-3 fixes into xcode9 (#2660)

* [msbuild] Re-added wildcard (*) expandsion for application-identifier in Entitlements.plist (#2186)

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=57119

* Bump mono (#2213)

* Framework tests were still binding non-linked Simple class which errors now (#2216) (#2218)

- Improve Makefile to rebuild when projects build with errors

* Bump mono to get cecil fix for bug #56808. (#2222)

https://bugzilla.xamarin.com/show_bug.cgi?id=56808

* [msbuild] Use @(ReferencePath) instead of @(ResolvedFiles) (#2188) (#2214)

This allows things to work on both xbuild and msbuild.

In xbuild, both lists are exactly the same and on msbuild,
only @(ReferencePath) exists.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=55147

* NSActivityOptions.IdleDisplaySleepDisabled had wrong value (#2232) (#2239)

This was due to an integer overflow.  The original value was based on Int32
1 << 40 == 256

The correct value should be based on a UInt64.
1UL << 40 == 1099511627776

* [tests] Fix bug 57699 - [iOS]InternalsTest failure (Linkall) tests on device (#2243)

Strip native debugging symbols should not be checked for debug builds

* Bump mono to get fix for bug #57780.

https://bugzilla.xamarin.com/show_bug.cgi?id=57780

* Update .gitmodules

Change branch to d15-3 branch of mono

* Bump maccore to get fix for bug #55064.

https://bugzilla.xamarin.com/show_bug.cgi?id=55064

* [mono] Bump mono to get the head of cecil/mono-2017-04 and fix IsComObject #57919

Also fix #58789 [1], the typo in tools/mtouch/Tuning.cs showing in MT0000 errors
instead MT2102. That's already in master and d15-4

mono bump includes:

[2] commit 2a6502cee0df9de5198eafe7c8b5f6ac25106f34 (HEAD -> d15-3, origin/d15-3)
Merge: 02457c20fcf 5e05cafc6f1
Author: Luis Aguilera <luis.aguilera@xamarin.com>
Date:   Fri Aug 18 10:04:06 2017 -0400

    Merge pull request #5401 from marek-safar/com

    [Marshal.IsComObject] Make this predicate return false instead of thr…

[3] commit 02457c20fcf57c0610e844d638eb1da82b5d1eb0
Merge: da80840ea55 73fd9a1b82e
Author: Luis Aguilera <luis.aguilera@xamarin.com>
Date:   Fri Aug 18 09:59:06 2017 -0400

    Merge pull request #5400 from spouliot/bump-cecil-58834-d15-3

    [cecil] Bump to the head of the mono-2017-04 branch and pick the fix for bug #58834

References
[1] https://bugzilla.xamarin.com/show_bug.cgi?id=58789
[2] https://bugzilla.xamarin.com/show_bug.cgi?id=57919
[3] https://bugzilla.xamarin.com/show_bug.cgi?id=58834

* [mtouch] Put 'mono_profiler_startup_log' in the symbol list. Fixes #58778. (#2501)

We need the 'mono_profiler_startup_log' symbol when profiling is enabled, so
make sure to add the symbol to the correct list of symbols we need.

Previously we were passing `-u _mono_profiler_startup_log` to clang directly,
which is fine, but not complete, since it does not write the symbol to the
symbollist file (--symbollist=file), which means it wouldn't be preserved when
the MSBuild tasks strip the executable.

https://bugzilla.xamarin.com/show_bug.cgi?id=58778

* Bump versions for SR3

https://trello.com/c/EVze08ei

* Bump mono to include HttpClientHandler fix #44027

https://trello.com/c/jYFXadH8/8-systemnethttp-close-request-stream-when-httpclienthandler
https://bugzilla.xamarin.com/show_bug.cgi?id=44027

* [FileProvider] Add missing API and turn NSString to string (#2663)

Turned NSString to string in order to match exisiting API.

* [uikit] Add UIPasteConfigurationSupporting and UITextPasteConfigurationSupporting (#2649)


- Fixes bug #59363: Missing UIPasteConfigurationSupporting, UITextPasteConfigurationSupporting, UITextDraggable and UITextDroppable on a couple of types
(https://bugzilla.xamarin.com/show_bug.cgi?id=59363)

* [uikit] Remove 129 types in UIPasteConfigurationSupporting case

* [scenekit] Audit (xtro) fixes (#2648)

This looks like an Apple breaking change (since `SCNAnimation` is new)
but we now have:

> typedef void (^SCNAnimationEventBlock)(id<SCNAnimation> animation, id animatedObject, BOOL playingBackward);

bound as

> delegate void SCNAnimationEventHandler (CAAnimation animation, NSObject animatedObject, bool playingBackward);

and `CAAnimation` conforms to `SCNAnimation` but *only* the later is
available on watchOS. The delegate is only updated (since it's new)
on our watchOS profile.

xtro references:

(watchos)
!unknown-protocol! SCNCameraControlConfiguration bound

(tvos/watchos)
!missing-selector! SCNAnimation::animationEvents not bound
!missing-selector! SCNAnimation::setAnimationEvents: not bound
!missing-selector! SCNConstraint::isEnabled not bound
!missing-selector! SCNConstraint::setEnabled: not bound

!missing-field! SCNSceneSourceConvertToYUpKey not bound
!missing-field! SCNSceneSourceConvertUnitsToMetersKey not bound

(ios/tvos)
!missing-protocol-conformance! SCNNode should conform to UIFocusItem

* Bump maccore post 15.3 merge (#2665)

* Bump Xcode 9 to GM (#2667)

* Force build (on wrench)

* [avfoundation] Fix breaking changes (apidiff) (#2664)

* [TVServices] Update to Xcode 9 GM (#2675)

* [GameController] Update to Xcode 9 GM (#2673)

* [LocalAuthentication] Update to Xcode 9 GM (#2671)

* [LocalAuthentication] Update to Xcode 9 GM

* Remove availability from BiometryNotAvailable, BiometryNotEnrolled and BiometryLockout

* [AVFoundation] Add missing types AVSampleBufferAudioRenderer and AVSampleBufferRenderSynchronizer (#2659)

* [AVFoundation] Add missing types AVSampleBufferAudioRenderer and
AVSampleBufferRenderSynchronizer

Some of the new added types were already present BUT under a #if
MONOMAC, they had to be moved.

* [AVFoundation] Set the wrongly added API to be obsolete and ensure it returns logical values. (#2650)

* [xtro] The right platform for macOS is 'macos', not 'osx'. (#2677)

The platform name is used to filter availability attributes, and if we use the
wrong platform, we'll incorrectly skip all availability attributes.

The net result in unclassified entries: https://gist.github.com/rolfbjarne/a4474bc2a40c49a85cad495b51bb514f

* Various Xcode 9 API improvements and also fixes bug 59433 (#2676)

https://bugzilla.xamarin.com/show_bug.cgi?id=59433

While fixing bug 59433 I noticed some additional issues outlined below:

AVDepthData:

* Renamed **non** static `Create` methods because `Create` only
  makes sense with the **Static** method in this context. Also
  by renaming the methods we are now closer to the names that
  swift uses.

* Kept descriptive method names in favor of self-documenting code.
  `Convert`, `Apply` and `Replace` do not fully give us the intent
  of the method.

* Added a convenience `Create` static method that takes a
  `CGImageAuxiliaryDataInfo`.

* AvailableDepthDataTypes is now an array of `CVPixelFormatType` instead
  of a `NSNumber` array (The aactual fix for bug 59433).

ImageIO:

* Refactored `CGImageAuxiliaryDataInfo` to be a `StrongDictionary` in order
  to avoid most of the manual code and also to avoid reimplementing
  the `ToDictionary` method (which contained a subtle bug).

* Adjusted code to reflect the above change.

* Added missing `.ctor (IntPtr, bool)` to `CGImageMetadata` so the class
  is able to be created by our `Runtime.Get*`.

* Simplified `CopyAuxiliaryDataInfo` method by using `CGImageAuxiliaryDataInfo`
  as a `DictionaryContainer`.

Tests:

* Added `xamarinmonkey.heic` which is an image that contains depth data needed
  to test above changes.

* Adds `AVDepthDataTests` that touches most of the changes listed here.

* Tweak the Simd-compatible matrices and vectors (#2668)

* Rename them to be OpenTK.NMatrix# (instead of Simd.MatrixFloat#x#).
* Remove the Vector2 and Vector4 variants, we'll use the OpenTK types instead (but we'll keep the NVector3 variant, since it's not identical to the OpenTK version).
* Update the API to match their OpenTK counterparts better:
    * NMatrix2 and NMatrix3 have a 0-based R#C# scheme for their fields.
    * NMatrix4 has a 1-based M## scheme for its fields (i.e. no change).

* [AVFoundation] Use Simd-matrix for API that needs it. (#2679)

This also requires implementing the corresponding matrix (NMatrix4x3).

Fixes this xtro issue:

> !unknown-simd-type-in-signature! OpenTK.Matrix3 AVFoundation.AVCameraCalibrationData::get_GetIntrinsicMatrix(): the native signature has a simd type (matrix_float3x3), while the corresponding managed method is using an incorrect (non-simd) type.

* [xtro] Fix checking availability on categories. (#2682)

When checking for category availability, check if both the current declaration
is a category, and if the current's declaration container is a category.

Otherwise this scenario fails:

* Category method is available.
* Category does not have availability attributes.
* Main class is unavailable.

with this typical code sequence:

```csharp
// don't process methods (or types) that are unavailable for the current platform
if (!decl.IsAvailable () || !(decl.DeclContext as Decl).IsAvailable ())
	return;
```

In which case we'd:

* First check the method (`decl`):
	* It's available, so no further checks is done on the method.

* Then we'd check the method's container (`decl.DeclContext`):
	* The container (the category) does not have availability attributes.
	* Then we'd check if the container's container is a category (it isn't, it's the namespace).

and as such determine that the method is available.

With this change, the second step will become:

* Then we'd check the method's container (`decl.DeclContext`):
	* The container (the category) does not have availability attributes.
	* Then we'd check if the container is a category (it is), and if its main class is available (it isn't).

and as such determine that the method is unavailable.

* Check for attributes on the method's container (no attributes, so we continue).
* Check if the method's

Unclassified diff: https://gist.github.com/rolfbjarne/8fa80962596978a426eadf9b7ba39dc1

* [uikit] Update for Xcode 9 GM (#2670)

* [AVFoundation] Implement AVCapturePhoto. Partially fixes #59388. (#2678)

Fixes:

> common.unclassified:!missing-type! AVCapturePhoto not bound

https://bugzilla.xamarin.com/show_bug.cgi?id=59388

* Use strong dictionaries for AVCapturePhoto.Metadata and AVCapturePhoto.EmbeddedThumbnailPhotoFormat.

* [SIMD] Implement Simd double types (VectorDouble3/MatrixDouble4x4). (#2632)

The following types will be used by ModelIO bindings

* Fix delta to be double

* Rename Simd-compatible matrices and vectors to match our final naming.

This also means removing the new Vector2 and Vector4 variants (but not
Vector3).

* [avfoundation] Remove AVAssetDownloadDelegate.DidLoadTimeRange since it was removed in one of the betas (#2687)

* [foundation] Move NSUrlSessionMultipathServiceType to a file processed by the generator (for the availability attributes) (#2688)

* [arkit] Update for Xcode 9 GM (#2681)

* [Intents] Fix watchOS INCarSeatResolutionResult breaking changes (#2690)

* [Intents] Fix watchOS INCarSeatResolutionResult breaking changes

Type Changed: Intents.INCarSeatResolutionResult

Removed methods:

    public static INCarSeatResolutionResult GetConfirmationRequired (INCarSeat valueToConfirm);
    public static INCarSeatResolutionResult GetSuccess (INCarSeat resolvedValue);

* [avfoundation] Add missing protocol members and deprecations (#2691)

!missing-protocol-member! AVCapturePhotoCaptureDelegate::captureOutput:didFinishProcessingPhoto:error: not found

and the selector removed from PR#2687 was actually replaced with this one

!missing-protocol-member! AVAssetDownloadDelegate::URLSession:aggregateAssetDownloadTask:didLoadTimeRange:totalTimeRangesLoaded:timeRangeExpectedToLoad:forMediaSelection: not found

* [tests][xtro] Map some enums, more fix with protocols and update entries (#2692)

* [Tests] Reenable dns tests on the watch. (#2674)

* [arkit] Add ARBlendShapeLocationOptions strong dictionary (#2696)

* [coreimage] Skip not yet bound filters added in Xcode9 (#2698)

Tracked in https://bugzilla.xamarin.com/show_bug.cgi?id=57350

* [Metal] Renamed MTLArgumentDescriptor.ArgumentDescriptor to Create, fixes bug 59498 (#2702)

https://bugzilla.xamarin.com/show_bug.cgi?id=59498

From [argumentDescriptor docs](https://developer.apple.com/documentation/metal/mtlargumentdescriptor/2915746-argumentdescriptor?language=objc)

> Creates an empty argument descriptor.

* [msbuild] Always codesign app bundles if the codesign key is non-null (#2697)

...even if it is a simulator build.

Turns out that starting with Xcode9, sim builds need to be codesigned
for App Groups entitlements to work properly. Interestingly, the
DetectSigningIdentity logic had a comment about needing to codesign
simulator builds for some entitlements to work already starting with
Xcode 8 but apparently the iOS targets did not respect this.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=59379

* [Foundation] Add NSProxy stub in order to workaround bug 59247 (#2693)


https://bugzilla.xamarin.com/show_bug.cgi?id=59247

We need to have a better solution that removes all what NSProxy does not responds to.
Right now this works because NSObject implements NSObject protocol just like NSProxy, but
NSProxy responds to far less selectors hence doing it internal so it is not a breaking change
when we provide the correct fix.

* Keep NSProxy around and avoid XML linker description

We need to keep NSProxy (avoid linking it) if WKNavigationDelegate or IWKNavigationDelegate
is used. We know WKWebView will be there and can hold a reference to it.

* [Xcode 9] Update Metal for GM (#2689)

* [iosurface] IOSurface is not usable before iOS/tvOS 11. Fixes #59201 (#2706)

Apple rejects apps that links with the previously private IOSurface.framework.
We were not sure about this [1] and had it disabled (this is removed).

However another bug stopped our adjustment logic [2] from being executed. This
is needed since `clang` picks up the private framework if it does not find the
public one (even when asking for a weak framework),

[1] https://bugzilla.xamarin.com/show_bug.cgi?id=59201
[2] Added a while ago for JavascriptCore

* Bump maccore to point to commit with the docs fix. (#2703)

* Bump XI to 11.0.x (and XM to 3.99.9.x) (#2684)

* fix typo
2017-09-15 17:53:16 -04:00
Sebastien Pouliot 05eb96d0a7 Merge branch 'xcode9' into xcode9-master-merge 2017-09-15 11:05:30 -04:00
Timothy Risi 46f4875422 [Xcode 9] Update Metal for GM (#2689) 2017-09-14 21:42:40 -04:00
Manuel de la Pena 9b9ffa2d52 [Tests] Reenable dns tests on the watch. (#2674) 2017-09-14 10:10:15 -04:00
Alex Soto 277be204ca [SIMD] Implement Simd double types (VectorDouble3/MatrixDouble4x4). (#2632)
The following types will be used by ModelIO bindings

* Fix delta to be double

* Rename Simd-compatible matrices and vectors to match our final naming.

This also means removing the new Vector2 and Vector4 variants (but not
Vector3).
2017-09-13 15:28:16 -04:00
Rolf Bjarne Kvinge 9fbfd97a8a [AVFoundation] Use Simd-matrix for API that needs it. (#2679)
This also requires implementing the corresponding matrix (NMatrix4x3).

Fixes this xtro issue:

> !unknown-simd-type-in-signature! OpenTK.Matrix3 AVFoundation.AVCameraCalibrationData::get_GetIntrinsicMatrix(): the native signature has a simd type (matrix_float3x3), while the corresponding managed method is using an incorrect (non-simd) type.
2017-09-13 18:46:06 +02:00
Rolf Bjarne Kvinge 7a674ec490 Tweak the Simd-compatible matrices and vectors (#2668)
* Rename them to be OpenTK.NMatrix# (instead of Simd.MatrixFloat#x#).
* Remove the Vector2 and Vector4 variants, we'll use the OpenTK types instead (but we'll keep the NVector3 variant, since it's not identical to the OpenTK version).
* Update the API to match their OpenTK counterparts better:
    * NMatrix2 and NMatrix3 have a 0-based R#C# scheme for their fields.
    * NMatrix4 has a 1-based M## scheme for its fields (i.e. no change).
2017-09-13 11:08:39 -04:00
Alex Soto 97f46ea685 Various Xcode 9 API improvements and also fixes bug 59433 (#2676)
https://bugzilla.xamarin.com/show_bug.cgi?id=59433

While fixing bug 59433 I noticed some additional issues outlined below:

AVDepthData:

* Renamed **non** static `Create` methods because `Create` only
  makes sense with the **Static** method in this context. Also
  by renaming the methods we are now closer to the names that
  swift uses.

* Kept descriptive method names in favor of self-documenting code.
  `Convert`, `Apply` and `Replace` do not fully give us the intent
  of the method.

* Added a convenience `Create` static method that takes a
  `CGImageAuxiliaryDataInfo`.

* AvailableDepthDataTypes is now an array of `CVPixelFormatType` instead
  of a `NSNumber` array (The aactual fix for bug 59433).

ImageIO:

* Refactored `CGImageAuxiliaryDataInfo` to be a `StrongDictionary` in order
  to avoid most of the manual code and also to avoid reimplementing
  the `ToDictionary` method (which contained a subtle bug).

* Adjusted code to reflect the above change.

* Added missing `.ctor (IntPtr, bool)` to `CGImageMetadata` so the class
  is able to be created by our `Runtime.Get*`.

* Simplified `CopyAuxiliaryDataInfo` method by using `CGImageAuxiliaryDataInfo`
  as a `DictionaryContainer`.

Tests:

* Added `xamarinmonkey.heic` which is an image that contains depth data needed
  to test above changes.

* Adds `AVDepthDataTests` that touches most of the changes listed here.
2017-09-13 09:58:08 -05:00
Manuel de la Pena 989f5f9ed8 [AVFoundation] Set the wrongly added API to be obsolete and ensure it returns logical values. (#2650) 2017-09-13 08:21:59 -04:00
Vincent Dondain d143856eda [uikit] Add UIPasteConfigurationSupporting and UITextPasteConfigurationSupporting (#2649)
- Fixes bug #59363: Missing UIPasteConfigurationSupporting, UITextPasteConfigurationSupporting, UITextDraggable and UITextDroppable on a couple of types
(https://bugzilla.xamarin.com/show_bug.cgi?id=59363)

* [uikit] Remove 129 types in UIPasteConfigurationSupporting case
2017-09-12 14:33:43 -04:00
Rolf Bjarne Kvinge 343c0b3aed [Foundation/UIKit] Provide LoadObject[s] methods that return the expected type in the callback. Fixes #59049. (#2638)
The callback for these LoadObject[s] methods take an INSItemProviderReading
parameter. This tells our runtime that we must provide an instance of a
managed object that implements this interface (but nothing else), so we create
a `NSItemProviderReadingWrapper` instance, which complies with the API (since
the wrapper type implements the corresponding interface).

Unfortunately these methods are supposed to return an instance of the passed-
in type, so in order to comply with this soft (documentation-only)
requirement, provide a wrapper method that creates instances of the right
types.

https://bugzilla.xamarin.com/show_bug.cgi?id=59049
2017-09-11 21:06:01 -04:00
Alex Soto 00305d1905 [FileProvider] Adds missing NSFileProviderPage constants, fixes bug 59297. (#2646)
https://bugzilla.xamarin.com/show_bug.cgi?id=59297

Adds NSFileProviderInitialPageSortedByName and NSFileProviderInitialPageSortedByDate
NSData constants
2017-09-11 20:08:24 -04:00
Sebastien Pouliot 3a33cef80f [audiounit] Audit (xtro) fixes for tvOS (#2635)
Availability attributes in non-generated files don't hide symbols/code.

reference:
!unknown-pinvoke! AudioUnitExtensionCopyComponentList bound
!unknown-pinvoke! AudioUnitExtensionSetComponentList bound

* [tests] Make sure tvOS tests don't use the (unexisting) API
2017-09-11 16:25:28 -04:00
Alex Soto fdf67c6645 [GameplayKit] Incorrect GKPath.FromPoints (Vector3[], float, cyclical) implementation, Fixes bug 59380 (#2644)
* [GameplayKit] Incorrect GKPath.FromPoints (Vector3[], float, cyclical) implementation, Fixes bug 59380

https://bugzilla.xamarin.com/show_bug.cgi?id=59380

vector_float3 is 16 bytes, which means the binding is incorrect,
because Vector3 is 12 bytes, and our code does not that difference into account.

* Add tests
2017-09-11 13:13:45 -05:00
Rolf Bjarne Kvinge 182c95e6bc Implement Simd vector types (VectorFloat2/3/4/VectorInt4). (#2622)
* Implement Simd vector types (VectorFloat2/3/4/VectorInt4).

* [ARKit/Vision] Use the new simd vector types instead of the OpenTK versions.

* [ModelIO] Use the new simd vectors in new API (MDLVoxelIndexExtent2).

This way we won't have to create a MDLVoxelIndexExtent3 in the future.

* [SpriteKit] Use the new simd vectors in new API.
2017-09-08 15:00:46 +02:00
Rolf Bjarne Kvinge 529148c7d8 [PdfKit] Improve PdfAnnotation.QuadrilateralPoints binding by making it strongly typed. (#2620) 2017-09-08 14:59:52 +02:00
Vincent Dondain e1873169f2 [uikit] Add all UISpringLoadedInteractionSupporting (#2616)
Types do not conform to the protocol but protocol methods work on those types (see monotouch-test).
Fixed introspection tests accordingly and tested the selectors in monotouch-test.
2017-09-07 14:32:48 -04:00
Rolf Bjarne Kvinge aa6004cab9 Support overloading Objective-C methods based on static/instance. (#2607)
Two Objective-C methods can be named identically as long as one is static and
the other instance.

We must support this since Apple did just this (in the NSItemProviderReading /
NSItemProviderWriting protocols).

We solve it by prepending a '+' or '-' to the selector when hashing it (to
determine selector uniqueness, and to look the method up again at runtime).
2017-09-07 13:05:44 +02:00
Rolf Bjarne Kvinge ac2203bfbc [CoreML] Improve API. (#2592)
* [CoreML] Improve API.

* The indices, shape and stride properties for MLMultiArray and
  MLMultiArrayConstraint can logically only be arrays of integers, so type
  them as such. This means adding overloads for MLMultiArray's constructors,
  GetObject and SetObject methods, and the indexers that takes nint[] arrays
  instead of NSNumber[] arrays.

* Change MLFeatureValue's static factory methods to be a method ('Create')
  instead of a preposition, and call all the different factory methods the
  same, since they can be overloaded nicely.

* [tests][monotouch-test] Add version check to MLMultiArrayTest and make sure the arrays we create are big enough for the data we put in them.

* [tests][monotouch-test] MLMultiArray's elements aren't zero-initialized, so don't assume that in the tests.
2017-09-07 11:30:55 +02:00
Rolf Bjarne Kvinge 15808c4693 Merge pull request #2571 from rolfbjarne/xcode9-matrix
Add Simd matrix types and use them to bind native Simd matrices. Fixes #58599
2017-09-05 15:33:02 +02:00
Timothy Risi c628320cda [Metal] New bindings from Xcode 9 betas (#2457) 2017-09-05 08:45:03 -04:00
Rolf Bjarne Kvinge 977a976959 [SpriteKit] SKTransformNode is new in Xcode 9 so no need to keep the broken (and obsolete) non-simd version of RotationMatrix. 2017-09-04 09:13:53 +02:00
Rolf Bjarne Kvinge 371827e7dc [monotouch-test] Exclude code that requires the binding project from xammac tests.
Exclude code that requires the test binding project from xammac tests because
there's currently no XM version of the test binding project.

Fixes this:

    tests/monotouch-test/SpriteKit/UniformTest.cs(20,7): error CS0246: The type or namespace name 'Bindings' could not be found (are you missing a using directive or an assembly reference?)
    tests/monotouch-test/ModelIO/MDLMaterialProperty.cs(37,7): error CS0246: The type or namespace name 'Bindings' could not be found (are you missing a using directive or an assembly reference?)
    tests/monotouch-test/ModelIO/MDLTransform.cs(34,7): error CS0246: The type or namespace name 'Bindings' could not be found (are you missing a using directive or an assembly reference?)
2017-09-01 12:48:49 +02:00
Rolf Bjarne Kvinge 6f2549fae6 [monotouch-tests] Include more custom asserts for watchOS to make the build work.
Fixes this:

    Simd/MatrixFloat4x4Test.cs(28,12): error CS0117: 'Asserts' does not contain a definition for 'AreEqual'
    Simd/MatrixFloat4x4Test.cs(29,12): error CS0117: 'Asserts' does not contain a definition for 'AreEqual'
    Simd/MatrixFloat4x4Test.cs(37,12): error CS0117: 'Asserts' does not contain a definition for 'AreEqual'
    Simd/MatrixFloat4x4Test.cs(48,12): error CS0117: 'Asserts' does not contain a definition for 'AreEqual'
    [...]
2017-09-01 11:34:38 +02:00
Rolf Bjarne Kvinge c2c78cee08 [SpriteKit] Use the new Simd-compatible matrix types, and deprecate the old API. 2017-08-31 14:03:13 +02:00
Rolf Bjarne Kvinge 5303155836 [GameplayKit] Use the new Simd-compatible matrix types, and deprecate the old API. 2017-08-31 14:03:12 +02:00
Rolf Bjarne Kvinge 788cd94355 [ModelIO] Use the new Simd-compatible matrix types, and deprecate the old API. 2017-08-31 14:03:12 +02:00
Rolf Bjarne Kvinge 7647972e55 [Simd] Add simd matrix types.
The OpenTK matrices (Matrix2/3/4) has a different memory layout than Apple's
matrix_float2x2/matrix_float3x3/matrix_float4x4 matrices: the OpenTK versions
are row-major, while Apple's versions are column-major.

This means that when blitting memory from one to the other, the matrix will
appear to have been transposed.

See bug #[58599][2] for an example.

Unfortunately we've already bound several API with Apple's matrix_floatXxX
matrices using OpenTK's matrices, and although they're bound wrong, and the
matrices appear transposed on input/output, we can't change the behavior
because we have to maintain compatibility.

This means we have to introduce new API, and then also just define new matrix
types with the right memory layout (column-major). Additionally, in the future
we might be able to mark these matrices as Simd-matrixes, so that the JIT/AOT
compiler can generate the correct alignment for them, avoiding having to
define a native conversion method (using the [MarshalDirective] hack).

The matrices have been designed to match API-wise the matrices in the
System.Numerics.Vectors namespace [1], but for the moment with only a few
basic operations implemented (Determinant/Transpose/Multiply) defined (we can
always add more later if we want to).

In addition explicit conversion operators to and from the corresponding
OpenTK.MatrixX are implemented, which means any operation defined in the
OpenTK matrices can be used by converting back and forth.

[1]: https://msdn.microsoft.com/en-us/library/system.numerics.matrix4x4(v=vs.111).aspx
[2]: https://bugzilla.xamarin.com/show_bug.cgi?id=58599
2017-08-31 14:03:10 +02:00
Rolf Bjarne Kvinge 1d8bbdbcbf [ModelIO] Fix MDLVoxelIndexExtent struct. (#2564)
The MDLVoxelIndexExtent is a struct containing two 4-dimensional vectors of
integers (not floats, as originally and incorrectly implemented).

Fix this my creating a new MDLVoxelIndexExtent2 struct with the right fields,
re-implement all the API that exposes this struct and obsolete the old API.

Also add missing [MarshalDirective] attributes.

And write a test to make sure it works fine now and forever.
2017-08-30 13:36:35 -04:00
Rolf Bjarne Kvinge 68f9908fd5 [ARKit] Fix marshalling for ARPointCloud.RawFeaturePoints. (#2565)
ARPointCloud.RawFeaturePoints is an array of Vector3, but each vector is
16-byte aligned (as if it were an array of Vector4).

This means we need to account for this when creating a managed array from
pointer to the native C-style array.
2017-08-30 13:32:46 -04:00
Rolf Bjarne Kvinge bc9a39fcb3 Add missing [MarshalDirective] attributes. (#2558)
* [bindings-generator] Improve build & project file.

* Add missing [MarshalDirective] attributes.

Add missing [MarshalDirective] attributes, which also requires implementing
support for out parameters in the binding generator, since one of the
signatures missing the [MarshalDirective] contains such an out parameter.

Also add tests for all the API I've added [MarshalDirective] to.

* [bindings-generator] Remove redundant if check.

* [monotouch-test] Rename file to end with 'Test.cs'.

* [tests] Fix a few build errors for Xamarin.Mac.
2017-08-29 14:59:24 +02:00
Rolf Bjarne Kvinge fc245faacc [monotouch-test] Don't subclass MKMapView. (#2556)
MKMapView doesn't like being subclassed (Apple says "you should not subclass the MKMapView class itself").

Bad things like this starts happening:

    Thread 0 name:  tid_303  Dispatch queue: com.apple.main-thread
    Thread 0 Crashed:
    0   libsystem_kernel.dylib        	0x0000000186b25348 __pthread_kill + 8
    1   libsystem_pthread.dylib       	0x0000000186c39354 pthread_kill$VARIANT$mp + 396
    2   libsystem_c.dylib             	0x0000000186a94fd8 abort + 140
    3   monotouchtest                 	0x0000000101c02c14 mono_handle_native_crash + 22047764 (mini-exceptions.c:2548)
    4   monotouchtest                 	0x0000000101c0d02c mono_sigsegv_signal_handler + 22089772 (mini-runtime.c:2886)
    5   libsystem_platform.dylib      	0x0000000186c33b60 _sigtramp + 52
    6   CoreFoundation                	0x0000000186f93108 cow_cleanup + 112
    7   CoreFoundation                	0x0000000186f93108 cow_cleanup + 112
    8   CoreFoundation                	0x0000000186eda51c -[__NSArrayM dealloc] + 68
    9   CoreFoundation                	0x000000018703f5c8 __CFBasicHashDrain + 312
    10  CoreFoundation                	0x0000000186fb5b44 _CFRelease + 224
    11  CoreText                      	0x000000018a808404 TDescriptorSource::PurgeFontFallbacksCache+ 488452 () + 92
    12  CoreText                      	0x000000018a808374 TDescriptorSource::PurgeFromCaches+ 488308 (__CFURL const*) const + 176
    13  CoreText                      	0x000000018a7eec74 CTFontRemoveFromCaches + 168
    14  VectorKit                     	0x0000000196a539b0 +[VKSharedResourcesManager removeResourceUser:] + 324
    15  VectorKit                     	0x0000000196ca27a4 md::MapEngine::~MapEngine+ 2643876 () + 360
    16  VectorKit                     	0x0000000196ca2634 md::MapEngine::~MapEngine+ 2643508 () + 12
    17  libobjc.A.dylib               	0x000000018651eef4 object_cxxDestructFromClass+ 28404 (objc_object*, objc_class*) + 148
    18  libobjc.A.dylib               	0x000000018652c638 objc_destructInstance + 88
    19  libobjc.A.dylib               	0x000000018652c690 object_dispose + 16
    20  QuartzCore                    	0x000000018afca3ac -[CALayer dealloc] + 116
    21  VectorKit                     	0x0000000196a43294 -[VKMapView dealloc] + 940
    22  QuartzCore                    	0x000000018af6aafc CA::release_objects+ 744188 (X::List<void const*>*) + 32
    23  QuartzCore                    	0x000000018afd97d8 CA::Layer::~Layer+ 1198040 () + 276
    24  QuartzCore                    	0x000000018afca37c -[CALayer dealloc] + 68
    25  QuartzCore                    	0x000000018af6b16c CA::Transaction::commit+ 745836 () + 1052
    26  UIKit                         	0x0000000190393290 _afterCACommitHandler + 256
    27  CoreFoundation                	0x0000000186fb38b8 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
    28  CoreFoundation                	0x0000000186fb1270 __CFRunLoopDoObservers + 412
    29  CoreFoundation                	0x0000000186fb182c __CFRunLoopRun + 1292
    30  CoreFoundation                	0x0000000186ed22d8 CFRunLoopRunSpecific + 436
    31  GraphicsServices              	0x0000000188d58f84 GSEventRunModal + 100
    32  UIKit                         	0x000000019040427c UIApplicationMain + 208
    33  monotouchtest                 	0x000000010106eb90 wrapper_managed_to_native_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr + 9907088 (/<unknown>:1)
    34  monotouchtest                 	0x0000000100f0d6ac UIKit_UIApplication_Main_string___intptr_intptr + 8459948 (UIApplication.cs:79)
    35  monotouchtest                 	0x0000000100f0d66c UIKit_UIApplication_Main_string___string_string + 8459884 (UIApplication.cs:63)
    36  monotouchtest                 	0x0000000100b10450 monotouchtest_Application_Main_string__ + 4277328 (Main.cs:27)
    37  monotouchtest                 	0x0000000100e0c244 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 244
    38  monotouchtest                 	0x0000000101c10048 mono_jit_runtime_invoke + 22102088 (mini-runtime.c:2526)
    39  monotouchtest                 	0x0000000101c75eec do_runtime_invoke + 22519532 (object.c:2829)
    40  monotouchtest                 	0x0000000101c78a3c do_exec_main_checked + 22530620 (object.c:4623)
    41  monotouchtest                 	0x0000000101bf9a1c mono_jit_exec + 22010396 (driver.g.c:1040)
    42  monotouchtest                 	0x0000000101d13d60 xamarin_main + 23166304 (monotouch-main.m:482)
    43  monotouchtest                 	0x00000001007de710 main + 927504 (main.m:67)
    44  libdyld.dylib                 	0x00000001869f656c start + 4
2017-08-28 16:24:07 -04:00
Vincent Dondain a628b5c799 [security] Fix SecKeyChain.QueryAsData (#2485)
- Fixes bug #58720: SecKeychain.QueryAsData returns invalid data type
(https://bugzilla.xamarin.com/show_bug.cgi?id=58720)

As per Apple's doc: https://developer.apple.com/documentation/security/keychain_services/keychain_items/item_return_result_keys?language=objc
when multiple return types are requested (when wantPersistentReference is set to true),
the underlying native return type is an NSDictionary not an NSData.

As per https://bugzilla.xamarin.com/show_bug.cgi?id=58720#c3
when trying to access the byte property of the NSData object, we'd get an "unrecognized selector sent to instance".
This is confirmed by the added test.
2017-08-24 11:31:49 -04:00
Vincent Dondain 87b5835731 [monotouch-test] Disable FontDescriptorTest.WithFeature (#2537)
Disabled because it looks like the tvOS font we use: "Gujarati Sangam MN"
does not have rare ligatures anymore (and the entire test is based on it).
Before getting an actual fix for that, let's disable the test so it doesn't break all current builds.
See: https://bugzilla.xamarin.com/show_bug.cgi?id=58929
2017-08-23 18:25:17 -04:00
Vincent Dondain 302878b99b [arkit] Update for Xcode 9 beta 5 - Part 2 (#2505)
- Add last missing selector.
- Add tests for manual code.
2017-08-23 16:58:26 -04:00
Timothy Risi bcc05aa5ff [Foundation] Update for xcode9 (#2468) 2017-08-15 08:32:51 -04:00
Vincent Dondain bded5b7b02 [homekit] Update for Xcode 9 beta 5 (#2492) 2017-08-15 08:30:37 -04:00
Sebastien Pouliot 71f1970565 [replaykit] Update up to beta 5 (#2484) 2017-08-14 13:36:30 -04:00
Rolf Bjarne Kvinge 57f8335a3b [tests] Remove workaround for radar #32688391. (#2486) 2017-08-14 15:17:17 +02:00
Sebastien Pouliot d26c6467a1 [passkit] Update to beta 5 (#2481) 2017-08-12 13:09:46 -04:00
Manuel de la Pena b7bd604162 [AudioToolbox] Update bindings to Xcode 9 beta3 (not later changes). (#2294) 2017-08-11 09:18:59 -04:00
Vincent Dondain b7b50ec3b6 [uikit] UIView/UIScrollView/UIViewController up to Xcode 9 beta 5 (#2431)
- Add NSDirectionalEdgeInsets type.
- Includes DirectionalEdgeInsetsTest.
2017-08-10 18:06:49 -04:00
Vincent Dondain c73d173ba7 [modelio] Add missing Xcode 8 asserts to tests (#2467)
- Fixes bug #58535: [iOS] MDLMeshtest failures on iOS device
(https://bugzilla.xamarin.com/show_bug.cgi?id=58535)
2017-08-09 17:44:42 -04:00
Vincent Dondain c6fda89bd2 [modelio] Add missing Xcode 8 asserts to tests (#2466)
- Fixes bug #58535: [iOS] MDLMeshtest failures on iOS device
(https://bugzilla.xamarin.com/show_bug.cgi?id=58535)
2017-08-09 17:43:25 -04:00
Rolf Bjarne Kvinge cfb6ed617c Bump to Xcode 9 beta 5. (#2447)
* Bump to Xcode 9 beta 5.

* [mmp] Disable the partial static registrar, because Apple's macOS SDK is broken.

> In file included from Xamarin.Mac.registrar.mobile.i386.m:1:
> In file included from ./Xamarin.Mac.registrar.mobile.i386.h:11:
> /Applications/Xcode9-beta5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVFoundation.h:88:9: fatal error: 'AVFoundation/AVRouteDetector.h' file not found

https://bugzilla.xamarin.com/show_bug.cgi?id=58629

* [mmp] Fix partial static registrar removal.

* [CallKit] Update to Xcode 9 beta 5.

* [ARKit] ARPointCloud doesn't conform to NSCopying anymore in Xcode 9 beta 5.

* [ARKit] Update to Xcode 9 beta 5 enough to make tests happy.

* [CoreImage] Stub out new filters in Xcode 9 beta 5.

* [tests][monotouch] Simplify some MDLMesh asserts since values change a lot between OS versions.

* [mmp] Default to the dynamic registrar for release builds again, due to bug #58629.

https://bugzilla.xamarin.com/show_bug.cgi?id=58629

* [tests][introspection] CXCall started implementing NSCopying without saying so in the headers.

* Disable mmp static registrar tests due to 58629 for now
2017-08-08 15:08:09 -04:00
Rolf Bjarne Kvinge 1296b9afb3 [monotouch-test] Remove workaround for fixed Apple bug. (#2445) 2017-08-08 08:59:59 -04:00
Rolf Bjarne Kvinge d601a18199 [tests] Add support to xharness for excluding tests that require permission dialogs, and update monotouch-test accordingly. (#2418)
* [monotouch-test] Optionally ignore tests that show permission dialogs.

* [xharness] Add support for excluding tests that require permission dialogs.

* [xharness] Ignore introspection tests if we don't want permission dialogs.

Ignore introspection tests for now if we don't want permission dialogs, since
figuring out which API requires permissions is a tedious process (which we'll
eventually have to do though).
2017-08-03 18:58:04 +02:00
Rolf Bjarne Kvinge cee1da96d8 [xharness] Fix project cloning to understand how to build test-libraries. (#2417)
Use a 'TestLibrariesDirectory' property in the project files, which is
rewritten correctly when a project is cloned.
2017-08-03 14:29:14 +02:00
Rolf Bjarne Kvinge 4176287d88 [monotouch-test] Don't blindly ignore a test since it's not only run on watchOS. (#2405)
Also this line is redundant, since the test is `#if !__WATCHOS__`
2017-08-02 16:15:35 -04:00
Rolf Bjarne Kvinge e2cdf61897 [runtime] Parameters passed on the stack use at least 8 bytes on x86-64. Fixes #58367. (#2399)
* [runtime] Make debug spew compile.

* [tests] Add test case for bug #58367.

https://bugzilla.xamarin.com/show_bug.cgi?id=58367

* [runtime] Parameters passed on the stack use at least 8 bytes on x86-64. Fixes #58367.

https://bugzilla.xamarin.com/show_bug.cgi?id=58367
2017-08-02 13:59:05 +02:00
Rolf Bjarne Kvinge f2d0a80699 [runtime] Parameters passed on the stack use at least 8 bytes on x86-64. Fixes #58367. (#2393)
* [runtime] Make debug spew compile.

* [tests] Add test case for bug #58367.

https://bugzilla.xamarin.com/show_bug.cgi?id=58367

* [runtime] Parameters passed on the stack use at least 8 bytes on x86-64. Fixes #58367.

https://bugzilla.xamarin.com/show_bug.cgi?id=58367
2017-08-02 08:26:29 +02:00
Sebastien Pouliot 15af3164aa [tests] Disable/tweak two tests that breaks on (almost) all Xcode updates
Those tests were not added to validate xOS so just keep the parts
that helps us (without constantly checking back the new break flavor)
2017-07-24 19:45:38 -04:00
Rolf Bjarne Kvinge 2b2006906f [monotouch-test] Make sure we don't run certain Intents tests on earlier iOS versions than when the API was introduced. (#2351) 2017-07-20 17:08:25 +02:00
Vincent Dondain 49b020e2b2 [spritekit] Update for Xcode 9 beta 1, 2 & 3 (#2331)
- Added Quaternion support to XI runtime (simd_quatf).
2017-07-19 16:19:02 -04:00
Vincent Dondain feb5b13d5f [uikit] Fix method names in UIDropSession & UIDragDropSession (#2314)
- Fixes bug #58079: UIDropSession loadObjects: is called Completion
  (https://bugzilla.xamarin.com/show_bug.cgi?id=58079)
- Fixes bug #58081: IUIDropSession.Completion first arg should be a Class
  (https://bugzilla.xamarin.com/show_bug.cgi?id=58081)
- Similar to `CanLoadObjects`, use `itemProviderReadingClass` as the param name in `LoadObjects`.
- Provide `Type` overloads so customers don't have to do `new ObjCRuntime.Class (typeof (UIImage))` but can just do `typeof (UIImage)` instead.
2017-07-13 17:55:56 -04:00
Manuel de la Pena 6ee7f5aae2 [Tests] add a work around to fix #57762 until bug #57825 is done. (#2300)
* [Tests] add a work around to fix 57762 until bug #57825 is done.

* Update comment with correct bug.

* Fix tests for watchos.

* Skip on watch.
2017-07-13 08:24:36 -04:00
Vincent Dondain 19d6d253a8 Bump to Xcode 9 beta 3 (#2306)
- Updated Visual Studio max version in Make.config.
- Fixed iOS introspection tests.
- Fix monotouch-test
   - Same issue with MPVolumeView as intro tests.

* Fix TrustTest

* Disable NSMutableCopying on HMCharacteristicEvent

* Fix HMCharacteristicEvent / HMMutableCharacteristicEvent
2017-07-10 22:43:44 -04:00
Vincent Dondain 9866d3aa81 [homekit] Update for Xcode 9 beta 1 & 2 (#2276) 2017-07-05 11:05:28 -04:00
Jeffrey Stedfast 6351aef095 [msbuild] Don't define __IOS__ for tvOS binding projects (#2274)
* [msbuild] Don't define __IOS__ for tvOS binding projects

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=57764

* minor fixups

* Conditional compilation.
2017-06-30 12:35:48 -04:00
Alex Soto 05edc5e2be [EventKitUI] Update to Xcode 9 Beta 1 2017-06-29 09:52:37 -05:00
Rolf Bjarne Kvinge 2448108976 [monotouch-test] Allow more values for MACaptionAppearanceGetDisplayType.
On at least one of my devices I get MACaptionAppearanceDisplayType.AlwaysOn,
while the locale is 'en'.

So just allow all valid enum values for the return type.
2017-06-28 12:31:25 -05:00
Rolf Bjarne Kvinge b4d695a4fa [monotouch-test] Make sure we don't strip symbols in any configuration. Fixes #57811. (#2259)
https://bugzilla.xamarin.com/show_bug.cgi?id=57811
2017-06-28 14:34:26 +02:00
Vincent Dondain 900f73b2b1 Bump to Xcode 9 beta 2 (#2241)
* Bump to Xcode 9 beta 2

* [CoreImage] Stub out new CIImage filters in Xcode 9 beta 2.

* [monotouch-test] Update tests according to Xcode 9 beta 2.

* [xharness] Ask watch simulator tests to write output directly to a file.

It seems the watch simulator in Xcode 9 beta 2 has completely lost network
access (everything times out), so instead ask the tests to store results
directly in the resulting file.

This works for now since the watch simulator does not enforce the sandbox.

* [xharness] Rewrite the logic to write unit output to a file so that it works with Jenkins.

For Jenkins we ask the unit tests to produce XML, and this needs some special
treatment.

* [xharness] Protect against exceptions in the listener thread, so that it doesn't take xharness down.

* [xharness] Protect against a potential NullReferenceException, and fix one case where it would occur.

* [xharness] A few logging fixes.

* [Intents] Fix API & tests according to beta 2 changes.
2017-06-26 12:47:37 +02:00
Manuel de la Pena 4eafdb150b [CoreData] Updated bindings for xcode9. (#2210)
* Updated bindings for xcode9.
* Fixed the tests to pass in those cases that NSCoding and NSSecureCoding
is supported.

A radar has been created on Apples side:

https://trello.com/c/y87bjnr9/69-32761925-nspersistenthistorytoken-supports-nssecurecoding-yet-supportssecurecoding-returns-false
2017-06-22 11:48:03 +02:00
Rolf Bjarne Kvinge d4d141756a [monotouch-test] Fix TextFieldTest.GetCaretRectForPositiont_Null correctly for tvOS. (#2204) 2017-06-10 18:43:46 -07:00
Rolf Bjarne Kvinge 2c3690fe73 [EventKit] Fix a few issues found with iOS 11 (#2198)
* [EventKit] Obsolete the EKAlarm constructor and update tests.

Apple's documentation says "Use the alarmWithAbsoluteDate: and
alarmWithRelativeOffset: class methods to create an alarm", and additionally
calling the default constructor crashes, so obsolete the constructor and don't
call it from tests either.

* [EventKit] Make EKCalendarItem abstract according to Apple's documentation.

Since EKCalendarItem is an abstract class, tests should obviously not create
instances of it - and in fact it fails:

    [FAIL] CalendarItemTest.NullAllowedTest : Foundation.MonoTouchException : Objective-C exception thrown. Name: NSInvalidArgumentException Reason: +[EKCalendarItem frozenClass]: unrecognized selector sent to class 0x10e02bfa0

* [tests] Remove removed file from xammac tests as well.
2017-06-10 00:50:01 -07:00
Rolf Bjarne Kvinge 10fafc184f [monotouch-test] Adjust the ObjCRuntime.ExceptionsTest to work when a debugger is attached. (#2197) 2017-06-09 23:21:31 -07:00
Rolf Bjarne Kvinge 03b4d91d19 [monotouch-test] Update AddressBookUI.AddressFormattingTest according to iOS 11 behavior. 2017-06-09 19:27:22 -07:00
Rolf Bjarne Kvinge 12e33970e4 [monotouch-test] Update MediaToolbox.FormatNamesTest according to iOS 11 behavior. 2017-06-09 19:27:22 -07:00
Rolf Bjarne Kvinge 9e6f5210ae [monotouch-test] Update UIKit.TextFieldTest according to iOS 11 behavior. 2017-06-09 19:27:22 -07:00
Rolf Bjarne Kvinge dc1e869c6b [monotouch-test] Ignore SceneKit.NodeTest, it crashes due to an Apple bug. 2017-06-09 19:27:22 -07:00
Rolf Bjarne Kvinge d2102d2541 [monotouch-test] Update MDLMaterialProperty test according to new behavior in iOS 11. 2017-06-09 19:27:22 -07:00
Rolf Bjarne Kvinge ec1745f996 [monotouch-test] Update AddressBook.SourceTest according to new behavior. 2017-06-09 19:27:22 -07:00
Rolf Bjarne Kvinge 60f74fb0f7 [monotouch-test] Ignore parts of AddressBookTest.PersonTest due to an Apple bug.
ABMultiValueCreateMutableCopy stopped creating a mutable copy, so our tests
fails. Ignore the corresponding test in beta 1.
2017-06-09 19:27:22 -07:00
Alex Soto 9f4becd993 [tests] Allow monotouch-tests and introspection to run with Xcode 9 Beta 1 (#2185)
* [monotouch-test] Disable EmptyNib tests due to Xcode9 no longer builds nibs if deployment target < 7.0

EmptyNib.xib : ibtool error : Compiling IB documents for earlier than iOS 7 is no longer supported.

* [monotouch-test] Fixt CalendarTest.TestEnumerateDates

It seems that NSCalendar.CurrentCalendar.EnumerateDatesStartingAfterDate
won't stop enumerating unless `stop` is set to `true`.

* [Tests] Add CheckXcodeVersion support for Xcode 9

* [introspection] Avoid introspection to crash with Xcode 9 Beta 1

* [monotouch-test] bring back LogicalName removal from monotouch-test.csproj
2017-06-07 18:03:34 -07:00
Rolf Bjarne Kvinge c8bd5e3cff [Foundation] Set 'sentRequest' when sending a request in NSUrlSessionHandler. (#1806)
* [Foundation] Set 'sentRequest' when sending a request in NSUrlSessionHandler.

Fixes this compiler warning:

> [..]/external/mono/mcs/class/System.Net.Http/HttpClientEx.cs(50,8): warning CS0649: Field `Foundation.NSUrlSessionHandler.sentRequest' is never assigned to, and will always have its default value `false'

However it changes the runtime behavior, and we'll now throw an exception in
cases that we accepted before:

* `sentRequest` is only read in `EnsureModifiability ()`, which throws an
  exception if `sentRequest` is true.
* Previously `sentRequest` was never set (thus the compiler warning), which
  meant `EnsureModifiability` would never throw an exception.
* Looking at the similar `CFNetworkHandler` (which has the identical field and
  methods), it seems that the intended behavior is to set `sentRequest` in
  `SendAsync`, and then `EnsureModifiability` is called whenever a property is
  set to ensure the property isn't set too late (and any change would be
  ignored because the request was already sent).
* This means that previously setting any property after the request was sent
  would not throw any exceptions (even though the change would be ignored),
  while with this change we'd start throwing exceptions.

* Add missing tests for the setRequest var.

* Redesign tests to make sure that all handlers run the same code.

* Fix failing test.

* Add the managed handler to the HttpClient tests.

* Fix minor style issues.
2017-06-05 09:21:28 -04:00
Rolf Bjarne Kvinge b4331523f6 [tests] Don't cap return value to 32-bit on 64-bit platforms in NSArrayTest.Sort. Fixes #53298. (#2149)
https://bugzilla.xamarin.com/show_bug.cgi?id=53298
2017-05-31 17:33:00 +02:00
Alex Soto b75f8eda31 [generator] Create CVPixelBuffer using GetINativeObject so its usable from 3rd party bindings (#2111)
* [generator] Create CVPixelBuffer using GetINativeObject so its usable from 3rd party bindings

Complements https://bugzilla.xamarin.com/show_bug.cgi?id=52665
and PR #2102

CVPixelBuffer was created using the internal handle ctor, this
did not allow 3rd party bindings to bind it correctly since it
generated not compilable code.

We now use Runtime.GetINativeObject<CVPixelBuffer> (ptr, false); just
like the base ctor https://git.io/vHvLj.

* [tests] Add IntPtr.Zero check and fix link in code

* [generator] Make comment easier to find
2017-05-19 11:10:22 -05:00
Rolf Bjarne Kvinge 9466ae5080 [registrar] Support 'out' parameters from NULL pointers. Fixes #54919. (#2106)
[registrar] Support 'out' parameters from NULL pointers. Fixes #54919.

Native code doesn't have the 'out' and 'ref' distinction C# has, and passes
NULL around left and right.

So make sure the generated code from the static registrar doesn't write to such NULLs.

https://bugzilla.xamarin.com/show_bug.cgi?id=54919
2017-05-19 12:07:12 +02:00
Sebastien Pouliot 6f68ab6f79 [tests][security] Re-enable some tests inside KeyTest. Fix #51277 (#2103)
The minimum size for RSA keypairs is 1024 bits on macOS while it is
512 bits on iOS. Some tests using the minimum size (because we test the
API not the security) were disable on macOS. This re-enables them using
the platform minimum.

https://bugzilla.xamarin.com/show_bug.cgi?id=51277
2017-05-17 21:59:35 -04:00
Chris Hamons d0963e2097 [macos] Fix test failure in CertificateTest (#2036)
- SecCertificateCopyEmailAddresses behaves differently on macOS than iOS with
 macOS getting the "documented" behavior of returning an empty array and iOS
 returning null.
- Fix the test to just accept null or 0 elements
2017-04-26 13:22:19 -05:00
Alex Soto 3fe0d2010a [CoreText] CTParagraphStyle uses the incorrect float return type. Fixes bug 54148. (#1975)
* [CoreText] Fix bug 54148 - CoreText.CTParagraphStyle does not pick up settings from CTParagraphStyleSettings

https://bugzilla.xamarin.com/show_bug.cgi?id=54148

CTParagraphStyle float properties have the incorrect float return type,
the headers state this API's returns CGFloats (aka nfloat) instead of floats
this used to work ok fetching them due to there is no difference in size
for 32 bits devices but once 64 bit devices appeared the API began to fail

The actual method that fetches the values `CTParagraphStyleGetValueForSpecifier`
asks for the size of the returned data and we used to give the size of a float
which is incorrect in 64 bits devices and the API call just correctly returned
false because it could not write back the value to us.

Added tests for the full properties available on CTParagraphStyle

* Add comment about the weird Dispose method implementation in CreateFromSettings
2017-04-10 08:24:25 +02:00
Rolf Bjarne Kvinge fc28b434c2 [monotouch-test] Fix SystemSoundTest.FromFile's audio file to not take 23s. Fixes #54236. (#1942)
In a6b9c28975 I fixed SystemSoundTest.FromFile
to not crash randomly, and at the same time I added an assert to ensure that
the playback completion handler is called properly, with a 10s timeout.

Which won't work, because the audio file is 23s long.

There's no need for a 23s audio file, so the fix is simple: cut the audio file
to 0.3s instead.

https://bugzilla.xamarin.com/show_bug.cgi?id=54236
2017-03-30 14:33:36 +02:00
Sebastien Pouliot 18cee459d6 [tests][monotouch] Stop guessing values for CreateCylinder
It's different on all platforms/SDK versions so it's pointless to use
it inside tests.
2017-03-28 18:15:02 -05:00
Sebastien Pouliot 7f650d08c3 [tests] Disable INIntentResolutionResultTests.cs on XM (it's not ready) 2017-03-28 16:31:49 -05:00
Alex Soto 8ef77344bc [Intents] Updated to Xcode 8.3 Beta1 and Beta2 (#1686)
Added more types to INIntentResolutionResultTests

Partial Test log:

[Runner executing:	Run Everything]
[MonoTouch Version:	10.3.99]
[Assembly:	Xamarin.WatchOS.dll (32 bits)]
[GC:	sgen]
[Apple Watch:	watchOS v3.2]
[Device Name:	iMacAlex]
[Device Locale:	en_US]
[Device Date/Time:	2/13/2017 11:45:10 PM]
[Bundle:	com.xamarin.monotouch-test.watchkitapp.watchkitextension]

 monotouchtest.dll

INIntentResolutionResultTests
	[PASS] INIntentResolutionResultTests.INBillPayeeResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INBillTypeResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INBooleanResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INCallRecordTypeResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INCarAirCirculationModeResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INCarAudioSourceResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INCarDefrosterResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INCarSeatResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INCarSignalOptionsResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INCurrencyAmountResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INDateComponentsRangeResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INDateComponentsResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INDoubleResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INIntegerResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INIntentResolutionResultIsAbstractTest
	[PASS] INIntentResolutionResultTests.INMessageAttributeOptionsResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INMessageAttributeResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INPaymentAccountResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INPaymentAmountResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INPaymentStatusResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INPersonResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INPlacemarkResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INRadioTypeResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INRelativeReferenceResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INRelativeSettingResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INSpeakableStringResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INStringResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INTemperatureResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INWorkoutGoalUnitTypeResolutionResultPropertyTest
	[PASS] INIntentResolutionResultTests.INWorkoutLocationTypeResolutionResultPropertyTest
INIntentResolutionResultTests : 20 ms

* [Intent] Workaround for introspection tests

Right now introspection tests fail randomly on two test targets
iOSApiCtorInitTest and iOSApiSelectorTest so we are temporary
removing them from the test suite with the hope  to have them
fixed on the next beta
2017-03-28 14:40:10 -05:00
Vincent Dondain d819d25bff [modelio] Add missing MDLMesh constructors and fix xtro (#1826)
Fixes bug #52575: Missing ModelIO API
(https://bugzilla.xamarin.com/show_bug.cgi?id=52575)

We turn the MDLMesh constructors into static ones because we don't want to lose the shape name.
Also, the signatures of these constructors differ so it would not be possible to use an enum to differentiate the shapes.
2017-03-28 10:08:12 -05:00
Sebastien Pouliot cb576d53a9 Revert "[tests] Adjust monotouch-test not to crash on an Apple bug. Fixes #52162 (#1699)"
This reverts commit b502bd71a1.
2017-03-28 09:45:24 -05:00
Vincent Dondain 13972a104b [opengles] Add version check to EAGLContext.PresentRenderBufferTest (#1706)
Fix bug #52456: [iOS]EAGLContextTest.PresentRenderBufferTest failed on lower versions of iOS
(https://bugzilla.xamarin.com/show_bug.cgi?id=52456)
2017-03-28 09:42:24 -05:00