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

56 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge 7a76bbeb64
[tools] HomeKit was added to Mac Catalyst in 14.0, so mark it as such. (#13333)
* [tools] HomeKit was added to Mac Catalyst in 14.0, so mark it as such.

Fixes this launch crash when executing on macOS 10.15:

    dyld: Library not loaded: /System/iOSSupport/System/Library/Frameworks/HomeKit.framework/Versions/A/HomeKit
      Referenced from: /Users/runner/work/1/s/artifacts/mac-test-package/tests/./linker/ios/dont link/dotnet/MacCatalyst/bin/Debug/net6.0-maccatalyst/maccatalyst-x64/dont link.app/Contents/MacOS/dont link
      Reason: image not found

* [introspection] Skip the default SKView constructor on all platforms, not only macOS.

Fixes a crash on Mac Catalyst.

* Fix SKView skipping logic.
2021-11-15 08:04:56 +01:00
Rolf Bjarne Kvinge 1713d7dd6a
[WatchKit] Remove the WatchKit framework from iOS in .NET. (#13299)
Apple removed it from iOS a few years ago.
2021-11-08 16:17:26 +01:00
Rolf Bjarne Kvinge 02f10a6583
[AppKit] Remove NSMenuView from .NET (it's a 32-bit only type). (#13291) 2021-11-08 16:15:41 +01:00
Rolf Bjarne Kvinge f3b46b955f
[runtime] Add support for toggle refs to CoreCLR. (#11757)
The code contains comments explaining the new behavior.

Some tests that poked into the private 'flags' field on NSObject had to be
updated, because the field is now named differently in .NET.

I also added two more tests for toggle ref scenarios.
2021-06-02 00:13:49 +02:00
Manuel de la Pena 01d11263b9
[Tests] Ignore tests that fail on VMs (#11524)
There are a number of tests that do not work on VMs yet our older
machines are using virtualization. Ignore those tests since we cannot
assert if they work or not.

fixes: https://github.com/xamarin/maccore/issues/2438
2021-05-13 08:41:07 -04:00
Rolf Bjarne Kvinge 9a0cd6182b
[introspection] Add/fix/remove availability attributes for Mac Catalyst to make introspection's Introduced test pass. (#10587)
Co-authored-by: Sebastien Pouliot <sebastien.pouliot@microsoft.com>
2021-04-13 15:48:20 -04:00
Alex Soto 9d1988a3c8
[tests][xcode12.2] Fix xammac tests (#9935)
* [tests][xcode12.2] Fix xammac tests

* Update tests/common/TestRuntime.cs

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>

* [xammac] Avoid multiple #if statements

* [xammac] Fix missing cases amd reduce amount of changes

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-10-21 17:12:48 -04:00
Alex Soto cb524b13a8
[introspection] Do not let intro check on QTKit now that is just stubs (#9843)
* [introspection] Do not let intro check on QTKit now that is just stubs

* Update ApiCtorInitTest.cs

* [QTKit] Fix more QT Tests

* Remove some more QT leftovers
2020-10-11 14:43:41 -04:00
Alex Soto 4129224408
[Vision] Update bindings to Xcode 12 Beta 1 - 6 (#9523)
* [Vision] Update bidnings to Xcode 12 Beta 1 - 6

* Add feedback

* fix assert messages

* Fix error message

* Apply feedback and stop all the 🤦
2020-08-28 10:57:22 -04:00
Manuel de la Pena a19b0f2c75
[Submission] Fix all the selectors that apple warns about. (#9268) (#9408)
* [Submission] Fix all the selectors that apple warns about. (#9268)

We have noticed the following message from Apple when performing
submissions with Xamarin.iOS:

> ITMS-90338: Non-public API usage - The app references non-public
> selectors in WcBc.iOS: behaviorTypes, convolutionState,
> discoverAllContactUserInfosWithCompletionHandler:,
> discoverAllContactsCompletionBlock,
> discoverUserInfoWithEmailAddress:completionHandler:,
> discoverUserInfoWithUserRecordID:completionHandler:,
> discoverUserInfosCompletionBlock, displayContact, drawableResizesAsynchronously,
> encodeToCommandBuffer:sourceImage:convolutionState:,
> encodeToCommandBuffer:sourceImage:destinationImage:state:,
> getProperty:onChannel:responseHandler:, hasProperty:onChannel:responseHandler:,
> initWithEmailAddresses:userRecordIDs:, initWithMIDIEntity:dataReadyHandler:,
> initWithZoneID:options:, initWithZoneID:subscriptionID:options:,
> isPublicDatabase, mouseUpAction, newDrawable, propertyChangedCallback,
> removeAllAppearanceStreams, replaceTextStorage:, retrieveConnectedPeripherals,
> retrievePeripherals:, setDiscoverAllContactsCompletionBlock:,
> setDiscoverUserInfosCompletionBlock:, setDrawableResizesAsynchronously:,
> setEditedMask:, setMouseUpAction:, setMovieControlMode:,
> setProperty:onChannel:responseHandler:, setPropertyChangedCallback:,
> setSocketFamily:, setTemporaryAttributes:forCharacterRange:, setUserRecordIDs:,
> sourceOffset, subscriptionOptions, takeBackgroundColorFrom:, takePasswordFrom:,
> temporalAntialiasingEnabled, userRecordIDs. If method names in your source code
> match the private Apple APIs listed above, altering your method names will help
> prevent this app from being flagged in future submissions. In addition, note
> that one or more of the above APIs may be located in a static library that was
> included with your app. If so, they must be removed. For further information,
> visit the Technical Support Information at http://developer.apple.com/support/technical/

All of them have been removed but without a break in the API excep
"initWithMIDIEntity:dataReadyHandler:" wich does look like an error on
Apples side.

Empty stubs are used as much as possible except on those cases in which
a handler is called or an output variable should be modified (buffer,
out param) to minimize the users surprise at runtime.
2020-08-21 16:30:51 -04:00
Sebastien Pouliot e7d605c128
[passkit] Update for Xcode 12 beta 4 (#9218) 2020-08-17 20:01:41 -04:00
Whitney Schmidt 6ff4eb6c97
[Xcode12][NearbyInteraction] New framework, updated through beta 4 (#9336)
* add new framework for xcode12
2020-08-10 16:06:02 -04:00
Alex Soto f9c2a62127 [MetalPerformanceShaders] Neural Networks Update to Xcode 11 (#8844)
* [MetalPerformanceShaders] Neural Networks Update to Xcode 11

This includes updates from PRs xamarin/xamarin-macios#6932, xamarin/xamarin-macios#6935 and xamarin/xamarin-macios#7461

It adds new functionality to the neural network components.
This is still not the complete API for 11.3

* Update src/metalperformanceshaders.cs

Co-Authored-By: Rolf Bjarne Kvinge <rolf@xamarin.com>

* Make changes requested by @rolfbjarne

* Fix binding of default random distribution creation

The parameterless function creates new
default distributions and is not a property.
It is a counterpart of CreateUniform.

* Expose public APIs for MPSCnnConvolutionTransposeNode

These APIs are public and documented at: https://developer.apple.com/documentation/metalperformanceshaders/mpscnnconvolutiontransposenode/2942641-initwithsource?language=objc

I have also tested that they work.

* Reintroduce compat API.

* Fix acronym casing.

* Fix introspection tests.

* Fix xtro.

* One last xtro issue.

* Fix more xtro.

* Another introspection fix.

Co-authored-By: Frank A. Krueger <fak@praeclarum.org>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>

* Apply suggestions from code review

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>

* Apply feedback

* Please the typo guardians

Co-authored-by: Frank A. Krueger <fak@praeclarum.org>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-07-26 18:27:06 -04:00
Sebastien Pouliot 376ad7444d
[authenticationservices] Update for Xcode 12 beta 2 (#9099) 2020-07-16 11:53:02 -04:00
Alex Soto 802bd4e069
[UIKit] Update bindings to Xcode 12 Beta 2 (#8992) 2020-07-10 13:21:18 -04:00
Rolf Bjarne Kvinge 952037b7a3
[tests] Remove Classic code from all tests. (#8707) 2020-05-29 16:43:06 +02:00
Sebastien Pouliot 54f2dae935
[mtouch] Add `force-rejected-types-removal` optimization (#8009)
This optimization can be enabled when it's not possible to use the
managed linker (e.g. **Don't link**) or when the managed linker cannot
remove references to deprecated types that would cause an application
to be rejected by Apple.

References to the existing types will be renamed, e.g. `UIWebView` to
`DeprecatedWebView`, in every assemblies.

The type definition is also renamed (for validity) and all custom
attributes on the types and their members will be removed.
Code inside the members will be replaced with a
`throw new NotSupportedException ();`.

The msbuild test app `MyReleaseBuild` has been updated to test that the
optimization is working as expected (device builds are slow so reusing
this test has little impact in test time).

Basically the test ensure that `UIWebView` is used and cannot be removed
by the compiler (optimization) or the managed linker (since it's
referenced). Since the optimization is enabled then we can `grep` then
final `.app` directory to ensure there's no mention of `UIWebView` inside
any of the files that would be submitted.

The application can be run, by itself, and will turn green if OK, red if
`DeprecatedWebView` can't be found (skeleton replacement for `UIWebView`)
or orange if a `NotSupportedException` is thrown.

Finally introspection tests have been updated to skip over the deprecated
(and renamed) types. It should not be an issue right now, since this
optimization is not enabled by default, but it made testing easier.
2020-03-02 09:20:29 -05: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
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
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
Alex Soto 7d7550cb26
[VisionKit] Add Xcode 11 Beta 1 - 6 bindings 2019-08-27 17:54:48 -04:00
Rolf Bjarne Kvinge d4192a59f0
[xcode11] Remove the WatchKit framework from iOS while keeping API stability. Fixes #6492. (#6503)
* [WatchKit] Remove this framework for iOS while keeping backwards compatibility. Fixes #6492.

* Copy all generated sources and modify them to throw PlatformNotSupported exceptions.
* Adjust some existing source code to also throw PlatformNotSupported exceptions.
* Sprinkle Obsolete attributes generously.
* Stop generating code for the WatchKit framework for iOS.

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

* [introspection] Adjust test.

* [mtouch] Don't link with WatchKit, and show a warning if we detect code that want to use WatchKit.

* [xtro] Remove WatchKit for iOS.

* [introspection] Don't check obsoleted NSString fields for null.

There's probably a reason the field was obsoleted.

* [introspection] Add exception for the WatchKit framework.

* [xtro] Ignore obsolete enums.

There's probably a reason they're obsoleted.

In particular it solves a confusion between WKWebKit.WKErrorCode and
WatchKit.WKErrorCode: for iOS, the latter is obsoleted, and this way we always
process the former instead.

* [mtouch] Adjust wording for MT4178 to be more accurate.

* [WatchKit] Make more API obsolete/hidden.

Two classes managed to slip past the first time.

* [tests] Adjust test after WatchKit removal.
2019-08-14 17:46:55 +02:00
Alex Soto 2d53b90723
[UIKit] Partial update to Xcode 11 Beta 1, 2 and 3 - Part 2 of ? (#6553)
* [UIKit] Partial update to Xcode 11 Beta 1, 2 and 3 - Part 2 of ?

Missing bindings for

* NSDiffableDataSourceSnapshot
* UICollectionViewDiffableDataSource
* UITableViewDiffableDataSource

due to a registrar issue git generics.

* Update src/UIKit/UIFont.cs

Co-Authored-By: Rolf Bjarne Kvinge <rolf@xamarin.com>

* Update src/uikit.cs

* More feedback

This also disables

* FloatRangeTest.Equals
* FloatRangeTest.ManagedVersusNative

due to https://github.com/xamarin/maccore/issues/1885

* [UIKIt] Start fixing `UITextWritingDirection` situation

But the complete fix is for another time https://github.com/xamarin/xamarin-macios/issues/6573
2019-07-12 13:44:24 -04:00
Sebastien Pouliot fe8104b5ca
[tvmlkit] Update for Xcode 11 beta 1 (#6396)
No change in beta 2
2019-06-21 15:00:10 -04:00
Sebastien Pouliot f5f3892825 [tests][intro] Fix post xcode10.2 merge (since reflection string output changed) 2019-04-05 14:17:36 -05: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
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 f7864d5bfc Fix introspection tests due to new reflection ctor.ToString() format
Mono is now using reflection code from corefx and the string includes namespace now.
2019-03-27 01:28:56 +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
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
Vincent Dondain f3b5b81163 [arkit] Add ARAnchorCopyingCtorTest (#4551)
- Fixes https://github.com/xamarin/xamarin-macios/issues/4497.
2018-08-02 20:29:50 -04:00
Sebastien Pouliot b63f668a4e
[tvos][tvuikit] Add new TVUIKit (up to beta 2) (#4346) 2018-06-28 08:51:38 -04:00
Alex Soto 3aa2167928
[IdentityLookupUI] Add bindings for Xcode 10 Beta 1 (#4281) 2018-06-15 20:46:35 -05:00
Alex Soto a6cbd48fab
[IntentsUI] Update bindings to Xcode 10 Beta 1 (#4262)
* [IntentsUI] Update bindings to Xcode 10 Beta 1

This commit also adds a strong dictionary version to
INPlayMediaIntentResponse.WeakNowPlayingInfo.

* Implement feedback
2018-06-15 00:35:27 -05:00
Sebastien Pouliot 5784f8daee
[authenticationservices] New iOS-only framework added in beta 1 (#4234) 2018-06-13 14:06:37 -04:00
Alex Soto 78650fb550
[CoreAudioKit] Fix macOS xtro output (#3508)
* [CoreAudioKit] Fix macOS xtro output

* Fix Midi typo

* Add trailing comma to enum value
2018-02-16 05:49:05 -06:00
Alex Soto 060eabc51f
[Appkit] Fix xtro DesignatedInitializer output (#3474)
* [Appkit] Fix xtro Initializer output

* More API fixes after Designated was introduced into existing APIs
2018-02-14 08:09:43 -06:00
Sebastien Pouliot a69e161d59
[src] Properly annotate designated initializers in many frameworks (#3142)
Correspond to xtro `!missing-designated-initializer!` errors
2017-12-28 16:37:13 -05:00
Vincent Dondain d7b7a6ea02 Merge branch 'xcode9.2' 2017-12-06 14:41:13 -05:00
Rolf Bjarne Kvinge dd95d17b5f
[generator] Properly set the IsDirectBinding value. (#3063)
* [generator] Properly set the IsDirectBinding value.

Properly set the IsDirectBinding value to false for models and synthetic types.

This also means we can now stop excluding models when testing if the
IsDirectBinding value is correct.

Also set IsDirectBinding value to true for sealed wrapper types, since those
will always be direct bindings since they can't be subclassed.

https://gist.github.com/rolfbjarne/24028bf944db848fed4083c460d0ec71

* [tests] Add introspection exclusion for XM.

* [introspection] Add back exclusions for Classic, since we can't modify/fix Classic assemblies anymore.

* [generator] Print the correct protocol name with the protocol attribute.

Fixes this test failure:

    [FAIL] Foundation.NSUrlDownloadDelegate : ConformsToProtocol(null) failed

because our binding code claimed that our `NSUrlDownloadDelegate` class
implemented the `NSUrlDownloadDelegate` protocol, but since the
`NSUrlDownloadDelegate` protocol doesn't exist (it's `NSURLDownloadDelegate` -
different case), we'd verify against a null protocol (and return true from
`ConformsToProtocol(null)`, which would fail the test).

* [xtro] Only treat interfaces as protocols.

Unfortunately we add [Protocol] to [Model]s as well as on interfaces, but we
must not process those in xtro, since they don't correspond with the actual protocol.
2017-12-01 15:18:20 +01: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 d26c6467a1 [passkit] Update to beta 5 (#2481) 2017-08-12 13:09:46 -04:00
Alex Soto b66ec4d759 [Vision] Update to Xcode 9 Beta 5 (#2458) 2017-08-09 11:12:33 -04:00
Alex Soto 1cbac6a367 [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
2017-08-04 08:06:21 -05:00
Sebastien Pouliot 3bf0305fbb [mapkit] Add new bindings up to beta 3 (#2334) 2017-07-18 08:50:48 -04:00
Alex Soto bfaf62623e [Test][Intro] Fix introspection test on API changes for Xcode 9 Beta 1 (#2191)
* [Test][Intro] Fix introspection test on API changes for Xcode 9 Beta 1

* [introspection] Fix feedback from PR and bot tests

Removed XAMCORE_4_0 checks from our api definition, and added
a file with stubs for all of them instead. Cleaner binding file
and easier to remove in the future

Fixed introspection also for mac by moving some check into base test definition

* [CoreImage] Add CoreImage stubs so introspection test are happy

These need to be manually reviewed by whoever takes CoreImage framework
tracked in bugzilla so we do not forget

* Do the same API cleanup as in NSUnit

* [test][introspection] Enable MtouchNoSymbolStrip for device builds in order to avoid linking symbols meeded by test (#2196)

Rolf Kvinge [8:59 AM]
@dalexsoto the fix is to not strip the executable please PR that
(it should probably go into master as well). This probably started
happening when Jeff implemented support for stripping debug builds
(previously the setting was ignored)

* [foundation] Provide better messages

* [CoreImage] Fix Availability of CIEdgePreserveUpsampleFilter
2017-06-10 00:07:11 -07:00
Manuel de la Pena e6130b9735 [AVFoundation] Update bindings for Xcode 8.3 (#1713)
* has some remaining issues that will be fixed in a different PR
2017-03-28 09:56:48 -05:00
Timothy Risi b5a72d7faa [Mac] Fix DefaultCtorAllowed test for NSKeyedArchiver (#1748) 2017-02-23 21:10:58 -05:00
batmaninpink 26e640ce84 [networkextension] Fix some API that works only from an extension with specific entitlements (#1158)
* Enable default constructor on NEPacketTunnelProvider
* NEPacketTunnelNetworkSettings needs the same constructor as parent class
* skip NEPacketTunnelProvider in ctor init test

From @VincentDondain 

`NEPacketTunnelProvider *a = [[NEPacketTunnelProvider alloc] init];` return `nil` without these entitlements:

```
<key>com.apple.developer.networking.networkextension</key>
<array>
    <string>packet-tunnel-provider</string>
    <string>app-proxy-provider</string>
    <string>content-filter-provider</string>
</array>
```

Note: you're also supposed to call it from its "extension process" otherwise you get: `NEProvider objects cannot be instantiated from non-extension processes.`

Hence from an iOS App Extension that has the `com.apple.networkextension.packet-tunnel` extension point.
2016-11-29 14:20:48 -05:00
Sebastien Pouliot 8c93e7758d Merge branch 'xcode8.1' 2016-10-26 15:56:34 -04:00