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

6539 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge 0008c20abf
Implement notarization. (#6928)
* Add a dummy x86_64 slice to all our native libraries that don't have one. (#6848)

Apple's notarization tool has a bug where they incorrectly flag Mach-O
binaries without an x86_64 slice, so make sure all our libraries have one.

* Jenkinsfile notarization (#6869)

* Add in notarization script for xamarin.mac/xamarin.iOS

* Flatten the list to get rid of the braces

* Add in keychain password

* Add login.keychain back in to access codesigning certificates

* Always sign pkgs, upload notarized copies

* Enable ios notarization and make notarized pkgs public

* Make notarization non-fatal

* Publish GH statuses for notarized PKGs

* Don't forget to declare URI variables for notarized pkgs

* report proper package links

* [jenkins] Improve package reporting.

* Use dummy function name which our tests won't complain about.
2019-09-09 00:34:11 -07:00
Manuel de la Pena 844ca7ccf4
[Foundation] Allow uses to explicitly bypass the background session check. #6443 (#6918)
Issue was reponed because users had a valid reason to want to bypass
this security check. The HttpClient should be able to work in a
background task. So we now provide a way for users to explicitly ignore
the check.

Fixes: https://github.com/xamarin/xamarin-macios/issues/6443
2019-09-05 19:12:16 -04:00
Manuel de la Pena 4a08c6c7b2
[Foundation] Ensure that we allow celullar data by default until the user says otherwise. #6762 (#6916)
* [Foundation] Ensure that we allow celullar data by default until the user says otherwise. #6762

The default value in the NSUrlSession is to allow cellular data. This
small change closes the issue, since users will not have an unexpected
result.

Later we need to provide a proper fix to allow the property to be
exposed AND used the value of the session.

Fixes: https://github.com/xamarin/xamarin-macios/issues/6762
2019-09-05 16:03:10 -04:00
Manuel de la Pena 8a4c85863a
[Tests] Ignore memory hungry tests in old devices. (#6913) 2019-09-04 22:33:37 -04:00
Alex Soto a70a7a1e37
Merge pull request #6901 from mandel-macaque/bump-mono-2c3aea-master
[Master] Bump mono for the latest mono fixes related to culture.
2019-09-04 11:24:08 -04:00
Rolf Bjarne Kvinge 678a422604
[registrar] Ignore method encodings when processing copyback arguments in the dynamic registrar. Fixes #6883. (#6904)
Method encodings do not change anything for us, so skip them when processing
copyback arguments so that they don't confuse the rest of the code.

Fixes https://github.com/xamarin/xamarin-macios/issues/6883.
2019-09-04 07:02:33 -07:00
Rolf Bjarne Kvinge cf013a87c7
Bump maccore. (#6900)
To get fix for installing certificates and provisioning profiles for tests.

Diff: 809b2def39..48beb56b92
2019-09-03 22:49:24 -07:00
Manuel de la Pena c4156bf206 [Master] Bump mono for the laests mono fixes related to culture. 2019-09-03 18:05:33 -04:00
Alexander Köplinger b0a793425b Remove lists.xamarin.com from Readme (#6893)
The mailing list no longer exists.
2019-09-03 08:37:55 -04:00
Sebastien Pouliot 7c5ad429c2
[tests] Change URL for UrlSessionTest.CreateDataTaskAsync (#6890)
The current https://www.xamarin.com is being redirected to https://dotnet.microsoft.com/apps/xamarin but it takes a long time to completely load (not sure why) and that could be why we fail since we have a 30 seconds timeout - and it took more than that to (stop) load into safari.

Switching to https://www.microsoft.com/ is a lot faster and seems to fix the issue.

Reference:
https://github.com/xamarin/maccore/issues/1939
2019-08-30 17:58:07 -04:00
Manuel de la Pena b062b4c5b6
[Foundation] Remove a possible race condition when interacting with the notification centre. (#6537)
Ensure that we do lock when we are trying to remove the notification obj from the notification center so that another thread does not try to remove a null obj.
2019-08-30 14:21:28 -04:00
Manuel de la Pena e25acbb71b
[Foundation] Ensure that the collection is not modified during the loop. #6704 (#6877)
* [Foundation] Ensure that the collection is not modified during the loop. #6704

Collections should not be modified during the loop, this is bad
practice and was a side effect of the TrySetCanceled. Is better to
create a temp collection with all the sources and cancel each of them.

Fixes https://github.com/xamarin/xamarin-macios/issues/6704
2019-08-29 14:04:43 -04:00
prmallic f5e1b8d936
Instruction to find the build logs (#6871)
* Instruction to find the build logs

Added an instruction to find the build logs of the application in Visual Studio

* Added log verbosity instruction
2019-08-29 10:42:14 -04:00
William Kent 3f3c8bce26 Add support for Apple Development certificates to Xamarin.Mac MSBuild (#6797)
Add Apple Development certificates to Mac DetectSigningIdentity task
2019-08-28 11:30:36 -04:00
Manuel de la Pena f72388a10f
Bump Xamarin.MacDev. (#6857) 2019-08-27 11:37:27 -04:00
Rolf Bjarne Kvinge 4e70034b96
[generator] Handle subclasses of NSObject as ref/out parameters in third-party libraries. Fixes #6828. (#6829)
For third-party libraries we need to look up the base type using the BaseType attribute.

Fixes https://github.com/xamarin/xamarin-macios/issues/6828.
2019-08-26 01:06:13 -07:00
Manuel de la Pena 3e3e980565
Bump mono to 643415 and be in sync with android. (#6835) 2019-08-23 20:39:40 +02:00
Manuel de la Pena eb262cb2f6
[Tests] Pass a parameter to avoid a NRE. (#6832) 2019-08-23 19:53:14 +02:00
Vincent Dondain fe8db4df27
Bump maccore and macios-binaries (#6820)
This is in part so we get https://github.com/xamarin/maccore/pull/1924 -> [mlaunch] Connect to devices on a background thread.
That should hopefully fix device not found issues we're having on some bots/

New commits in xamarin/macios-binaries:

* xamarin/macios-binaries@01d34af Bump mlaunch to xamarin/maccore@809b2def39 (#24)

Diff: b474fa2e73..01d34af6b0

New commits in xamarin/maccore:

* xamarin/maccore@809b2def39 [mlaunch] Connect to devices on a background thread. (#1778) (#1924)
* xamarin/maccore@5215c09e8c Merge pull request #1923 from xamarin/swift-o-matic-hello-protocol-list-type
* xamarin/maccore@21447e2538 I. Can't. Believe. I'm. Checking. This. In.
* xamarin/maccore@da6518f920 Added ProtocolListTypeSpec
* xamarin/maccore@a9b9a0f5b3 Merge pull request #1920 from xamarin/swift-o-matic-bye-swift-protocol
* xamarin/maccore@01e9420598 Lose all the SwiftProtocol related types.
* xamarin/maccore@ca3bd0ab5b Merge pull request #1919 from xamarin/swift-redo-regular-protocols
* xamarin/maccore@f534abee12 Now with existential containers
* xamarin/maccore@9e180a823a Merge pull request #1911 from xamarin/swift-o-matic-string-convertible
* xamarin/maccore@9874985856 Typo
* xamarin/maccore@26731ff5cb Next step in Protocol revamp
* xamarin/maccore@9fe4cdd652 Merge pull request #1904 from xamarin/swift-o-matic-hashable
* xamarin/maccore@a1cd988dda iOS include
* xamarin/maccore@f1fc694da6 Revamped hashable.
* xamarin/maccore@16a6629a43 Merge pull request #1902 from xamarin/swift-o-matic-comparable
* xamarin/maccore@a98db5b976 Dead symbol, changed symbol.
* xamarin/maccore@3c38895694 Reworked Swift.Comparable to be defined in terms of EveryProtocol
* xamarin/maccore@ef1d3c1397 Merge pull request #1895 from xamarin/swift-o-matic-equatable
* xamarin/maccore@1c1a57fa4f Try again and get all the files, thanks.
* xamarin/maccore@ec0a5b99b7 Revised EveryProtocol, updated Equatable
* xamarin/maccore@198a489387 Simplified EveryProtocol, revised Equatable
* xamarin/maccore@ee7710a186 Merge pull request #1894 from xamarin/swift-o-matic-every-protocol
* xamarin/maccore@4fc0810fd2 Let's not leak memory, OK?
* xamarin/maccore@451c0ba18d Try a little dispose magic.
* xamarin/maccore@864854e407 Minor tweak to public API
* xamarin/maccore@052990af11 Adding in EveryProtocol object
* xamarin/maccore@b7f1347fcf Merge pull request #1893 from xamarin/swift-o-matic-protocol-binding
* xamarin/maccore@df4aefe447 no swap files, vi.
* xamarin/maccore@1e6bf8d4ef Merge pull request #1892 from xamarin/swift-o-matic-protocol-binding
* xamarin/maccore@e46a543544 Typo
* xamarin/maccore@fea9514c69 Let's document!
* xamarin/maccore@9b5ecdfdce Merge pull request #1890 from xamarin/swift-o-matic-fail-on-wrong-version
* xamarin/maccore@0b4afae5f3 Put in a hard fail on compiler version mismatch errors.
* xamarin/maccore@d1475a43d1 Merge pull request #1881 from xamarin/swift-o-matic-NRE
* xamarin/maccore@900e453695 Fixes and NRE from SCLAlertView
* xamarin/maccore@0164c0ae83 Merge pull request #1873 from xamarin/swift-o-matic-README
* xamarin/maccore@211b05a515 READMEs for errors, reminder to check README and associated issues in Makefile
* xamarin/maccore@74650bf3f8 [SoM] Add '/usr/lib/swift' as an rpath before any other rpaths. (#1857)
* xamarin/maccore@73dd23d00b Merge pull request #1859 from xamarin/swift-o-matic-SwiftLocation
* xamarin/maccore@6704604de1 Add SwiftLocation
* xamarin/maccore@e96ab505d8 Merge pull request #1855 from xamarin/swift-o-matic-bye-bye-dormant-3rd-party
* xamarin/maccore@c17c506738 Remove dormant 3rd Party Tests
* xamarin/maccore@366e201f11 Merge pull request #1854 from xamarin/swift-o-matic-update-3rd-party
* xamarin/maccore@da748a9a1d Updated makefiles for projects that have updated to Swift 4.2 or >
* xamarin/maccore@2e371bdaf2 Merge pull request #1849 from xamarin/swift-o-matic-gentler-errors
* xamarin/maccore@921c21251d Lighten up on errors, get paper-switch
* xamarin/maccore@f4fc280efe Merge pull request #1844 from xamarin/swift-o-matic-lottie
* xamarin/maccore@e47aa6b50c Adding lottie-ios
* xamarin/maccore@cf09fd4c59 [SoM] Copy swift libraries to foo.app/Frameworks for non-macOS apps. (#1842)
* xamarin/maccore@a4af9cdd2d Merge pull request #1841 from xamarin/swift-o-matic-gentler-skip
* xamarin/maccore@fc7cd38f64 [SoM] Handle the new BuildVersion load command. (#1827)
* xamarin/maccore@8666e81b7d Ha-ha! When you make errors become warnings, tests that depend on errors change.
* xamarin/maccore@e42a8c394f continue...
* xamarin/maccore@3b0d6bc0e6 [SoM] Don't duplicate the nuget version number. (#1838)
* xamarin/maccore@143afaf991 [msbuild] No need to use a shell function to resolve a relative path in make. (#1839)
* xamarin/maccore@cbe86e0152 [SoM] Add a helpful make target to create a nuget and setup a local feed repository for it. (#1837)
* xamarin/maccore@cfaaf1c5a5 [SoM] Enable swift's Stable ABI. (#1836)
* xamarin/maccore@79166d9755 Made errors more lenient, added Hue framework.
* xamarin/maccore@f4b0feeb55 Merge pull request #1830 from xamarin/swift-o-matic-prop-closure
* xamarin/maccore@a14198fdee whitespace
* xamarin/maccore@285874eceb handle ()->() and ()->type properly
* xamarin/maccore@4785afe4ea Handle closures as return values.
* xamarin/maccore@e89b80ca53 [SoM] Don't redownload the swift toolchain if we already have the file. (#1825)
* xamarin/maccore@217a608e72 [SoM] Improve installed scripts. (#1826)
* xamarin/maccore@ff283225b6 [SoM] Fix typo in type name. (#1824)
* xamarin/maccore@189ea0cba7 Merge pull request #1818 from xamarin/swift-o-matic-SwiftMessages-NRE
* xamarin/maccore@937541e0a6 restore back original code.
* xamarin/maccore@30be8a354a continue on null
* xamarin/maccore@dfceb83692 Merge pull request #1816 from xamarin/swift-o-matic-warn-not-fail
* xamarin/maccore@b32e33e71d Make warnings, not errors.
* xamarin/maccore@84504ced5e Merge pull request #1814 from xamarin/swift-o-matic-fix-predicate
* xamarin/maccore@82000e1a63 [submission] Fix makefile and clarify README (#1805)
* xamarin/maccore@d0ebe3b175 Remove stale predicate.
* xamarin/maccore@de6143449a Merge pull request #1806 from xamarin/swift-o-matic-c-structs
* xamarin/maccore@e10ef79504 C struct exceptions
* xamarin/maccore@a272402c7c Add the developerid required to run the notarization tests (#1804)
* xamarin/maccore@747c18c482 Merge pull request #1803 from xamarin/swift-o-matic-date-nuance
* xamarin/maccore@716082fd5e Moved string constants to SwiftFoundationConstants
* xamarin/maccore@f250ca5418 Merge pull request #1799 from xamarin/swift-o-matic-date
* xamarin/maccore@4d9a764e90 Basic support for Foundation.Date
* xamarin/maccore@5ef84bc50c Merge pull request #1795 from xamarin/swift-o-matic-ctor-finding
* xamarin/maccore@0899c35771 Demote error to warning.
* xamarin/maccore@ba80294413 Drop the mono-extensions dependency. (#1789)
* xamarin/maccore@ca616ef842 Merge pull request #1793 from xamarin/swift-o-matic-spring-fwk
* xamarin/maccore@f0cd48c28c Fix name conflict
* xamarin/maccore@beef68bf1e Merge pull request #1792 from xamarin/swift-o-matic-demangle-static
* xamarin/maccore@558b62da62 typo
* xamarin/maccore@5905981ad5 Added existential metatype
* xamarin/maccore@ed7d4b8b19 Merge pull request #1784 from xamarin/swift-o-matic-bound-generics
* xamarin/maccore@84f0bed939 Promote bound generics in closures to warnings, not errors.

Diff: 348833cb21..809b2def39
2019-08-22 14:06:45 -04:00
Manuel de la Pena f7d964e6c1
[TouchUnit] Bump touch unit to work when we do not longer have /Developer/Monotouch. (#6825) 2019-08-22 02:45:53 +02:00
Manuel de la Pena 55a95cff87
[Tests] Allow to ignore tests that fail on the interpreter. (#6802)
There are some failures that only happen in the interpreter. We add a
TestRuntime method that allow to check if the interpreter is used.
2019-08-21 10:54:19 +02:00
Manuel de la Pena 9b6705bbe3
Bump mono to match android to cc0632 (#6811) 2019-08-21 10:52:40 +02:00
Vincent Dondain 8d4cae7417 [docs] Make our documentation gender neutral (#6810)
Remove occurences or masculine pronouns (his, him, he) for gender neutral ones.
2019-08-21 03:52:52 +02:00
Sebastien Pouliot 09cc2dc83a
[linker] Fix NRE when System.Linq.Queryable is used. Fix #6346 (#6805)
reference: https://github.com/xamarin/xamarin-macios/issues/6346
2019-08-20 20:17:57 -04:00
Alex Soto 778348e26f [master] Bump mono to head of 2019-06 (#6795)
Mono issues have been reported for each of the new ignores:

https://github.com/mono/mono#15983
https://github.com/mono/mono#14761
https://github.com/mono/mono#16360
2019-08-20 15:37:13 -04:00
Manuel de la Pena acb7b76ce5
Allow to enable the use of the mono binary package from the configure script. (#6793) 2019-08-19 16:10:31 -04:00
Vincent Dondain d24b652274
Bump Touch.Unit to improve logging (#6775)
New commits in spouliot/Touch.Unit:

* spouliot/Touch.Unit@a2e1810 Improve logging for failed TCP connections due to hostname (#51)

Diff: 1c41c75983..a2e1810e41
2019-08-15 11:23:25 -04:00
Alex Soto 98f7b7e40c
[master] Bump mono to head of 2019-06 (4365dce) (#6755)
* Bump mono to head of 2019-06

* Fix mtouch SdkTest

* Fix test for reals.

* Update SdkTest.cs
2019-08-14 17:12:59 -04:00
Rolf Bjarne Kvinge 1e15472b49
[tests][msbuild] Tweak NativeReferencesNoEmbedding test to work with a locally built mtouch. (#6660)
When building mtouch locally, this will be the mtouch path:

    /path/to/somewhere/xamarin-macios/_ios-build//Library/Frameworks/Xamarin.iOS.framework/Versions/git/bin/mtouch
2019-08-14 13:21:52 +02:00
Timothé Larivière 286f0cb271 Add correct casing for Microsoft.FSharp.targets (#6722)
* Add correct casing for Microsoft.FSharp.targets

* Correct fix
2019-08-14 13:20:32 +02:00
Rolf Bjarne Kvinge 7d891641c8
[jenkins] Don't trust brew to not fail when things are working fine. (#6757)
brew may fail to install 7z if 7z is already installed, so ignore any brew
failures when trying to install 7z.

If 7z really is non-functional on the machine, then it'll fail later anyway.
2019-08-13 15:44:16 +02:00
Alex Soto ed8252f12d Revert "[master] Bump mono to head of 2019-06"
This reverts commit edadae301e.
2019-08-12 16:50:23 -04:00
Alex Soto edadae301e
[master] Bump mono to head of 2019-06 2019-08-12 16:48:33 -04:00
Vincent Dondain 00f0ab4ffe
[tests] Ignore ResourcesTest.Embedded which randomly fails on tvOS (#6729)
See https://github.com/xamarin/maccore/issues/1909
2019-08-12 11:29:06 -04:00
Jonathan CONTE 59d785f745 [xtro] typo in readme (#6749)
* braking -> breaking
2019-08-11 21:11:38 -04:00
Sebastien Pouliot ab84f246c6
[linker] Always preserve INativeObject (interface) on types. Fixes #6711 (#6737)
Recent versions of the linker can remove _unused_ interfaces from types.

This optimization is only done when the type is not instantiated. However
our tools and runtime requires knowing if a type represent a native
object, using `INativeObject` even if the code that creates such instance
is not marked.

In details... the issue happens because the static registrar must be able
to detect that `MTAudioProcessingTap` is a native object, so it checks
if it implements `INativeObject`. Since it does not it fails with a 4104
error.

Why does it not ? because it's handled specially by the generator and
uses `FromHandle` to lookup (not create) instance. So the linker is able
to remove the creation code (totally fine) and then remove the
`INativeObject` (not fine since we need this).

The solution is to tell (a small like to) the linker that any marked type
that implements `INativeObject` is instantiated. That way we ensure that
the tooling (run against the linked app) and the runtime can determine
those types as native.

reference: https://github.com/xamarin/xamarin-macios/issues/6711
2019-08-08 17:19:06 -04:00
Sebastien Pouliot 200d5bf0a4
[MediaToolbox] Remove non-unified (classic) version of MTAudioProcessingTap (#6736) 2019-08-08 08:14:29 -04:00
Juxhin (Eugene) Bakalli 42311ca7ec Fix NLLanguageRecognizer crash (#6689)
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.

Fixes: https://github.com/xamarin/xamarin-macios/issues/6688
2019-08-07 16:44:41 +02:00
Rolf Bjarne Kvinge b517f70c1b [mtouch/mmp] Don't write runtime-options.plist if it hasn't changed. (#6661) 2019-08-06 11:59:40 -04:00
Manuel de la Pena f4a976105b
Ignore the outgenerated projects until they are moved to their own dir. (#6712) 2019-08-05 16:56:16 +02:00
Manuel de la Pena b2f8db0682
[Tests] Ignore tests that only fail on tvOS devices. (#6707) 2019-08-02 17:26:05 +02:00
Manuel de la Pena 8dbf2c3598
Bump mono to head of 2019-06 (17ac7d) (#6681) 2019-08-01 01:08:30 +02:00
Alex Soto 46570108f8 [tests] wrench is long gone (#6694)
Use a different Url that works and ensure we get a nice message when we
have a failure.
2019-08-01 00:06:30 +02:00
Chris Hamons 0345986b4f
[uikit] Add [NullAllowed] to UIButton.SetAttributedTitle (#6669)
- https://github.com/xamarin/xamarin-macios/issues/6649
2019-07-30 06:48:01 -07:00
Manuel de la Pena ed21993718
[Introspection] ABRecord is abstract and cannot be instantiated. (#6683)
Fixes: https://github.com/xamarin/maccore/issues/1903
2019-07-30 10:37:15 +02:00
Manuel de la Pena 626799bdae
[Tests] Ignore some tests on the CI due to the settings of the bots. (#6671)
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
2019-07-29 13:55:30 +02:00
Manuel de la Pena e8eec97d20
[CFNetwork] Expose methods that were ignored until the dependencies were present. (#6201)
Expose methods to allow users query PAC files to get proxy settings.
2019-07-26 21:21:03 +02:00
Bernhard Urban 6de3c732f3 bump mono-2019-06 (#6657)
New commits in mono/mono:

* mono/mono@761220d914 [sdks] Report xcode11 builds as a separate GitHub status
* mono/mono@f06da77a36 [sdks] Add special build job for building with Xcode 11
* mono/mono@c6949d7e3d Bump bockbuild to get pkg-config fix for https://github.com/mono/mono/issues/13804
* mono/mono@0cd93e984c [sre] Make creation of dynamic method synchronized (#15814)
* mono/mono@d8286ce40b Bump mono/corefx@eb5ba09 (#15813)
* mono/mono@4b7a92e09a [runtime] Fix the error message for exceptions created from MonoError.
* mono/mono@31bf75ed23 [2019-06] Fix ambiguous time at the end of DST period on Windo… (#15785)
* mono/mono@4f29e313aa Add more tests to tarball with EXTRA_DIST
* mono/mono@afcf28a366 [2019-06][ios] Switch to python offset tool (#15756)
* mono/mono@5bd33de631 [ci] Clean working directory after build in package and sdks build
* mono/mono@a375e6a090 [packaging] Don't use dl.xamarin.com for gtksharp package anymore
* mono/mono@4db3b960c0 [sdks] Calculate sha1 of sdks archive and upload it
* mono/mono@ad226f5d37 [ci] Don't require master node for reportGitHubStatus method
* mono/mono@aef3c4c16b [sdks] Add linker sources to Android linux archive
* mono/mono@a2bcc639e1 [2019-06] [sdks] Add third party notices to sdks archives (#15755)
* mono/mono@c636636084 Align mcs's tuple deconstruction behavior with csc
* mono/mono@1c919ea11c [2019-06] Print two bytes at a time in mono_pe_file_map conversion error (#15726)
* mono/mono@4b15f9b3ee [mini] Runtime check if boxing is needed for DIM constrained calls (#15730)
* mono/mono@17520a8622 Bump msbuild to msbuild:mono-2019-06 to stop disabling compiler server
* mono/mono@048d95d86d Add com.apple.security.cs.allow-unsigned-executable-memory exception to hardened runtime entitlements (#15725)
* mono/mono@c63edc338b [2019-06] [bcl] Sync recent NS2.1 changes (#15719)
* mono/mono@74e1f4cbf9 Revert "[ci] Remove separate utils.groovy file" and run step on master instead
* mono/mono@a79115dd7f [2019-06] [bcl] Add Mono.Cecil.Mdb assembly to monodroid_tools… (#15718)
* mono/mono@d410e07d8b [ci] Remove separate utils.groovy file
* mono/mono@058d207f58 [ci] Wait for signing outside of a node() block
* mono/mono@a5b77554e4 [2019-06] [System] Keep events from firing from a disposed 'De… (#15706)
* mono/mono@ce68c20971 [ci] Bump timeout for .pkg signing job

Diff: edc9e70e04..761220d914
2019-07-26 21:19:53 +02:00
Rolf Bjarne Kvinge 541a00fc1c
[AddressBook] Make ABRecord non-abstract. Fixes #6654. (#6655)
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.
2019-07-26 03:14:41 -07:00
Rolf Bjarne Kvinge 0827ab4f21
[xammac tests] Silence debug spew. (#6650) 2019-07-25 03:33:29 -07:00