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

798 Коммитов

Автор SHA1 Сообщение Дата
Manuel de la Pena dcb0c93ab0 [Xcode12] Bring xcode 12 changes into main. 2020-09-23 16:05:22 -04:00
Rolf Bjarne Kvinge 7756d957f9
[dotnet] Tell the linker about any xml descriptors we might have. (#9676)
Also add a linker descriptor to the monotouch-test/.NET project file to
preserve the parts of nunit.framework.dll that aren't linker safe.

This fixes an unhandled exception that causes a crash during the
monotouch-test test run when the linker is enabled:

    Unhandled Exception:
    System.NullReferenceException: Object reference not set to an instance of an object

    Thread 11 Crashed:: tid_15403  Dispatch queue: com.apple.root.default-qos
    0   libsystem_kernel.dylib        	0x00007fff5220c33a __pthread_kill + 10
    1   libsystem_pthread.dylib       	0x00007fff522b6e60 pthread_kill + 430
    2   libsystem_c.dylib             	0x00007fff5219bb7c abort + 120
    3   libxamarin-debug.dylib        	0x000000010c93979f xamarin_unhandled_exception_handler + 47
    4   libmonosgen-2.0.dylib         	0x000000010cc04980 mono_invoke_unhandled_exception_hook + 131
    5   libmonosgen-2.0.dylib         	0x000000010cb40166 mono_handle_exception_internal + 5915
    6   libmonosgen-2.0.dylib         	0x000000010cb3ea47 mono_handle_exception + 11
    7   libmonosgen-2.0.dylib         	0x000000010cb8ea06 mono_amd64_throw_exception + 158
    8   ???                           	0x000000010d4125b0 0 + 4517340592
    9   libxamarin-debug.dylib        	0x000000010c9394fb xamarin_process_managed_exception + 379 (runtime.m:2361)
    10  libxamarin-debug.dylib        	0x000000010c939377 xamarin_process_managed_exception_gchandle + 55 (runtime.m:1144)
    11  libxamarin-debug.dylib        	0x000000010c939333 xamarin_ftnptr_exception_handler + 19 (runtime.m:1133)
    12  libmonosgen-2.0.dylib         	0x000000010cb3feeb mono_handle_exception_internal + 5280
    13  libmonosgen-2.0.dylib         	0x000000010cb3ea47 mono_handle_exception + 11
    14  libmonosgen-2.0.dylib         	0x000000010cb8f2dd handle_signal_exception + 67
    15  ???                           	0x000070000fd730d8 0 + 123145568071896
    16  ???                           	0x000000011a3ab99b 0 + 4735023515
    17  ???                           	0x000000011a3aa643 0 + 4735018563
    18  libdispatch.dylib             	0x00007fff52090a0f _dispatch_queue_override_invoke + 1071
    19  libdispatch.dylib             	0x00007fff5209dcc5 _dispatch_root_queue_drain + 350
    20  libdispatch.dylib             	0x00007fff5209e46a _dispatch_worker_thread2 + 102
    21  libsystem_pthread.dylib       	0x00007fff522b39f7 _pthread_wqthread + 220
    22  libsystem_pthread.dylib       	0x00007fff522b2b77 start_wqthread + 15
2020-09-22 09:15:33 +02:00
Manuel de la Pena eb9b690fe0 Merge xcode12 into d16-8. 2020-09-18 17:51:52 -04:00
Rolf Bjarne Kvinge 3461d8186f
[monotouch-test] Don't assert any specific value for the ReusedConnection value in UrlSessionTaskTransactionMetricsTest. Fixes #xamarin/maccore@2281. (#9660)
Fixes https://github.com/xamarin/maccore/issues/2281.
2020-09-18 09:08:16 +02:00
Rolf Bjarne Kvinge d53a2336ad
[monotouch-test] Rework CBCentralManagerTest to handle not having permissions. (#9661)
1. Assert that we got permission to CoreBluetooth before doing anything. This
   makes it so that if permission has been denied, or if we're running on the
   bots and permission has not been granted, these tests won't run. It does
   not affect local test runs where permissions haven't been granted nor
   denied.

2. Rework the code to wait for CoreBluetooth to power on in the SetUp method.
   Mark the test as inconclusive if CoreBluetooth never powers on (this
   happens if nobody answers the bluetooth permission dialog, quite typical
   when running tests locally).

Fixes these tests when running locally on a tvOS device:

    MonoTouchFixtures.CoreBluetooth.CBCentralManagerTest
        [FAIL] Constructors
        [FAIL] ScanForPeripherals
2020-09-18 09:07:31 +02:00
Sebastien Pouliot 25c361f43e
[xcode12][intro] Fix running introspection on old macOS versions (#9638)
Most fixes are inside Intents. Some types were not available on macOS
and marked as such, except it backfired.

* Adding `[NoMac]` on `XAMCORE_4_0` was fine
* Adding `[Obsolete]` outside `XAMCORE_4_0` was fine
* Removing the `[Mac (x,y)]` was not quite fine. It's true (since it was never on macOS) but removing it means it default to the oldest (10.9) macOS version we support. This is what the introspection tests were expecting.

Adding an `[Obsoleted (..., 10,0, ...)]` solve this.
2020-09-15 12:59:21 -04:00
Rolf Bjarne Kvinge e1ac701421
[tests] Rework a few tests to not throw exceptions in a background thread. (#9636)
Uncaught exceptions in a background thread will cause the process to crash.
Instead marshal any exceptions to the main thread, which asserts that no
exceptions were thrown.
2020-09-15 16:50:50 +02:00
monojenkins ee0516d46a
[Foundation] Fix NSUrl's implicit Uri operators. Fixes #9607. (#9611)
Calling Uri.PathAndQuery is not allowed on a relative Uri, which made the
previous Uri -> NSUrl implicit operator always throw if given a relative
NSUrl.

So I fixed that, added several tests, and found another issue (it turns out
that 'url.RelativePath == url.Path' is not a reliable way to detect absolute
urls, because it's true for relative urls as well) and fixed that too.

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

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-09-14 08:08:12 +02:00
Manuel de la Pena 2147976458
[Metal] Update framework for xcode 12 beta 6. (#9569)
Co-authored-by: Alex Soto <alex@alexsoto.me>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-09-11 16:06:22 -04:00
Manuel de la Pena 5a9139bcd6
[AudioToolbox] Update API to xcode 12 beta 6. (#9603)
The most important changes in the API are ignored until we fix issue https://github.com/xamarin/xamarin-macios/issues/9602
2020-09-11 10:36:54 -04:00
Rolf Bjarne Kvinge ae1fe7a53d
[Foundation] Fix NSUrl's implicit Uri operators. Fixes #9607. (#9610)
Calling Uri.PathAndQuery is not allowed on a relative Uri, which made the
previous Uri -> NSUrl implicit operator always throw if given a relative
NSUrl.

So I fixed that, added several tests, and found another issue (it turns out
that 'url.RelativePath == url.Path' is not a reliable way to detect absolute
urls, because it's true for relative urls as well) and fixed that too.

Fixes https://github.com/xamarin/xamarin-macios/issues/9607.
2020-09-10 08:29:09 +02:00
Rolf Bjarne Kvinge 7a79845d86
[tests] Add DYNAMIC_REGISTAR when we're using the dynamic registrar in the .NET version of monotouch-test. (#9605)
This makes sure the tests know which registrar we're using, and can act accordingly.
2020-09-09 12:07:53 +02:00
Rolf Bjarne Kvinge d2788511b6
[dotnet] Use net5.0-[ios|tvos|watchos|macos] TargetFrameworks. (#9532)
* [dotnet] Set TargetPlatformSupported when the right TargetPlatformIdentifier is used.

* [dotnet] Generate a list of valid OS versions for each platform, and add it to the SupportedTargetPlatform item group.

The generated files: https://gist.github.com/rolfbjarne/765c4e4b38b1b017380c9378d9666317

* [dotnet] Define and set the default platform version if it's not set in the TargetFramework variable.

* [dotnet] Switch to using the new-style TargetFramework values.

This includes bumping spouliot/Touch.Unit to get new-style TargetFramework values for Touch.Client.

* spouliot/Touch.Unit@89afaf7 [Touch.Client] Use the right TargetFrameworks for watchOS and macOS as well. (#92)
* spouliot/Touch.Unit@fd0e576 [Touch.Client] Use the right TargetFrameworks. (#91)
* spouliot/Touch.Unit@40f47db [Touch.Client] Add a macOS and watchOS version for .NET. (#90)
* spouliot/Touch.Unit@1d4b8c0 Add .gitignore for NuGet.config and global.json. (#89)
* spouliot/Touch.Unit@49441f3 Call `mlaunch` instead of `mtouch` (#88)
* spouliot/Touch.Unit@b157cf4 Fix a few markdown issues found by markdownlint. (#87)

Diff: d7f55a6167..89afaf7e05

* [dotnet] Document the script that generates the lists of the target platform versions a little bit better.

* [dotnet] Make the [Platform]SupportedTargetPlatform variables public.

This matches how Android and Windows do it:

* https://github.com/xamarin/xamarin-android/pull/5007
* 18ee4eac8b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.WindowsSupportedTargetPlatforms.props

* [xharness] Update the TargetFramework value when creating project variations.
2020-08-31 09:27:19 +02:00
Whitney Schmidt efe8abd606
[CarPlay] [Xcode 12] Update through beta 6 (#9479)
* carplay initial updates through beta 6
2020-08-28 13:45:43 -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
Rolf Bjarne Kvinge e77a737c08
[xharness] Enable monotouch-test/.NET by default, but ignore all variations. (#9526)
* [xharness] Enable monotouch-test/.NET by default, but ignore all variations.

The default (Debug) configuration is green now, but the rest of the variations aren't yet.

* [tests] Ignore LocaleTest.InitRegionInfo in .NET because it needs globalization data.

Ref: https://github.com/xamarin/xamarin-macios/issues/8906

I can't reproduce locally, because it's ignored for me:

    [INCONCLUSIVE] InitRegionInfo : You can construct locale without countries
        at MonoTouchFixtures.Foundation.LocaleTest.InitRegionInfo() in [...]/xamarin-macios/tests/monotouch-test/Foundation/LocaleTest.cs:line 47

but this should fix this monotouch-test test failure (I'm guessing that 'IV'
stands for 'Invariant', which is all the current .NET version ships with):

    MonoTouchFixtures.Foundation.LocaleTest
        [FAIL] InitRegionInfo :   Name
            String lengths are both 2. Strings differ at index 0.
            Expected: "US"
            But was:  "IV"
            -----------^
                 :    at MonoTouchFixtures.Foundation.LocaleTest.InitRegionInfo() in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/monotouch-test/Foundation/LocaleTest.cs:line 49
2020-08-27 16:54:08 +02:00
Sebastien Pouliot 6879dcf8bb
[tests][security] Re-enable two disabled tests after validation (#9483) 2020-08-25 08:46:57 -04:00
Manuel de la Pena 010a71cda5
[VideoToolBox] Update framework to xcode 12 beta 5. (#9457) 2020-08-24 17:39:35 -04:00
monojenkins 13fb928665
[d16-8] [Bug] Fix AVAudioFormat failure on older OS (#9473)
* fix_avaudioformat_monotouch_failure

Co-authored-by: Whitney Schmidt <whschm@microsoft.com>
2020-08-24 13:59:18 -04:00
monojenkins cc65a73493
[xcode12] [Bug] Fix AVAudioFormat failure on older OS (#9474)
* fix_avaudioformat_monotouch_failure

Co-authored-by: Whitney Schmidt <whschm@microsoft.com>
2020-08-24 13:58:56 -04:00
Rolf Bjarne Kvinge 40eea04c96
[dotnet] Don't include the F# library in monotouch-test yet, it makes the linker crash. (#9462) 2020-08-24 17:55:42 +02:00
Rolf Bjarne Kvinge 82ad02c616
[dotnet/monotouch-test] Disable tests that require Crypto for .NET. (#9463)
Crypto hasn't been implemented yet in .NET for iOS.

This fixes a crash because these tests cause an unhandled exception on the
finalizer thread (which crashes the process):

    Unhandled Exception:
    System.EntryPointNotFoundException: AppleCryptoNative_SecKeychainItemCopyKeychain assembly:<unknown assembly> type:<unknown type> member:(null)
       at Interop.AppleCrypto.SecKeychainItemCopyKeychain(IntPtr item)
       at System.Security.Cryptography.Apple.SafeTemporaryKeychainHandle.UntrackItem(IntPtr keychainItem)
       at System.Security.Cryptography.Apple.SafeKeychainItemHandle.ReleaseHandle()
       at System.Runtime.InteropServices.SafeHandle.InternalRelease(Boolean disposeOrFinalizeOperation)
       at System.Runtime.InteropServices.SafeHandle.Dispose(Boolean disposing)
       at System.Runtime.InteropServices.SafeHandle.Finalize()

    =================================================================
    	Native Crash Reporting
    =================================================================
    Got a abrt while executing native code. This usually indicates
    a fatal error in the mono runtime or one of the native libraries
    used by your application.
    =================================================================

    =================================================================
    	Native stacktrace:
    =================================================================
    	0x108bfc396 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/A23AD847-E868-4895-ADBA-036D4E87BA35/monotouchtest.app/libmonosgen-2.0.dylib : mono_dump_native_crash_info
    	0x108ba878f - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/A23AD847-E868-4895-ADBA-036D4E87BA35/monotouchtest.app/libmonosgen-2.0.dylib : mono_handle_native_crash
    	0x108bfbbed - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/A23AD847-E868-4895-ADBA-036D4E87BA35/monotouchtest.app/libmonosgen-2.0.dylib : sigabrt_signal_handler
    	0x7fff51c005fd - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libsystem_platform.dylib : _sigtramp
    	0x0 - Unknown
    	0x7fff51af0b7c - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libsystem_c.dylib : abort
    	0x1089bf7ef - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/A23AD847-E868-4895-ADBA-036D4E87BA35/monotouchtest.app/libxamarin-debug.dylib : xamarin_unhandled_exception_handler
    	0x108c69548 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/A23AD847-E868-4895-ADBA-036D4E87BA35/monotouchtest.app/libmonosgen-2.0.dylib : mono_invoke_unhandled_exception_hook
    	0x108cc688c - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/A23AD847-E868-4895-ADBA-036D4E87BA35/monotouchtest.app/libmonosgen-2.0.dylib : mono_thread_internal_unhandled_exception
    	0x108cf5ad5 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/A23AD847-E868-4895-ADBA-036D4E87BA35/monotouchtest.app/libmonosgen-2.0.dylib : mono_gc_run_finalize
    	0x108d0f095 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/A23AD847-E868-4895-ADBA-036D4E87BA35/monotouchtest.app/libmonosgen-2.0.dylib : sgen_gc_invoke_finalizers
    	0x108cf73cf - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/A23AD847-E868-4895-ADBA-036D4E87BA35/monotouchtest.app/libmonosgen-2.0.dylib : finalizer_thread
    	0x108cc7081 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/A23AD847-E868-4895-ADBA-036D4E87BA35/monotouchtest.app/libmonosgen-2.0.dylib : start_wrapper_internal
    	0x108cc6f39 - /Users/rolf/Library/Developer/CoreSimulator/Devices/289E372A-501C-4499-A1A6-59C5B3B6A9AE/data/Containers/Bundle/Application/A23AD847-E868-4895-ADBA-036D4E87BA35/monotouchtest.app/libmonosgen-2.0.dylib : start_wrapper
    	0x7fff51c0c109 - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libsystem_pthread.dylib : _pthread_start
    	0x7fff51c07b8b - /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/libsystem_pthread.dylib : thread_start
2020-08-24 17:55:24 +02:00
Rolf Bjarne Kvinge 54622428a9
[monotouch-test] Don't run the mono tests for the System.Drawing types in .NET (#9464)
A System.Drawing.Point test fails because it tests GetHashCode, which returns
a different value in .NET. None of the System.Drawing tests actually test any
of our code (when using .NET), so the fix is to just not include the
System.Drawing tests in the first place.

Fixes this test failure:

    MonoTests.System.Drawing.PointTest
        [FAIL] GetHashCodeTest :   #1
            Expected: 32
            But was:  1527927283
                at MonoTests.System.Drawing.PointTest.GetHashCodeTest() in /Users/rolf/work/maccore/squashed-onedotnet/xamarin-macios/builds/mono-ios-sdk-destdir/ios-sources/mcs/class/System.Drawing/Test/System.Drawing/TestPoint.cs:line 198
2020-08-24 17:55:10 +02:00
Rolf Bjarne Kvinge d29356df3a
[monotouch-test] Ignore an autoreleasepool threadpool test which is a known issue in .NET. (#9465)
Fixes this test failure:

    MonoTouchFixtures.ObjCRuntime.RuntimeTest
		[FAIL] NSAutoreleasePoolInThreadPool :   RC. Iterations: 101
			Expected: not greater than 50
			But was:  101
				at MonoTouchFixtures.ObjCRuntime.RuntimeTest.NSAutoreleasePoolInThreadPool() in /Users/rolf/work/maccore/squashed-onedotnet/xamarin-macios/tests/monotouch-test/ObjCRuntime/RuntimeTest.cs:line 484
2020-08-24 17:54:57 +02:00
Whitney Schmidt a20e738592
[Bug] Fix AVAudioFormat failure on older OS (#9433)
* fix_avaudioformat_monotouch_failure

* add platform checks instead of xcode check
2020-08-24 09:23:24 -04:00
Sebastien Pouliot 869b6ab081
[tests][monotouch-test] Re-enable SystemSoundTest (#9453)
Works with beta 5
part of https://github.com/xamarin/xamarin-macios/issues/8943
2020-08-24 08:48:11 -04:00
Sebastien Pouliot c82b7bd15e
[tests][monotouch-test] Re-enable some ARKit tests (#9454)
Things are a bit better with beta 5
part of #8943
2020-08-24 08:46:27 -04:00
Sebastien Pouliot de107bc26d
[tests][monotouch-test] Re-enable some disabled tests from beta 3 (#9455)
Seems to work fine with beta 5
part of #8943
2020-08-24 08:45:06 -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
Rolf Bjarne Kvinge 5db367a1fe [monotouch-test] Exclude tests that require OpenTK-1.0.dll in .NET.
OpenTK-1.0.dll isn't supported yet.
2020-08-21 18:47:33 +02:00
Rolf Bjarne Kvinge ba9df78138 [monotouch-test] Exclude WeakAttribute testing on .NET.
.NET does not support WeakAttribute.
2020-08-21 18:47:33 +02:00
Rolf Bjarne Kvinge 2812f2b235 [tests] Port monotouch-test to .NET. 2020-08-21 18:47:33 +02:00
Manuel de la Pena 91ce8b18cb
[ARKit] Update framework to Xcode 12 beta 5. (#9402)
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-08-21 10:37:15 -04:00
Whitney Schmidt c5fb1da1a6
Partial fix for AVAudioEngine.Connect(input, sink, format) crash when format == null (#9371)
* partial fix for https://github.com/xamarin/xamarin-macios/issues/9267

* simplify notequals

* add monotouch-test case

* add more using per manuel's feedback
2020-08-20 09:50:37 -04:00
monojenkins 9b80d59548
[d16-8] Partial fix for AVAudioEngine.Connect(input, sink, format) crash when format == null (#9409)
* partial fix for https://github.com/xamarin/xamarin-macios/issues/9267

* simplify notequals

* add monotouch-test case

* add more using per manuel's feedback

Co-authored-by: Whitney Schmidt <whschm@microsoft.com>
2020-08-20 07:42:05 -04:00
monojenkins 2a569e6274
[main] Partial fix for AVAudioEngine.Connect(input, sink, format) crash when format == null (#9410)
* partial fix for https://github.com/xamarin/xamarin-macios/issues/9267

* simplify notequals

* add monotouch-test case

* add more using per manuel's feedback

Co-authored-by: Whitney Schmidt <whschm@microsoft.com>
2020-08-20 07:41:42 -04:00
Whitney Schmidt 2f377f0887
fix tiny typo (#9399) 2020-08-19 12:57:05 -04:00
monojenkins 3efecd09ac
[d16-8] [Submission] Fix all the selectors that apple warns about. (#9382)
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.

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2020-08-17 09:34:06 -04:00
Manuel de la Pena 7e7caa00a6
[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-14 14:53:01 -04:00
Whitney Schmidt fb665c8c68
[NearbyInteraction][Xcode12] Add manual binding for NINearbyObjectDirectionNotAvailable (#9346)
* nearby interaction manual update + test
2020-08-12 15:43:00 -04:00
Rolf Bjarne Kvinge 2b96b9ac5f
[monotouch-test] Adjust tests based on Environment.OSVersion (#9291)
With Mono, Environment.OSVersion returns the macOS version when running in the
simulator. On Catalina, Mono returns 19.* as the Environment.OSVersion, which
means that the check for major version = 15 in the simulator turns out to be a
constant value now (since we don't support running in the simulator on a
4-year-old macOS version).

With .NET, Environment.OSVersion returns the iOS version instead, which means
that the check would have to be reworked.

However, since these version checks have effectively been constant for a few
years now, we can just remove the checks and the resulting unreachable code.
2020-08-07 07:57:40 +02:00
Rolf Bjarne Kvinge 53ccfa6664
[monotouch-test] Improve a few asserts to make them show better output when they fail. (#9290) 2020-08-06 15:04:57 +02:00
Manuel de la Pena 6293ce6828
[Tests] Fix TryGetSupportedInterfaces when we have values. Fixes #2273 (#9276)
* [Tests] Fix TryGetSupportedInterfaces when we have values. Fixes #2273

Make the test check against the value returned by the native API rather
than expect the result to always be null.

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

* Address reviews.
2020-08-06 11:00:18 +02:00
Alex Soto 42eaa54108
[xcode12] Initial bump to Xcode 12 Beta 4 (#9272)
* [xcode12] Bump to Xcode 12 Beta 4

* [Tests] Disable Trust_FullChain and Trust2_FullChain tests

These tests started showing a different error than the one we expect
I'll let our security expert chime in
2020-08-05 13:25:01 -04:00
Rolf Bjarne Kvinge 7b92ea061b [monotouch-test] Fix a couple asserts with regards to native types. 2020-08-04 10:33:16 +02:00
Rolf Bjarne Kvinge 96615bbd67 [tests] The upstream NUnitLine isn't linker safe, so add an xml file to make sure linking doesn't remove too much.
In particular NUnit uses reflection to get a private method, and the linker removes
the corresponding private method:

1c680b4dc8/src/NUnitFramework/framework/Internal/TestExecutionContext.cs (L552)

So add an xml definition to keep this private method, and modify project files to
pass the xml definition to mtouch and mmp.

Some care needs to be taken to make sure xharness is still able to clone these project
files.
2020-08-03 11:53:17 +02:00
Rolf Bjarne Kvinge 0a5b72d64b [tests] Update attributes in tests according to breaking changes in NUnit[Lite]. 2020-08-03 11:53:17 +02:00
Rolf Bjarne Kvinge a528c4e869 [monotouch-test] Update setting the default floating point tolerance to how it's done in the official NUnitLite. 2020-08-03 11:53:17 +02:00
Rolf Bjarne Kvinge 4cee581ba5 [tests] Use Assert.IsInstanceOf instead of Assert.IsInstanceOfType.
The latter doesn't exist anymore in the official NUnitLite.
2020-08-03 11:53:17 +02:00
Rolf Bjarne Kvinge f516fcfb07 [tests] Use the Does.[BeginWith|Contain|EndWith] constraints instead of the Is.[StringStarting|StringContaining|StringEnding] constraints.
The latter don't exist in the official NUnitLite anymore.
2020-08-03 11:53:17 +02:00