The dispose of `nslang` was happening outside of the check if `nslang` is null. This was causing a crash when trying to recognise a string that contains just one number.
- Fix deprecation messages to point to an existing API;
- Add setters for `Value` properties instead of adding `SetValue` methods;
- Removing some `[TV (13,0)]` when the API was already available in previous tvOS versions. It's implied that type that existed in tvOS 9.0 (the first version) do not have (nor need) availability attributes. Decorating them as `13,0` sends an incorrect message to developers (since the API have been available for a while)
- Adding some `[TV (13,0)]` when a new API only mention iOS
reference: https://github.com/xamarin/xamarin-macios/pull/6589
* adding GameController, issue including GCMotion.cs
* pushing temp fix by removing struct headers
* removed few introduced statements
* adding my name to top of file
* fixed review issues
* fixing issues cont
* forgot the enums
* fixing format of Deprecated messages
* missed a couple onlyOn64
* adding attributes
* removing additions to existing struct
* changed deprecated messages and selector names
* removing extra whitespace
* Added the struct in the new order from apple
* addressed Rolfs changes
* removed a diff change
* healthkit b1-b3 updates
* fixes for first round of comments
* remove whitespace noise
* move hkcategorytype enums
* update mono-touch tests, remove [designatedinitializer] attr
* alex nit fixes
* fix formatting for [Deprecated]
* update mono-touch tests with even more enums
* InsertQuantity -> Insert
* remove references to xcode13, which does not exist
* add HKCharacteristicTypeIdentifierActivityMoveMode to .ignore files
Fixes
```
RegisterFontDescriptors_WithCallback (MonoTouchFixtures.CoreText.FontManagerTest.RegisterFontDescriptors_WithCallback)
System.NotImplementedException : The method or operation is not implemented.
at TestRuntime.CheckExactXcodeVersion (System.Int32 major, System.Int32 minor, System.Int32 beta) [0x00185] in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/tests/common/TestRuntime.cs:175
at MonoTouchFixtures.CoreText.FontManagerTest.RegisterFontDescriptors_WithCallback () [0x0000b] in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/tests/monotouch-test/CoreText/FontManagerTest.cs:225
at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a] in /Library/Frameworks/Xamarin.Mac.framework/Versions/5.99.2.30/src/Xamarin.Mac/mcs/class/corlib/System.Reflection/RuntimeMethodInfo.cs:391
```
In some cases some bots will return a proxy present, not because of the
PAC being parsed, but due to the bot settings. Ignore the tests that
expect no proxies in the CI fixes the issue.
Fixes https://github.com/xamarin/maccore/issues/1901
A change in the linker made a potential problem show up as a registrar error
instead of a runtime exception.
The linker became smarter in d16-2, and will now remove interface
implementations in certain cases. In particular, the linker will remove
interface implementations for a type that is never instantiated (which means
there will never be any instances of that type, which means the interface
won't be needed).
The ABRecord was abstract, and as such there will never be any ABRecord
instances. If none of ABRecord's subclasses are used in the app, there won't
be instances of ABRecord subclasses either.
This meant the linker removed all of ABRecord's interfaces, including
INativeObject.
We have API that uses ABRecord in the signature. The registrar needs to know
if a particular type is an INativeObject, which is determined by checking if
the type implements the INativeObject interface. Since the INativeObject
interface implementation was removed, the registrar determined that the
ABRecord type in the signature is invalid, and showed an error:
Error MT4136: The registrar cannot marshal the parameter type 'AddressBook.ABRecord' of the parameter 'address' in the method 'PassKit.PKPaymentAuthorizationViewController/_PKPaymentAuthorizationViewControllerDelegate.DidSelectShippingAddress(PassKit.PKPaymentAuthorizationViewController,AddressBook.ABRecord,PassKit.PKPaymentShippingAddressSelected)
The actual problem is not the linker change, but the fact that a signature
uses an abstract type. At runtime, this will cause problems if we ever need to
instantiate such a managed type: we can't. This is generally not a problem for
NSObject subclasses, because we can determine the runtime type of the object,
and that's usually [1] some other, non-abstract type. However, for
INativeObjects, we can't find a better type at runtime (because we can't
determine the runtime type of the object), so we're left with trying to
instantiate the exact type in the signature. If this is an abstract type,
things will go badly.
So make ABRecord non-abstract.
Fixes https://github.com/xamarin/xamarin-macios/issues/6654.
[1] Usually, but not always, as history has shown. See also https://github.com/xamarin/xamarin-macios/issues/4969.
* [registrar] Fix a generics type issue with dynamic registrar
Fixesxamarin/xamarin-macios#6567
This Fixes an issue in the registrar where the dynamic registrar
misses a case to check for a NSObject constraint triggered by UIKit's
`NSDiffableDataSourceSnapshot` object.
This also enables the rest of missing bindings in UIKit for Xcode 11 B4
which also works as a test case for the registrar fix. Without this fix
introspection test would throw an `AggregateException` and also
includes `NSDiffableDataSourceSnapshotTest` to check that the created
objects are usable.
* Check for Xcode 11 in tests
* Exclude the macOS in our UIKit tests ツ