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

7147 Коммитов

Автор SHA1 Сообщение Дата
monojenkins e80724dd20 [xcode11.2] [Tests] If we have server errors. Mark test as inconclusive. (#7414)
If we are getting errors (500,401..) do not mark a link all test as a
failure, but as inconclusive.

Fixes: https://github.com/xamarin/maccore/issues/2056
2019-11-13 06:03:53 -05:00
monojenkins 7997cdd128 [xcode11.2] [Packaging] Ensure that when we build from source, the srcs go to the correct place. (#7406)
* [Packaging] Ensure that when we build from source, the srcs go to the correct plance.

When building from source, the install-sources command was not moving
the files correctly. This change makes sure that, if we build from
source, we do add the mono sources in the correct location.

Fixes: https://github.com/xamarin/xamarin-macios/issues/7393
2019-11-12 09:06:05 -05:00
monojenkins e2000fc20f [Install] Ensure that sources from mono are included when building from source. (#7388)
The PathManglerFactory was getting confused when building mono from
source again and since it did not find the sources in the download
directory it considered that the path to modify was part of Xamarin.

Now the factory tests first if we are getting a path from the mono
external submodule, if that is the case we know is a mono path and do
the right thing.

Fixes https://github.com/xamarin/maccore/issues/2053
2019-11-08 16:07:32 -05:00
monojenkins ceed2197cc [Install] Do not crash when the directory is not found. (#7381)
This is NOT a fix for https://github.com/xamarin/maccore/issues/2053 but
a nice thing to have to make sure that when the file cannot be copied we
have a useful debugging message. Fixing
https://github.com/xamarin/maccore/issues/2053 should be done in the
path mangler that is doing something wrong with the paths.
2019-11-07 15:48:29 -05:00
Manuel de la Pena a82239687c
[Tests] Fix introspection failing due to a typo. (#7369)
Fixes: https://github.com/xamarin/maccore/issues/2052
2019-11-06 05:14:20 -05:00
Vincent Dondain e3c2b406de Bump to Xcode 11.2 final (#7347)
* Bump to Xcode 11.2 final

* Fix xtro
2019-10-31 23:25:04 -04:00
Whitney Schmidt d90223a316
[MapKit] Xcode 11.2 update (#7331)
* mapkit 11.2

* make methods public

* add async attribute

* style fixes, using pattern
2019-10-31 11:11:41 -04:00
Pramit Mallick c4f28a1888
[MPSCore] Xcode11.1 GM Binding (#7330) 2019-10-31 10:02:53 -04:00
Manuel de la Pena 957572720e
[Tests] Fix some network tests that were leaving the connection in a bad (#7337)
state.

Some of the tests were creating connections when not needed, this
'apparetly' was leaving the internal state of the Networking API in a
bad state in which it would throw a SIGSEGV and will make the connection
of other tests fail. In this case, the Tls tests that use the Network
API.

Cleaning the tests and removing those badly managed connections ensured
that the SIGSEGV would not be thrown and got all the other tests to
work.

This is a blackbox, test now passes without problems.

Fixes: https://github.com/xamarin/maccore/issues/2048
2019-10-30 15:07:28 -04:00
Pramit Mallick 3cf957442e [Foundation] Add 'targetContentIdentifier' to macOS and watchOS 2019-10-30 14:53:55 -04:00
Pramit Mallick ecefbde776
[ARKit] Xcode11.2 Binding (#7324)
* [ARKit] Add enum for xcode11.2

* address reviews

* Added Obsolete attribute
2019-10-30 11:04:48 -04:00
Manuel de la Pena 4a9c10a85b
[Introspection] Add Mac OS X 15.15.1 on availability tests. (#7328) 2019-10-30 01:47:41 -04:00
Whitney Schmidt b71fc30f49
CoreMedia 11.2 updates (#7329) 2019-10-29 17:05:23 -04:00
Waleed Chaudhry 90982b64b4
[CoreGraphics] Add CoreGraphics bindings for xcode11.2b2 (#7327) 2019-10-29 14:06:02 -04:00
Whitney Schmidt 54572a9f7b
add avmetadata updates (#7316) 2019-10-29 11:42:55 -04:00
Whitney Schmidt 04d2436587
[Xcode 11.2] Callkit updates (#7322)
* callkit updates for 11.2

* remove availability attributes for error enum
2019-10-29 11:42:32 -04:00
Waleed Chaudhry 25da8b43a2
[AuthenticationServices] Add AuthenticationServices bindings for xcode11.2 (#7315) 2019-10-29 10:52:03 -04:00
Vincent Dondain 346dc17447
Update Xcode11.2 package version to stable (.6) (#7320)
In anticipation of Xcode 11.2 release to stable which should be any time soon now that iOS 13.2 and tvOS 13.2 are out.
2019-10-29 10:18:38 -04:00
Pramit Mallick f35569a715 [Appkit] Bindings part 4 (#7295)
Complete the AppKit bindings up to Xcode 11.2
2019-10-28 15:38:34 -04:00
Manuel de la Pena 610cefaf1e
[Tests] Fix the Network tests. (#7293)
* [Tests] Fix the Network tests.

The pattern used to Cancel then Dispose the connection is wrong and
ended up crashing the tests sometimes. It is a race condition and is
very rare, but makes the tests flaky. The changes ensures that we
Dispose the connection, which internally closes it.

Tests have been added for the NWConnection Close calls.

Also cleaned some on the CWL that were not needed.
2019-10-28 14:50:44 -04:00
Manuel de la Pena 4a9c6b994f
[Networking] Use the correct signature on SetData. Fixes #2042 (#7310)
Use the correct signature or the app will crash. Tested on a device.

Fixes: https://github.com/xamarin/maccore/issues/2042
2019-10-25 20:06:23 -04:00
Manuel de la Pena 5670872dc6
[Generator] Allow 1 level nester classes. Fixes: #7304 (#7309)
We have only encountered a case in which we had to add a nested
class/enum as the return type of a property. This fix ensures that we
can work with 1 level nested classes. A more general situation with
nested/nested/nested/.. classes is not taken into account because:

1. Would complicate too much the code.
2. Is fixing problems we do not have AFAIK.

So I'm keeping the fix simple, as I said, we have never faced anything
deeper than one level.
2019-10-25 20:06:00 -04:00
Rolf Bjarne Kvinge 34f02ff0a0
Bump mono to a hash with archives and use them. (#7299)
* Bump mono to a hash with archives and use them.

New commits in mono/mono:

* mono/mono@6af4ae7635 [2019-06][ci] Add Xcode 11.2beta2 for XI/XM Mono SDK builds

Diff: 476d72b9e3..6af4ae7635

* Bump mono to get min iOS version fix.

New commits in mono/mono:

* mono/mono@3775d5ac0a [sdks] Bump min iOS version to 7.0.

Diff: 6af4ae7635..3775d5ac0a

* [xharness] Bump mtouch tests timeout to 3h, we have a couple of new PR bots which are old and slow.

The new PR bots are late 2012 mac minis, so quite slow.
2019-10-25 22:13:20 +02:00
Manuel de la Pena e1c12bba11
[Network] Add NWFramerMessage implementation. (#7256)
Add a missing object for the type.

Co-Authored-By: Rolf Bjarne Kvinge <rolf@xamarin.com>
2019-10-24 10:40:54 -04:00
Pramit Mallick a95fe82a68 [NetworkExtension] Bindings for xcode11.2 - Added missing selector 'identifier' 2019-10-23 17:33:30 -04:00
Rolf Bjarne Kvinge 4d8ec5d531
[Network] Fix NWTxtRecord.Apply. Fixes xamarin/maccore#2036. (#7281)
The block/delegate passed to NWTxtRecord.Apply is supposed to return a bool.
Not returning anything ends up with random behavior, which causes a test
failure on Catalina:

   3) TestApply (MonoTouchFixtures.Network.NWTxtRecordTest.TestApply)
        keycount
     Expected: 4
     But was:  1

     at MonoTouchFixtures.Network.NWTxtRecordTest.TestApply () [0x000a3] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/monotouch-test/Network/NWTxtRecordTest.cs:134
     at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
     at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/external/mono/mcs/class/corlib/System.Reflection/RuntimeMethodInfo.cs:395

I've fixed the existing API to return 'true' always in the block callback, to
get consistent behavior, and in addition I've added a new overload that takes
a delegate that returns a bool, which allows the consumer of the API to decide
what to return.

Fixes https://github.com/xamarin/maccore/issues/2036.
2019-10-23 23:25:27 +02:00
Waleed Chaudhry bad61b8f5e
[StoreKit] Add StoreKit bindings for xcode11.2b2 (#7294) 2019-10-23 16:29:35 -04:00
Manuel de la Pena e537e52386
[Tests] Allow to ignore the CMattachment tests in certain namespaces. (#7286)
There are a number of namespaces that do not support the API and can be
completly skipped. Also some of the classes in those namspaces are
expensive to create and the test is not providing any useful
information.

Fixes: https://github.com/xamarin/maccore/issues/2038
2019-10-23 16:03:02 -04:00
Waleed Chaudhry c52a59358f
[UIKit] Add UIKit bindings for xcode11.2b2 (#7290) 2019-10-23 15:12:19 -04:00
Pramit Mallick fbf33357ab
[Appkit] Bindings - part 3 (#7261)
* added NSCollectionLayoutSupplementaryItem + NSCollectionLayoutItem

* added NSCollectionLayoutBoundarySupplementaryItem + NSCollectionLayoutDecorationItem

* added NSCollectionLayoutGroupCustomItem + NSCollectionViewCompositionalLayoutConfiguration

* added NSColorSampler + NSSwitch

* added NSCollectionLayoutGroup

* merge conflict resolve in todo

* merge

* merge

* merge

* added NSCollectionViewCompositionalLayout

* added NSStepperTouchBarItem

* removed DesignatedInitializer and added cases to ApiCtorInitTest

* ready for PR

* addressed reviews

* added [DisableDefaultCtor]
2019-10-23 10:15:33 -04:00
Manuel de la Pena 20df742564
[Network] Cleanup the NWProtocolMetadata. (#7270)
Co-Authored-By: Rolf Bjarne Kvinge <rolf@xamarin.com>
2019-10-22 23:49:51 +02:00
Pramit Mallick 09363654ad
[AppKit] Fix new warnings (#7278)
* throw argument exception for exhaustive case

* Update src/AppKit/NSCollectionLayoutAnchor.cs - style change

Co-Authored-By: Rolf Bjarne Kvinge <rolf@xamarin.com>
2019-10-22 17:02:15 -04:00
Rolf Bjarne Kvinge 38c59c9077
[Photos] Update to Xcode 11.2 beta 2. (#7274)
* [Photos] Update to Xcode 11.2 beta 2.

Ref: https://github.com/xamarin/maccore/issues/1797

* Fix xtro.
2019-10-22 22:31:57 +02:00
monojenkins 4f1beb3c8c [xcode11.2] [tests] Fix tests on Catalina. (#7263)
* [tests] Remove 32-bit slice from macOS test libraries. Fixes xamarin/maccore#2031.

The 32-bit slice is causing a build failure on the bots:

    Task "Exec" (TaskId:35)
      Task Parameter:Command=make bin/SimpleClassDylib.dylib bin/SimpleClassStatic.a bin/Mobile-static/MobileBinding.dll (TaskId:35)
      Task Parameter:WorkingDirectory=/Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/mmptest//../mac-binding-project/ (TaskId:35)
      make bin/SimpleClassDylib.dylib bin/SimpleClassStatic.a bin/Mobile-static/MobileBinding.dll (TaskId:35)
      In file included from ../common/mac/SimpleClass.m:1: (TaskId:35)
      In file included from ../common/mac/SimpleClass.h:1: (TaskId:35)
      In file included from /Applications/Xcode111.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13: (TaskId:35)
      In file included from /Applications/Xcode111.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:27: (TaskId:35)
      In file included from /Applications/Xcode111.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSCollectionView.h:9: (TaskId:35)
    /Applications/Xcode111.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSViewController.h(247,39): error GF2D19E48: unknown type name 'NSExtensionContext'; did you mean 'NSAnimationContext'? [/Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/xharness/tmp-test-dir/mmptest/mmptest.csproj]
      @property (nullable, readonly,retain) NSExtensionContext *extensionContext API_AVAILABLE(macos(10.10)); (TaskId:35)
                                            ^ (TaskId:35)
      /Applications/Xcode111.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSAnimationContext.h:18:12: note: 'NSAnimationContext' declared here (TaskId:35)
      @interface NSAnimationContext : NSObject (TaskId:35)
                 ^ (TaskId:35)
      In file included from ../common/mac/SimpleClass.m:1: (TaskId:35)
      In file included from ../common/mac/SimpleClass.h:1: (TaskId:35)
      In file included from /Applications/Xcode111.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13: (TaskId:35)
      In file included from /Applications/Xcode111.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:99: (TaskId:35)
      In file included from /Applications/Xcode111.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSharingServicePickerTouchBarItem.h:9: (TaskId:35)
    /Applications/Xcode111.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSharingService.h(181,119): error GC04982C4: expected a type [/Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/xharness/tmp-test-dir/mmptest/mmptest.csproj]
      - (NSCloudKitSharingServiceOptions)optionsForSharingService:(NSSharingService *)cloudKitSharingService shareProvider:(NSItemProvider *)provider; (TaskId:35)
                                                                                                                            ^ (TaskId:35)
    /Applications/Xcode111.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSSharingService.h(196,12): error G93352991: cannot find interface declaration for 'NSItemProvider' [/Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/xharness/tmp-test-dir/mmptest/mmptest.csproj]
      @interface NSItemProvider (NSCloudKitSharing) (TaskId:35)
                 ^ (TaskId:35)
      In file included from ../common/mac/SimpleClass.m:1: (TaskId:35)
      In file included from ../common/mac/SimpleClass.h:1: (TaskId:35)
      In file included from /Applications/Xcode111.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13: (TaskId:35)
      In file included from /Applications/Xcode111.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:250: (TaskId:35)
    /Applications/Xcode111.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSItemProvider.h(16,12): error G93352991: cannot find interface declaration for 'NSItemProvider' [/Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/xharness/tmp-test-dir/mmptest/mmptest.csproj]
      @interface NSItemProvider (NSItemSourceInfo) (TaskId:35)
                 ^ (TaskId:35)
      4 errors generated. (TaskId:35)
      make[1]: *** [bin/SimpleClass.i386.a] Error 1 (TaskId:35)

and since we don't need the 32-bit slice anymore, just remove it.

Fixes https://github.com/xamarin/maccore/issues/2031.

* [monotouch-test] Percent-escape some local file paths. Fixes xamarin/maccore#2032.

Fixes this xammac test failure when the csproj has paths in its path:

    1) GetCaption (MonoTouchFixtures.MediaAccessibility.ImageCaptioningTest.GetCaption)
       System.Exception : Could not initialize an instance of the type 'Foundation.NSUrl': the native 'initWithString:' method returned nil.
    It is possible to ignore this condition by setting ObjCRuntime.Class.ThrowOnInitFailure to false.
      at Foundation.NSObject.InitializeHandle (System.IntPtr handle, System.String initSelector) [0x000ab] in <c93a0a20c5e340cb9a858d96ecca3415>:0
      at Foundation.NSUrl..ctor (System.String urlString) [0x00044] in <c93a0a20c5e340cb9a858d96ecca3415>:0
      at MonoTouchFixtures.MediaAccessibility.ImageCaptioningTest.GetCaption () [0x00076] in <7a733573c3684923854270073138d4be>:0
      at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
      at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a] in <9c0bd541400747ef85267f70e32bd8e4>:0

Fixes https://github.com/xamarin/maccore/issues/2032.

* [tests] Exclude MPS tests in the simulator on macOS 10.15+. Fixes xamarin/maccore#2030.

The simulator crashes when the app tests if MPS is supported...

Fixes https://github.com/xamarin/maccore/issues/2030.

* [tests] Exclude MPS tests in the simulator on macOS 10.15+. Fixes xamarin/maccore#2030.

The simulator crashes when the app tests if MPS is supported...

Fixes https://github.com/xamarin/maccore/issues/2030.

* Fix whitespace.
2019-10-22 22:30:35 +02:00
Rolf Bjarne Kvinge 56328b8866
Fix a few introspection issues on Catalina. (#7212) (#7243)
* [SceneKit] Adjust deprecation message.

Fixes this introspection failure:

    [FAIL] [Rule 4] Don't use availability keywords in attribute's message: "OpenGL API deprecated, please use Metal instead." - Type: SCNLayer
    [FAIL] [Rule 4] Don't use availability keywords in attribute's message: "OpenGL API deprecated, please use Metal instead." - Member name: get_OpenGLContext, Type: SCNView
    [FAIL] [Rule 4] Don't use availability keywords in attribute's message: "OpenGL API deprecated, please use Metal instead." - Member name: set_OpenGLContext, Type: SCNView
    [FAIL] [Rule 4] Don't use availability keywords in attribute's message: "OpenGL API deprecated, please use Metal instead." - Member name: get_PixelFormat, Type: SCNView
    [FAIL] [Rule 4] Don't use availability keywords in attribute's message: "OpenGL API deprecated, please use Metal instead." - Member name: set_PixelFormat, Type: SCNView

* [AppKit] Adjust deprecation messages.

* [tests] Fix introspection and xammac tests on Catalina. (#7200)

* [tests] Adjust NaturalLanguage.EmbeddingTest to cope with non-existent embeddings. Fixes xamarin/maccore#2011.

Fixes https://github.com/xamarin/maccore/issues/2011.

* [tests] Fix typo test on macOS 10.15. Fixes #7116.

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

* [introspection] Ignore MTLCounterSampleBufferDescriptor's selectors.

They're implemented using a different/internal type:

    $ nm /System/Library/Frameworks/Metal.framework/Metal | grep MTLCounterSampleBuffer
    00000000000458ab t +[MTLCounterSampleBufferDescriptor allocWithZone:]
    0000000000045897 t +[MTLCounterSampleBufferDescriptor alloc]
    000000000004591e t -[MTLCounterSampleBufferDescriptor copyWithZone:]
    000000000004598e t -[MTLCounterSampleBufferDescriptorInternal copyWithZone:]
    0000000000045c0f t -[MTLCounterSampleBufferDescriptorInternal counterSet]
    0000000000045936 t -[MTLCounterSampleBufferDescriptorInternal dealloc]
    0000000000045b65 t -[MTLCounterSampleBufferDescriptorInternal hash]
    0000000000045a31 t -[MTLCounterSampleBufferDescriptorInternal isEqual:]
    0000000000045c58 t -[MTLCounterSampleBufferDescriptorInternal label]
    0000000000045c7f t -[MTLCounterSampleBufferDescriptorInternal sampleCount]
    0000000000045c25 t -[MTLCounterSampleBufferDescriptorInternal setCounterSet:]
    0000000000045c6e t -[MTLCounterSampleBufferDescriptorInternal setLabel:]
    0000000000045c90 t -[MTLCounterSampleBufferDescriptorInternal setSampleCount:]
    0000000000045c47 t -[MTLCounterSampleBufferDescriptorInternal setStorageMode:]
    0000000000045c36 t -[MTLCounterSampleBufferDescriptorInternal storageMode]
    000000000010b0b8 S _OBJC_CLASS_$_MTLCounterSampleBufferDescriptor
    000000000010b0e0 S _OBJC_CLASS_$_MTLCounterSampleBufferDescriptorInternal
    0000000000107070 S _OBJC_IVAR_$_MTLCounterSampleBufferDescriptorInternal._counterSet
    0000000000107078 S _OBJC_IVAR_$_MTLCounterSampleBufferDescriptorInternal._label
    0000000000107088 S _OBJC_IVAR_$_MTLCounterSampleBufferDescriptorInternal._sampleCount
    0000000000107080 S _OBJC_IVAR_$_MTLCounterSampleBufferDescriptorInternal._storageMode
    000000000010b108 S _OBJC_METACLASS_$_MTLCounterSampleBufferDescriptor
    000000000010b130 S _OBJC_METACLASS_$_MTLCounterSampleBufferDescriptorInternal

Fixes these test failures:

    1) ApiSelectorTest.InstanceMethods (Introspection.MacApiSelectorTest.ApiSelectorTest.InstanceMethods)
         8 errors found in 26658 instance selector validated:
    Selector not found for Metal.MTLCounterSampleBufferDescriptor : counterSet
    Selector not found for Metal.MTLCounterSampleBufferDescriptor : setCounterSet:
    Selector not found for Metal.MTLCounterSampleBufferDescriptor : label
    Selector not found for Metal.MTLCounterSampleBufferDescriptor : setLabel:
    Selector not found for Metal.MTLCounterSampleBufferDescriptor : sampleCount
    Selector not found for Metal.MTLCounterSampleBufferDescriptor : setSampleCount:
    Selector not found for Metal.MTLCounterSampleBufferDescriptor : storageMode
    Selector not found for Metal.MTLCounterSampleBufferDescriptor : setStorageMode:

* [introspection] Ignore some API we've bound incorrectly. Fixes #7116.

There are also a few API fixes, those will be submitted in a different PR.

Fixes https://github.com/xamarin/xamarin-macios/issues/7116.
2019-10-22 22:30:19 +02:00
Pramit Mallick e3c9fb0a99
Xcode11.2 HomeKit bindings (#7268) 2019-10-22 09:45:58 -04:00
Manuel de la Pena 6c75de0a6a
[Network] Add more convinient callbacks. (#7252)
Providing callbacks with DispatchData and Int + length is not nice for
the non advance users. Added set of methods that will use callbacks that
will provide the users with ReadOnlySpan, which is nicer and makes it
work with the API easier.

Also, the change allows users to avoid unsafe code.
2019-10-22 00:36:33 +02:00
Vincent Dondain 89516b94e5 [xcode11.2] Bump mono 2019-06@476d72b (#7260)
New commits in mono/mono:

* mono/mono@476d72b9e3 [IO] Remove read-only logic in mono_w32_get_disk_free_space
* mono/mono@bdc557612b [2019-06][merp] Don't install SIGTERM handler in EnableMicrosoftTelemetry (#17296)
* mono/mono@1e2d850ec4 [tests] Bump corefx to get Azure testhost change (#17275)
* mono/mono@703e9a2fad [2019-06] Add drawing type converters to mobile profiles (#17241)
* mono/mono@4ec605fc9b If there is a perform_wait_callback in the stack there will be another catch generated by the method called in the owner thread, so we don't need to throw as unhandled exception, we can continue and find the next catch.
* mono/mono@061c225621 [merp] exit_status is 0 if we ran the uploader successfully (#17186)
* mono/mono@07c23f2ca4 [crashing] Remove Mono signal handlers when starting to handle a crash

Diff: 5608fe0abb..476d72b9e3
2019-10-21 08:06:34 +02:00
Manuel de la Pena ca1d26c2b1
[Network] NWWebsocketMetadata is a NWProtocolMetadata. (#7257) 2019-10-20 22:12:30 +02:00
Rolf Bjarne Kvinge 8411955e2f
[CoreImage] Fix a couple of test/availability issues. (#7259)
Fixes this on macOS 10.9:

    1) ApiCtorInitTest.DefaultCtorAllowed (Introspection.MacApiCtorInitTest.ApiCtorInitTest.DefaultCtorAllowed)
         1 potential errors found in 860 default ctor validated:
    CoreImage.CIMaskedVariableBlur : Handle

      Expected: 0
      But was:  1

      at Introspection.ApiCtorInitTest.DefaultCtorAllowed () [0x0019b] in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/tests/introspection/ApiCtorInitTest.cs:295
      at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
      at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a] in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/external/mono/mcs/class/corlib/System.Reflection/RuntimeMethodInfo.cs:395

    2) ApiCoreImageFiltersTest.Keys (Introspection.MacCoreImageFiltersTest.ApiCoreImageFiltersTest.Keys)
       System.ArgumentNullException : Value cannot be null.
    Parameter name: array
      at System.Array.IndexOf[T] (T[] array, T value) [0x0000e] in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/external/mono/external/corert/src/System.Private.CoreLib/src/System/Array.cs:666
      at Introspection.ApiCoreImageFiltersTest.Keys () [0x002b7] in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/tests/introspection/ApiCoreImageFiltersTest.cs:445
      at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
      at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a] in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/external/mono/mcs/class/corlib/System.Reflection/RuntimeMethodInfo.cs:395

    3) ApiCoreImageFiltersTest.Protocols (Introspection.MacCoreImageFiltersTest.ApiCoreImageFiltersTest.Protocols)
         1 potential errors found:
    Managed CIMaskedVariableBlur was not part of the native filter list

      Expected: 0
      But was:  1

      at Introspection.ApiCoreImageFiltersTest.Protocols () [0x0104e] in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/tests/introspection/ApiCoreImageFiltersTest.cs:370
      at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
      at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a] in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/external/mono/mcs/class/corlib/System.Reflection/RuntimeMethodInfo.cs:395

And this on macOS 10.10:

    1) ApiCoreImageFiltersTest.Keys (Introspection.MacCoreImageFiltersTest.ApiCoreImageFiltersTest.Keys)
         1 potential errors found:
    CICode128BarcodeGenerator: Property `BarcodeHeight` mapped to key `inputBarcodeHeight` is not part of `InputKeys`.

      Expected: 0
      But was:  1

      at Introspection.ApiCoreImageFiltersTest.Keys () [0x006b1] in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/tests/introspection/ApiCoreImageFiltersTest.cs:524
      at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
      at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a] in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/external/mono/mcs/class/corlib/System.Reflection/RuntimeMethodInfo.cs:395

    2) ApiCoreImageFiltersTest.Protocols (Introspection.MacCoreImageFiltersTest.ApiCoreImageFiltersTest.Protocols)
         1 potential errors found:
    CICode128BarcodeGenerator: Property `BarcodeHeight` mapped to key `inputBarcodeHeight` is not part of `InputKeys`.

      Expected: 0
      But was:  1

      at Introspection.ApiCoreImageFiltersTest.Protocols () [0x0104e] in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/tests/introspection/ApiCoreImageFiltersTest.cs:370
      at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
      at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a] in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/external/mono/mcs/class/corlib/System.Reflection/RuntimeMethodInfo.cs:395

And this on macOS 11.11:

    1) ApiCoreImageFiltersTest.Keys (Introspection.MacCoreImageFiltersTest.ApiCoreImageFiltersTest.Keys)
         2 potential errors found:
    CICode128BarcodeGenerator: Property `BarcodeHeight` mapped to key `inputBarcodeHeight` is not part of `InputKeys`.
    CIGaussianBlur: Output Key `outputImageV1` is NOT mapped to a `OutputImageV1` property.

      Expected: 0
      But was:  2

      at Introspection.ApiCoreImageFiltersTest.Keys () [0x006b1] in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/tests/introspection/ApiCoreImageFiltersTest.cs:524
      at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
      at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a] in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/external/mono/mcs/class/corlib/System.Reflection/RuntimeMethodInfo.cs:395

    2) ApiCoreImageFiltersTest.Protocols (Introspection.MacCoreImageFiltersTest.ApiCoreImageFiltersTest.Protocols)
         2 potential errors found:
    CICode128BarcodeGenerator: Property `BarcodeHeight` mapped to key `inputBarcodeHeight` is not part of `InputKeys`.
    CIGaussianBlur: Output Key `outputImageV1` is NOT mapped to a `OutputImageV1` property.

      Expected: 0
      But was:  2

      at Introspection.ApiCoreImageFiltersTest.Protocols () [0x0104e] in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/tests/introspection/ApiCoreImageFiltersTest.cs:370
      at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
      at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a] in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/external/mono/mcs/class/corlib/System.Reflection/RuntimeMethodInfo.cs:395
2019-10-18 22:42:12 +02:00
Pramit Mallick dc72d592cf
[Appkit] Bindings - part 2 (#7215)
* Added NSButtonTouchBarItem interface

* Added NSTextScalingType

* name changes

* Text Scaling options

* Deprecated KeyEquivalentFont

* Deprecated CopiesOnScroll

* Added missing enums first

* Added some deprecated attributes

* some more deprecations

* Strong typed TextScaling

* apple docs to correct deprecations

* Changed deprecated messages

* strong typing NSTouchBarItemIdentifier identifier

* internal attr

* Making TextScalingDocumentOption simple Fields following UIKit

* Moved NSDirectionalEdgeInsets

* Added NSCollectionLayoutAnchor

* removed extra methods for mac from xkit/types

* removed todos

* added automaticCustomizeTouchBarMenuItemEnabled

* added NSCollectionLayoutDimension

* added NSPickerTouchBarItem

* added NSCollectionLayoutSize

* added NSCollectionLayoutSpacing

* added NSCollectionLayoutEdgeSpacing

* added DesignatedInitializer

* addressed reviews

* naming + alignment

* adding test case for NSPickerTouchBarItem .ctor

* added comment

* removed deprecated selectors to ignore

* updated copyright info in Xkit/Types header
2019-10-18 15:45:34 -04:00
Manuel de la Pena a50ec24e4a
[Network] Clean up the protocol options class. (#7196)
Add classes for each of the protocol types. Deprecated the old methods.
2019-10-18 04:04:41 +02:00
Rolf Bjarne Kvinge 316abefa71 Bump system mono to get fix for mono/mono#17151. (#7220) (#7247)
mono/mono#17151 prevents xharness from running tests on Catalina, because
xharness thinks the root drive has no more space.
2019-10-17 17:41:51 +02:00
Manuel de la Pena 9f385f7794
[Networking] Add a generic method to get the metadata from the context. (#7244)
* [Networking] Add a generic method to get the metadata from the context.

There are different types of NWProtocolMetadata, being one of them (to be
added later) the NWFramerMessage that exposes extra methods.

With the current API we can only do:

```
var metadata = context.GetProtocolMetadata (protocol.ProtocolDefinition);
```

Which just returns the generic object, and if the protocol definition is
from a NWFramer, we want to be able to get the correct metadata object.

With the provided method you can do:

```
var metadata = context.GetProtocolMetadata<NWFramerMessage> (protocol.ProtocolDefinition);
```

Which allows the user to specify the expected metadata type from a given
protocol definition.
2019-10-17 17:04:42 +02:00
Sebastien Pouliot a50c753117
[coreimage] Update for Xcode 11[.2] (#7216)
Apple decided to expose most (but not all) `CIFilter` using protocols
(instead of weakly named dictionaries). Most of this maps well with
our strong bindings but there are cases where we:

* missing some properties (easy, there were added); or
* used a different types [1] and that requires new members / obsoletion

A few other API were also added in Xcode 11 (nothing in 11.1 or 11.2) and
included in this PR.

New introspection tests were also added to minimize the risk that
the API and generator changes produced incorrect code. This lead
to the finding of some missing API (in particular `Output*` properties)
that were added.

[1] Often ours are better (using `float` for a `bool` value is not
optimal) but we do not have `[BindAs]` for protocols :( to _fix_ them

Note: this replace draft PR https://github.com/xamarin/xamarin-macios/pull/7120 but it's has quite a bit of changes in filter generation (inlining protocols) and that affected bindings too.
2019-10-16 09:16:32 -04:00
Pramit Mallick 6cee62c10c
[AppKit] Bindings - part 1 (#7187)
* Added NSButtonTouchBarItem interface

* Added NSTextScalingType

* name changes

* Text Scaling options

* Deprecated KeyEquivalentFont

* Deprecated CopiesOnScroll

* Added missing enums first

* Added some deprecated attributes

* some more deprecations

* Strong typed TextScaling

* apple docs to correct deprecations

* Changed deprecated messages

* strong typing NSTouchBarItemIdentifier identifier

* internal attr

* Making TextScalingDocumentOption simple Fields following UIKit

* smart enum for identifier
2019-10-15 17:41:56 -04:00
Manuel de la Pena 4cff2bc4e3
[Networking] Improve the NWBrowser API. (#7214)
Kept the API as it was but added a new handler that will be called when
all the changes from the browser have been done. The old Set* method
could be deleted in a future release and just expose the property.
2019-10-15 14:31:31 -04:00
Vincent Dondain 5c102d920f
Bump for Xcode 11.2 beta 2 (#7223) 2019-10-15 11:18:29 -04:00
Waleed Chaudhry b3d566db3b
[WatchKit] Add WatchKit bindings for Xcode 11.2 (#7202)
* [WatchKit] Add WatchKit bindings for Xcode 11.2
2019-10-11 11:00:31 -04:00
Vincent Dondain 07e9dd0b06
Bump for Xcode 11.2 beta 1 (#7195) 2019-10-08 23:57:41 -04:00