Fixes the following test failures:
[FAIL] BlockSignatureTest.WithoutUserDelegateTypeAttribute : System.ExecutionEngineException : Attempting to JIT compile method '(wrapper native-to-managed) MonoTouchFixtures.ObjCRuntime.BlockSignatureTest:<WithoutUserDelegateTypeAttribute>m__0 (intptr,intptr)' while running with --aot-only. See http://docs.xamarin.com/ios/about/limitations for more information.
at (wrapper managed-to-native) System.Runtime.InteropServices.Marshal:GetFunctionPointerForDelegateInternal (System.Delegate)
at System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate (System.Delegate d) [0x00011] in /work/maccore/xcode8/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs:1714
at ObjCRuntime.BlockLiteral.SetupBlock (System.Delegate trampoline, System.Delegate userDelegate) [0x0000b] in /work/maccore/xcode8/xamarin-macios/src/ObjCRuntime/Blocks.cs:92
at MonoTouchFixtures.ObjCRuntime.BlockSignatureTest.WithoutUserDelegateTypeAttribute () [0x00049] in /work/maccore/xcode8/xamarin-macios/tests/monotouch-test/ObjCRuntime/RegistrarTest.cs:2585
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00038] in /work/maccore/xcode8/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:309
[FAIL] BlockSignatureTest.WithUserDelegateTypeAttribute : System.ExecutionEngineException : Attempting to JIT compile method '(wrapper native-to-managed) MonoTouchFixtures.ObjCRuntime.BlockSignatureTest:<WithUserDelegateTypeAttribute>m__2 (intptr,intptr)' while running with --aot-only. See http://docs.xamarin.com/ios/about/limitations for more information.
at (wrapper managed-to-native) System.Runtime.InteropServices.Marshal:GetFunctionPointerForDelegateInternal (System.Delegate)
at System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate (System.Delegate d) [0x00011] in /work/maccore/xcode8/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs:1714
at ObjCRuntime.BlockLiteral.SetupBlock (System.Delegate trampoline, System.Delegate userDelegate) [0x0000b] in /work/maccore/xcode8/xamarin-macios/src/ObjCRuntime/Blocks.cs:92
at MonoTouchFixtures.ObjCRuntime.BlockSignatureTest.WithUserDelegateTypeAttribute () [0x00049] in /work/maccore/xcode8/xamarin-macios/tests/monotouch-test/ObjCRuntime/RegistrarTest.cs:2596
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00038] in /work/maccore/xcode8/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:309
Enabling CloudKit on watchOS required to remove some default .ctor that
watchOS does not _support_.
This commit fix this by either
* replacing the default .ctor with something that works across all
platforms (best); or
* removing the default .ctor only on watchOS;
The commit also mark as abstract three existing types for watchOS (and
for XAMCORE_4_0) that were found reviewing the bindings.
Runtime
- Added support for Vector2d, Vector3d and Vector4d SIMD types
- Added support for GKBox, GKQuad and GKTriangle SIMD types
GameplayKit
- Apple introduced GKQuadTreeNode and GKQuadTree in Xcode 7.1 and
removed those types in a later Xcode (7.2?) but we kept them around.
Now apple introduced again both types but renamed them to GKQuadtreeNode
and GKQuadtree (lowercase t), this is a breaking change and since we do
care about binary compat we are just changing the registration name and
keeping the same managed name deprecating old methods and introducing
the new ones.
- Added tests for new SIMD types
Xcode8 SDK changed untyped enums (always 32 bits) into NSInteger. In this
case we can continue with the existing API (and ignore them in xtro)
reference:
https://bugzilla.xamarin.com/show_bug.cgi?id=42682
Some types were removed in tvOS 10, including:
!unknown-protocol! AVAssetDownloadDelegate bound
!unknown-type! AVAssetDownloadTask bound
!unknown-type! AVAssetDownloadURLSession bound
!unknown-type! AVAudioInputNode bound
and we're replacing them with stubs so our binaries won't contain any of
the selectors that could be rejected by Apple on the app store
Some (new) fields are also not part of tvOS (and were not in iOS either)
!unknown-field! AVVideoCodecAppleProRes422 bound
!unknown-field! AVVideoCodecAppleProRes4444 bound
!unknown-field! AVVideoColorPrimaries_EBU_3213 bound
!unknown-field! AVVideoTransferFunction_SMPTE_240M_1995 bound
!unknown-field! AVVideoYCbCrMatrix_SMPTE_240M_1995 bound
* [tests][xtro] Many categories are not marked as not available on tvOS, even if the type being extended is not available. This adds entries for them so only missing AV* API remains in tvos.unclassified
The P/Invoke callback method that's called by native code
has a simpler function signature than what the user delegate
has.
Example P/Invoke callback signature:
static unsafe void Invoke (IntPtr block, IntPtr obj)
which ends up calling this delegate:
System.Action<NSDictionary>
The NSDictionary parameter has been simplifed to just IntPtr.
The problem is that we need to encode the block signature according
to the signature of the user delegate (Apple uses the signature
in some cases, and fails/aborts if the signature doesn't match
what the code expects).
So add more metadata to make it possible to find the signature
of the user delegate at runtime.
The generator generates code like this:
block_scheduledCompletion.SetupBlock (Trampolines.SDActionArity1V2.Handler, scheduledCompletion);
where SDActionArity1V2.Handler is defined as this:
static internal readonly DActionArity1V2 Handler = Invoke;
this means we can get the type of `Trampolines.SDActionArity1V2.Handler` at runtime
(which would be `DActionArity1V2` in this case), so put a new attribute (`UserDelegateTypeAttribute`)
at that type:
[UnmanagedFunctionPointerAttribute (CallingConvention.Cdecl)]
[UserDelegateType (typeof (global::System.Action<NSDictionary>))]
internal delegate void DActionArity1V2 (IntPtr block, IntPtr obj);
Then at runtime we check if the target delegate's type has this attribute,
and then we use the type specified by this new attribute instead when
computing the ObjC signature of the block.
https://bugzilla.xamarin.com/show_bug.cgi?id=43592
A problem, that exists with the current API, is that several constants
are hidden but many are needed in some dictionaries - and not all of
them can be turned into _classic_ StrongDictionary.
This initial PR does not solve all the (old) problems, but it does offer
some useful overloads that makes the API usable for basic usages and
expose the NSDictionary-based API.
This is a static selector that needs to be overridden, which is not the
usual pattern in C#. We re-define it using [New] on subclasses.
Unit tests added for all NSDimension subclasses.
reference:
https://bugzilla.xamarin.com/show_bug.cgi?id=43444
Also fix warnings printed while executing:
> CoreText performance note: Client called CTFontCreateWithName() using name "Arial" and got font with PostScript name "ArialMT". For best performance, only use PostScript names when calling this API.
> CoreText performance note: Set a breakpoint on CTFontLogSuboptimalRequest to debug.
* ApiCMAttachmentTest
[FAIL] ApiCMAttachmentTest.CheckFailAttachments : CGColorConverter.Handle
* SKNode added conformance to new (in iOS10) UIFocus protocol.
[FAIL] Selector not found for SpriteKit.SKNode : didUpdateFocusInContext:withAnimationCoordinator:
[FAIL] Selector not found for SpriteKit.SKNode : setNeedsFocusUpdate
[FAIL] Selector not found for SpriteKit.SKNode : shouldUpdateFocusInContext:
[FAIL] Selector not found for SpriteKit.SKNode : updateFocusIfNeeded
[FAIL] Selector not found for SpriteKit.SKNode : preferredFocusedView
* HKWorkoutEvent conformance to NSCopying is new in iOS10
[FAIL] Selector not found for HealthKit.HKWorkoutEvent : copyWithZone:
* HKDocumentType was added in iOS 10 (not iOS 8) and not watchOS 2 or 3
ref: +HK_CLASS_AVAILABLE_IOS_ONLY(10_0)
[FAIL] iOSApiProtocolTest.ApiProtocolTest.Coding : ObjCRuntime.RuntimeException : Wrapper type 'HealthKit.HKDocumentType' is missing its native ObjectiveC class 'HKDocumentType'.
reference:
https://bugzilla.xamarin.com/show_bug.cgi?id=43329
It was disable as it crashed our test suite and the crash report from
the simulators were not very helpful. The issue becomes clear from
device builds...
Application Specific Information:
BUG IN CLIENT OF LIBDISPATCH: dispatch_barrier_sync called on queue already owned by current thread
Abort Cause 6244246656
Filtered syslog:
None found
Thread 0 name: tid_a07 Dispatch queue: CTCallCenter
Thread 0 Crashed:
0 libdispatch.dylib 0x00000001839fdf60 _dispatch_barrier_sync_f_slow + 596
1 CoreTelephony 0x000000018756e7ec -[CTCallCenter callEventHandler] + 128
2 CoreTelephony 0x000000018756e7ec -[CTCallCenter callEventHandler] + 128
3 CoreTelephony 0x000000018756f51c __27-[CTCallCenter description]_block_invoke + 60
4 CoreTelephony 0x000000018756f79c ___ZN8dispatch9sync_implIU13block_pointerFP8NSStringvEEENSt3__15decayIDTclfp0_EEE4typeEP16dispatch_queue_sOT_NS5_17integral_constantIbLb0EEE_block_invoke + 32
5 libdispatch.dylib 0x00000001839ed1c0 _dispatch_client_callout + 16
6 libdispatch.dylib 0x00000001839fa860 _dispatch_barrier_sync_f_invoke + 84
7 libdispatch.dylib 0x00000001839fde9c _dispatch_barrier_sync_f_slow + 400
8 CoreTelephony 0x000000018756f4d0 -[CTCallCenter description] + 128
9 introspection 0x000000010192b7b8 wrapper_managed_to_native_ObjCRuntime_Messaging_IntPtr_objc_msgSend_intptr_intptr (/<unknown>:1)
10 introspection 0x00000001012dbff8 Foundation_NSObject_get_Description (NSObject.g.cs:717)
11 introspection 0x00000001012d8e34 Foundation_NSObject_ToString (NSObject2.cs:703)
so calling `description` is broken and we need to exclude this from our
introspection tests for the type.
Apple removed CGColorConverter even if it was publicly exposed in iOS 9.3,
not that I recall any API that consumed it...
It was replaced by a new, very close, type named CGColorConversionInfo and
the existing code and tests were updated to the new API.
So for `CGColorConverter` we're
* iOS: Obsoleted + code removal
* tvOS: Obsoleted + code removal
* watchOS: the API can be removed as it was not exposed in a stable release
* macOS: it was not enabled (did not work)
* [tests] Adjust ApiCMAttachmentTest so it knows how to create the new CGColorConversionInfo type
Also apply fixes based on xtro results. Most of them are likely because the iOS frameworks contains out-dated headers wrt watchOS.
references:
* Missing fields /API
!missing-field! CKShareThumbnailImageDataKey not bound
!missing-field! CKShareTitleKey not bound
!missing-field! CKShareTypeKey not bound
!missing-selector! CKContainer::acceptShareMetadata:completionHandler: not bound
!missing-selector! CKContainer::fetchShareMetadataWithURL:completionHandler: not bound
* tvOS: enabled
!missing-selector! CKNotificationInfo::setShouldSendContentAvailable: not bound
!missing-selector! CKNotificationInfo::shouldSendContentAvailable not bound
* watchOS: xtro fixes for additions/removal in the same release
!missing-type! CKFetchRecordChangesOperation not bound
!missing-type! CKDiscoverAllContactsOperation not bound
!missing-type! CKDiscoverUserInfosOperation not bound
!missing-type! CKDiscoveredUserInfo not bound
!missing-selector! CKContainer::discoverAllContactUserInfosWithCompletionHandler: not bound
!missing-selector! CKContainer::discoverUserInfoWithEmailAddress:completionHandler: not bound
!missing-selector! CKContainer::discoverUserInfoWithUserRecordID:completionHandler: not bound
* watchOS: missing [NoWatch] on some types
!unknown-native-enum! CKQuerySubscriptionOptions bound
!unknown-native-enum! CKSubscriptionOptions bound
!unknown-native-enum! CKSubscriptionType bound
!unknown-type! CKDatabaseSubscription bound
!unknown-type! CKNotificationInfo bound
!unknown-type! CKQuerySubscription bound
!unknown-type! CKRecordZoneSubscription bound
!unknown-type! CKSubscription bound
* Enable some SceneKit-related WatchKit API
* Enable some SceneKit-related SpriteKit API
* Enable some SceneKit-related Foundation API
* Fix generator to include `using SceneKit;` on watchOS
* Adjust xtro tests since watchOS headers include some stuff that's not available in reality
* Lots of [Watch (3,0)] attributes
* [tests] Implement filtering based on test name to make it possible to run a subset of tests manually.
* [xharness] Add support for passing environment variables to test apps.
* [xharness] Split the mscorlib/System test run for watchOS into multiple executions.
When running on a watch, the complete set of mscorlib and System tests use too
much memory, so they end up crashing the app.
So instead don't run all the tests in the same test run, but
instead split them up.
This splits the System tests in 5 different sets, based on the first
character of the test class name.
The mscorlib tests are split in 26 different sets, one for each
character (A-Z).
On watchOS we can't include all the tests for device in a single
assembly, because the native object code becomes too big.
So instead split the tests into two assemblies. Luckily this
is fairly easy for test projects, since they have few dependencies
between source files (there are some however, so source files
are grouped per directory so that files in the same directory do
not end up in different test projects). There is also some hard-coded
logic.
https://bugzilla.xamarin.com/show_bug.cgi?id=41746
* Fixed reports of xtro tests
* Fixed some members that are @required members of an existing protocol (XAMCORE_4_0)
* Added some new typo fixes to Intrespection tests
* Fixed SCNNode.EnumerateChildNodes delegate signature
Latest iOS 10, tvOS 10 and watchOS 3 uses a newer libsqlite version.
It's not clear is macOS 10.12 also does (and that could affect the
test when using the simulators)
On watchOS we can't include all the tests for device in a single
assembly, because the native object code becomes too big.
So instead split the tests into two assemblies. Luckily this
is fairly easy for test projects, since they have few dependencies
between source files (there are some however, so source files
are grouped per directory so that files in the same directory do
not end up in different test projects). There is also some hard-coded
logic.
https://bugzilla.xamarin.com/show_bug.cgi?id=41746
* [spritekit] Update for iOS 10 beta 1
* [spritekit] Add missing MarshalDirective
* [runtime] Add missing simd function signatures
- Add matrix_float2x2 and matrix_float3x3 natives types.
* [introspection] Fix ApiSignatureTest
- We now avoid checking {?=[X]} encoded signatures.
- We now calculate the right size for matrix_float2x2, matrix_float3x3 and matrix_float4x4.
- Fix SKWarpGeometryGrid wrong bindings revealed by tests (IntPtr instead of Vector2).
* [monotouch-test] Add SKUniform and SKWarpGeometryGrid tests
- Split in two to ease review;
- Unit tests added for NSUrlSessionTaskMetrics and
NSUrlSessionTaskTransactionMetrics as they don't respond to selectors
like expected (but just like other NSUrlSession* types)
We tried disabling dlsym for all assemblies on iOS, but it turned
out to break a significant amount of customer code [1].
So re-enable it, but only for user assemblies (since we control
all assemblies we ship and can thus make sure those work with
dlsym disabled).
https://trello.com/c/guig1MF2/623-re-enable-dlsym-for-ios
We tried disabling dlsym for all assemblies on iOS, but it turned
out to break a significant amount of customer code [1].
So re-enable it, but only for user assemblies (since we control
all assemblies we ship and can thus make sure those work with
dlsym disabled).
https://trello.com/c/guig1MF2/623-re-enable-dlsym-for-ios
`getPlaceholderTemplateForComplication:withHandler:` was @required in
watchOS 2.x but is now deprecated and downgraded to @optional in
watchOS 3 (betas)
This is a breaking change but we have not released our final watchOS 2.x
bits yet so it make sense to backport this change (unless Apple reverts
it before 3.0 is released)
* [XM] AppKit Xcode8 Beta3 changes
* [XM] Update intents.cs with macOS attributes
* [XM] Fix bindings caught by introspection test
* [XM] Fix classic introspection tests by marking safariservices as 64-bit only
* [XM] Async upgrade
* [XM] Fix apitest on classic by noting IntentsLibrary is 64-bit only
- https://trello.com/c/9JANewiM
- My analysis was incorrect, the binding was wrong and the test caught it.
- If you have [Model] you must have [BaseType], and if you don't want [Model] you must not use [BaseType]
* ActionIdentifier from UNNotificationResponse class can be
a NSString defined in UNNotificationActionIdentifier but can
also be a custom defined identifier so we can't really strong type it
* Renamed enums to use the same name as defined in the header because
we don't really know how this framework will evolve over time
and there is a chance that the current naming can create confusion
in the long run so we play safe here
Xcode8 SDK (for tvOS 10) marked those API with __TVOS_UNAVAILABLE making
them only available on iOS.
Since the API are not yet released in stable (C8) so we can removing
them proactively. It will be easier to add them back later (if the
situation change) than removing/obsoleting them.
Xcode8 SDK (for tvOS 10) marked those API with __TVOS_UNAVAILABLE making
them only available on iOS.
Since the API are not yet released in stable (C8) so we can removing
them proactively. It will be easier to add them back later (if the
situation change) than removing/obsoleting them.
* Fixed macOS availability attributes where it made sense
* Added inconclusive members to mac.pending and opened radar://27463602
https://trello.com/c/BPdUlTlg about it
* iOS xtro reported members that got deprecated and introduced on iOS 10
so added that to pending and those members are not bound
Jul 15 15:44:26 castor monotouchtest[42732]: [default] [ERROR] error while getting ubiquityIdentityToken: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.bird.token was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.bird.token was invalidated.}
^ the above is printed several times after this
* Mostly missing checks
* FontTest: Apple never fixed that and the way we link now, without
dlsym, makes the test crash
dyld: lazy symbol binding failed: Symbol not found: _CTFontCreateWithFontDescriptorAndOptions
Referenced from: /var/mobile/Applications/6025D222-F50E-46E0-8BF5-9C45D4C7DACB/monotouchtest.app/monotouchtest
Expected in: /System/Library/Frameworks/CoreText.framework/CoreText
Tested with iOS 7.1 on an iPad 3
- Dynamic registrar needs to ignore new CBManager base class;
- CGImageMetadataTag.Value returns a mutable array on iOS10;
- MPMediaItem properties needed 9.2 / 10.0 check;
- MSMessage not available before Xcode 8;
- Metal not available before Xcode 6;
- MetalPerformanceShaders not available before Xcode 7;
I enabled CloudKit earlier, but that framework was not updated and the
tests did not run on watchOS.
Now the tests are enabled (and fails PR) so this is a minimal fix to
get PR green again. CloudKit still needs to be updated for the new SDK.
Note: headers often mention 2.0 and 2.2 for API but the framework was
not available before 3.0. Some information might not be trustworthy.
Category methods are exposed like extension methods, and the first parameter
specifies the class, which means we need to skip the first type when generating
the ObjC signature.
https://bugzilla.xamarin.com/show_bug.cgi?id=42489
There can be circular dependencies between Objective-C classes,
so make sure we don't fail compilation when that occurs by
forward declaring any Objective-C classes/protocols.
The test case in question does not contain a circular dependency,
but the same issue occurs due to types not being generated in the
correct order (a correct order could be constructed for the test
case, but there's no general solution since circular dependencies
can exist).
https://bugzilla.xamarin.com/show_bug.cgi?id=42454
Category methods are exposed like extension methods, and the first parameter
specifies the class, which means we need to skip the first type when generating
the ObjC signature.
https://bugzilla.xamarin.com/show_bug.cgi?id=42489
- Includes tests.
- Add availability flags.
- Turn new fields into properties.
- Verify bindings on iOS 9.3.
- Added protection in MPNowPlayingInfoCenter if native fields
are not available (depending on the iOS version).
There can be circular dependencies between Objective-C classes,
so make sure we don't fail compilation when that occurs by
forward declaring any Objective-C classes/protocols.
The test case in question does not contain a circular dependency,
but the same issue occurs due to types not being generated in the
correct order (a correct order could be constructed for the test
case, but there's no general solution since circular dependencies
can exist).
https://bugzilla.xamarin.com/show_bug.cgi?id=42454
Does not affect the Jenkins bots (which don't run classic tests) but
fails on wrench (who still runs them right now). There's a difference
in how equality is checked between classic and unified and that expose
a, not really important, change in iOS10.
Fix issues with monotouch-tests with beta2
* TLSMaximumSupportedProtocol returns Unknown, which also means default,
instead of SslProtocol.Tls_1_2
* Setting NSZone.Name crash the app
* The MDLMesh tests are broken in a different way than beta1
* [callkit] Disable CTCallCenter default ctor as it breaks introspection
> [FAIL] Default constructor not allowed for CoreTelephony.CTCallCenter : SIGILL
The exception, that we catch, puts the process in an unstable state.
This cause weird results and crash later (wrong dispatch queue on main
thread) when testing MapKit.
Crashed Thread: 0 tid_a07 Dispatch queue: CTCallCenter
Exception Type: EXC_BAD_ACCESS (SIGABRT)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000004
Exception Note: EXC_CORPSE_NOTIFY
VM Regions Near 0x4:
-->
__TEXT 0000000000097000-00000000004d2000 [ 4332K] r-x/rwx SM=COW /Users/USER/Library/Developer/CoreSimulator/Devices/9446B344-62A2-42A8-A8EE-9FE7AC6BA5C8/data/Containers/Bundle/Application/81183608-DADF-4226-B7FE-4B43759D679A/introspection.app/introspection
Application Specific Information:
BUG IN CLIENT OF LIBDISPATCH: dispatch_barrier_sync called on queue already owned by current thread
abort() called
CoreSimulator 278 - Device: iPhone 5 - Runtime: iOS 10.0 (14A5297c) - DeviceType: iPhone 5
Some beta2 adjustments (removals) to get green tests and be able to merge it so bindings of beta2 can start
* [tests] NEFlowMetaData conformance to NSSecureCoding and NSCopying is new in beta2 (and check fails on OSX 10.11)
* [uikit] Add [UIScrollView|UITableViewController].refreshControl to fix monotouch-test build
UIRefreshControlHosting was removed in beta2 but we still need the
refreshControl property on UIScrollView and UITableViewController
to build monotouch-test
* Added support in DictionaryContainer for CGRect/CGPoint/CGSize and CMTime
* Added support for [StrongDictionary] using CGRect/CGPoint/CGSize and CMTime
* Added tests using DictionaryContainers for CGRect/CGPoint/CGSize and CMTime
* [Foundation] NSUbiquitousKeyValueStore is not available on watchOS.
Fixes an issue found by the introspection tests when running on a
watchOS device.
* [monotouch-test] Fix watchOS build with regards to NSUbiquitousKeyValueStore changes.
Fixes this warning:
SimpleHttpListener.cs(12,8): warning CS0108: `xharness.SimpleHttpListener.connected' hides inherited member `xharness.SimpleListener.connected'. Use the new keyword if hiding was intended
Also use https instead of http to avoid a network roundtrip
(since http://www.xamarin.com just redirects to https).
This will hopefully fix this random test failure:
[FAIL] UrlSessionTest.CreateDataTaskAsync : CreateUploadTask a
WCSessionDelegate members added in iOS 9.3 were turned into **required**
members in iOS 10 (beta 1). That's a breaking change so it's only enabled
for XAMCORE_4_0
Make sure as much as possible is written to the logs, and not stdout.
Also copy an extra 1024 bytes when fetching the system log (and continue
capturing a while after stopped, since there may be unflushed system log
data in memory).
Split out the code to prepare the simulator from the AppRunner class,
which is now just handling the logic required for each test run.
This way it's easier to handle simulator preparation for multiple
test runs with the same simulator.
Also revamp logging to avoid printing directly to the console, but
instead use the logging classes that permit redirecting logging
to a file. This makes the html report show better logging.
https://bugzilla.xamarin.com/show_bug.cgi?id=41343
* NSDictionary<TKey, TValue>.FromObjectsAndKeys keys and values are twisted up
* Fixed it in XAMCORE_4_0
* Obsoleted the 2 existing methods
* introduced FromObjectsAndKeys (TValue [] objects, TKey [] keys, nint count)
* Added unit tests with different types for TKey and TValue
Also fixed QLPreviewItem::previewItemTitle (not required) for XAMCORE_4_0
reference:
!incorrect-protocol-member! QLPreviewItem::previewItemTitle is OPTIONAL and should NOT be abstract
The two later failure reports (references) were not prefixed with [FAIL]
so they were filtered out by in the bot results.
references:
[FAIL] iOSApiProtocolTest.ApiProtocolTest.GeneralCase : 2 types do not really conform to the protocol interfaces
[FAIL] Could not load UIKit.UICollectionViewDataSourcePrefetching
[FAIL] Could not load UIKit.UIContentSizeCategoryAdjusting
Wrong check for version
[FAIL] Default constructor not allowed for CoreLocation.CLCircularRegion : Can only check iOS system version on iOS.
[FAIL] Default constructor not allowed for AVFoundation.AVAudioSessionDataSourceDescription : Can only check iOS system version on iOS.
[FAIL] Default constructor not allowed for AVFoundation.AVAudioSessionPortDescription : Can only check iOS system version on iOS.
and a change in tvOS 10 SDK
[FAIL] Selector not found for TVMLKit.TVViewElement : setDisabled:
* [tests][monotouch] More adjustments for iOS10 related failures/changes
- some might be Apple bugs and need to be reverted later
* Fix more failures on monotouch-tests wrt iOS 10
* MutableContactTest.cs: Wrong assert was changed (which is why each one
needs it's own unique string)
* TrustTest.cs: Fixed as results vary on < iOS9, iOS9 and iOS10
* NetworkReachabilityTest.cs: Fixed as results vary on < iOS9, iOS9 and iOS10
Those
[FAIL] UserDefaultsTest.Ctor_UserName : System.NullReferenceException : Object reference not set to an instance of an object
[FAIL] UserDefaultsTest.SetString : StringForKey-2
are due to
http://stackoverflow.com/questions/37840288/ios-10-nsuserdefaults-does-not-work
and should disappear once the bots are rebooted.
Fixes NSCharacterSetTest.NSMutableCharacterSet_TestStaticSets when
running with the P/Invoke wrapper (for exceptions) enabled (i.e.
watchOS), since otherwise the wrapper would truncate char parameters
to byte.
Make sure as much as possible is written to the logs, and not stdout.
Also copy an extra 1024 bytes when fetching the system log (and continue
capturing a while after stopped, since there may be unflushed system log
data in memory).
Split out the code to prepare the simulator from the AppRunner class,
which is now just handling the logic required for each test run.
This way it's easier to handle simulator preparation for multiple
test runs with the same simulator.
Also revamp logging to avoid printing directly to the console, but
instead use the logging classes that permit redirecting logging
to a file. This makes the html report show better logging.
- On some machines/mono versions it appears that printing System.Windows.DependencyObject requires System.Xaml for some reason.
- Since the test is testing our resolution from the GAC and we don't care about the specifics, I'm just adding that reference. Which we also get from the GAC.
* Adjust ever changing AddressFormatingTest for iOS 10, which does
not output the country;
* Adjust Contact's ICNKeyDescriptor internal check;
* CLBeaconRegion.ProximityUuid does not return the original instance
anymore, but a different one with the same uuid;
* Add a small delta for Vector3 comparison in ModelIO tests;
* Adjust MapKit tests for pin color change and MapRect corner case;
* SecKeyTest with corner cases now pass (they failed before);
* SecPolicyIdentifier.AppleIDValidation does not report the OID it's
created from (migration?)
Note: some might be bugs that Apple will fix in later seeds
The types are not _publicly_ conforming to the protocols (i.e. the header
files don't mention them). However they do conform at runtime, which is
what the test check (so we must ignore them)
* Added CallKit Bindings
* Ensure CallKit.framework is linked
* Ensure CallKit passes introspection tests
* FIXME: https://trello.com/c/afWXDZ3A
Headers says CallKit is available on macOS 10.12
but uses AVAudioSession and it is iOS only
Opened Radar awaiting response.
The types are not _publicly_ conforming to the protocols (i.e. the header
files don't mention them). However they do conform at runtime, which is
what the test check (so we must ignore them)
Fix a false positive when a .ctor is exposed with paramaters using a
subclass of what the designated initializer is exposing.
reference:
[FAIL] UIKit.UIGraphicsPdfRenderer should re-expose UIGraphicsRenderer::.ctor(CGRect, UIGraphicsRendererFormat)
Taking a screen image does not work unless there's a window server
running, which may not always be the case on bots.
So instead just create an image manually, since these tests do
not seem to be requiring any particular type of image.
* [xharness] Log simulator loading and handle any exceptions.
* [xharness] Add missing tests.
* [xharness] Throw a helpful exception instead of NRE when a simulator can't be found.
* [xharness] Fix null reference exception.
Taking a screen image does not work unless there's a window server
running, which may not always be the case on bots.
So instead just create an image manually, since these tests do
not seem to be requiring any particular type of image.
As noted in PR 177 [1] this does not build on watchOS since CFNetwork
is not supported on that platform. Uncaught as the PR bots don't build,
nor run, the tests yet.
[1] https://github.com/xamarin/xamarin-macios/pull/177
There's a clang bug [2] where if a selector is marked as unavailable,
it's marked as unavailable for every class, not just the class where
the unavailable selector is.
This means that we can't do `[super initWithCoder:x]` anywhere,
because `initWithCoder:` is marked as unavailable for UIActivityViewController.
So instead rewrite the call to super to call objc_msgSendSuper
directly, circumventing clang's broken availability checks.
[1] https://bugzilla.xamarin.com/show_bug.cgi?id=41319
[2] https://llvm.org/bugs/show_bug.cgi?id=28058
[FAIL] Selector not found for AppKit.NSCell : accessibilityNotifiesWhenDestroyed
[FAIL] Selector not found for AppKit.NSView : accessibilityNotifiesWhenDestroyed
Location changed and the duplicated files were removed (but I missed this
change on dontlink-mac)
[XM] Add release value option to msbuild/mmp to resolve XM 4.5 assemblies from system GAC
- This option "reverts" a C7 fix that prevented resovling assemblies from the GAC, which is unsafe
- If you use this option, you need to know what you are doing. The mono BCL and the XM BCL need to be compatible
- Use strictly puts you in the no support "you get to keep the pieces if it breaks" category.
Support binding NSObjects as IntPtr. This is usually not
a problem, because when we fetch the ObjC signature for a
method, we usually get the signature as exported by us,
(in which case a parameter bound as 'IntPtr' would be treated
as 'void *' in the dynamic registrar) *except* when the
selector corresponds with a protocol the type implements,
in which case we get the signature as defined in the protocol.
https://bugzilla.xamarin.com/show_bug.cgi?id=41132
Those tests needs to be run with the linker disabled since they use
reflection for most of their work.
The original dontlink (for linker tests) was becoming too large in
some configuration (e.g. tvOS release with bitcode) but this was
due to other BCL assemblies (not the introspection tests)
Should fix this test error:
warning: failed to load external entity "../../xamarin-macios/tests/HtmlTransform.xslt"
cannot parse ../../xamarin-macios/tests/HtmlTransform.xslt
make[4]: *** [test-ios-tasks] Error 4