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

700 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge b18466f7f2
[mtouch/mmp] Share Abi code. (#8562) 2020-05-11 16:27:19 +02:00
Rolf Bjarne Kvinge 44653d7553
[mtouch/mmp] Share the RegistrarMode enum. (#8553) 2020-05-11 08:57:41 +02:00
Rolf Bjarne Kvinge 2926083d20
[runtime/mmp] Put libxammac and xamarin headers for Xamarin.Mac in the same directory as the corresponding files for Xamarin.iOS. (#8542)
That's in /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/SDKs/Xamarin.macOS.sdk/[lib|include]

This allows for a bit more code share between mtouch and mmp.
2020-05-08 13:04:32 +02:00
Rolf Bjarne Kvinge 0511006ec2
[mtouch/mmp] Introduce more specific helper functions for locating libxamarin*.dylib and Xamarin*.framework. (#8538)
This allows a little bit more sharing between mmp and mtouch.
2020-05-07 16:20:07 +02:00
Rolf Bjarne Kvinge 48b7ef4696
[mtouch/mmp] Pass the path to mscorlib explicitly to the partial static registrar code instead of relying on resolving it successfully. (#8525)
This makes the code simpler when we have to add support for .NET.

This requires modifying the linker to accept a null FrameworkDirectory.
2020-05-07 08:37:17 +02:00
Rolf Bjarne Kvinge c81f254a28
[mtouch/mmp] Share Driver.GetFrameworks. (#8511) 2020-05-05 16:52:56 +02:00
Rolf Bjarne Kvinge 6f5299fe3d
[mtouch/mmp] Remove IStaticRegistrar, it's no longer needed. (#8512)
It was created to support Xamarin.Mac/Classic, but that's not supported
anymore, so we can just remove this interface.
2020-05-05 16:50:28 +02:00
Rolf Bjarne Kvinge 83e77173dc
[mtouch] Detect the right build target for the partial static registrar. (#8508) 2020-05-05 15:35:35 +02:00
Rolf Bjarne Kvinge acfb101a78
[mtouch/mmp] Share the Application.References field. (#8507) 2020-05-05 15:35:02 +02:00
Rolf Bjarne Kvinge f8be1a8802
Merge pull request #8463 from rolfbjarne/remove-objectwrapper
Remove the ObjectWrapper class
2020-05-05 08:44:55 +02:00
Rolf Bjarne Kvinge 7501991f08
[mtouch/mmp] When copying a directory hierarchy, delete the target file if it exists. (#8485)
The copyfile method does not like copying files over an existing file, and
sometimes it may end up showing an error.
2020-05-04 18:32:26 +02:00
Rolf Bjarne Kvinge 6a407b7989
[linker] Make the corlib name dynamic. (#8499)
Use the correct corlib name depending on whether we're targeting .NET or Mono,
since there's no mscorlib.dll anymore in .NET.
2020-05-04 18:31:48 +02:00
Rolf Bjarne Kvinge 632fd10328 Convert Runtime.GetBlockWrapperCreator, Runtime.CreateBlockProxy and Runtime.Get[Generic]MethodFromToken to use GCHandle.
The native methods xamarin_get_[generic_]method_from_token are a bit unusual
in that they return an actual GCHandle. This is for performance reasons, since
in some cases their return value is passed as parameters to other function
calls to managed code, in which case we need the GCHandle. This way we avoid
round-tripping a GCHandle multiple times.
2020-05-04 11:31:19 +02:00
monojenkins 725aedec3d
[mtouch] Always enable experimental-xforms-product-type (#8427)
Not an experiment anymore - it works as expected.

This half-remove the optimization option (it must remain there to avoid
breaking all projects that have it defined) but it will always be `true`
so `Xamarin.Forms.Platform.iOS.dll` will **always** be considered as SDK
code by the linker.

Fix https://github.com/xamarin/xamarin-macios/issues/8407
2020-04-18 10:47:01 -04:00
Sebastien Pouliot c8a8fb3156
[mtouch] Always enable experimental-xforms-product-type (#8425)
Not an experiment anymore - it works as expected.

This half-remove the optimization option (it must remain there to avoid
breaking all projects that have it defined) but it will always be `true`
so `Xamarin.Forms.Platform.iOS.dll` will **always** be considered as SDK
code by the linker.

Fix https://github.com/xamarin/xamarin-macios/issues/8407
2020-04-17 17:18:20 -04:00
Rolf Bjarne Kvinge 1de5368593
[mtouch/mmp] Simplify namespace handling now that we don't support Classic anymore. (#8410)
Also consolidate and sort the list of namespaces.
2020-04-17 12:26:38 +02:00
Rolf Bjarne Kvinge 28eddda439
Extract the ApplePlatform and LinkMode enums into their own files. (#8411) 2020-04-17 09:45:18 +02:00
Rolf Bjarne Kvinge e4f8460277
[mmp/mtouch] Share more code. (#8394)
* Rearrange files in Xamarin.Mac a bit to ease code sharing between mmp and
  mtouch, by putting mono's static and dynamic libraries in
  /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/Sdks/Xamarin.macOS.sdk
  to match how Xamarin.iOS does it.

* Don't use 'usr' as an intermediate directory. This removes another special
  case.

* Share many of the functions and properties that return specific directories,
  and document (as comments) what each function/property is supposed to
  return.
2020-04-16 14:19:45 +02:00
Rolf Bjarne Kvinge 511124f4b1
[mmp] Explicitly resolve assemblies from the GAC / system mono. (#8377)
Cecil has a fall-back mode where it looks in the GAC / system mono for
assemblies when failing to find them elsewhere. This is not the expected
behavior when using Xamarin.Mac in the Full/XM mode, because then we should
only resolve to assemblies shipped with Xamarin.Mac.

Unfortunately doing so will break apps (our own tests break), so instead
change our resolution to be explicit about where we find assemblies, and if we
find assemblies in the GAC / system mono when we're not supposed to, then show
a warning.

Also add a fall-back mechanism, where we use the old logic instead, in case
the new logic is not 100% compatible with the old one.

This showed up when I tried to port mmp to dotnet, because then Cecil stopped
looking in the GAC / system mono for assemblies (Cecil has a special case when
running on Mono to look in Mono's GAC), and tests started failing.
2020-04-14 16:32:42 +02:00
Rolf Bjarne Kvinge f3ee011797
[xharness] Automatically generate xharness make dependencies. (#8324) 2020-04-13 09:26:55 +02:00
Rolf Bjarne Kvinge c0abd628d3
[mtouch/mmp] Use the standard DEBUG define to determine when we're running from inside an IDE. (#8311)
We're using the Release configuration to build the mtouch and mmp binaries
that we ship, which means that we can use the Debug configuration for
debugging from an IDE, and use the standard conditional compilation symbols to
identify that case.
2020-04-08 16:20:04 +02:00
Rolf Bjarne Kvinge 3d7a38e464
[mtouch/mmp] Use a single SdkVersions.cs in tools/common. (#8318)
No need to have two identical files around.
2020-04-08 16:19:34 +02:00
Alex Soto 3ff3e07ebe Merge remote-tracking branch 'xamarin/d16-5-xcode11.4' 2020-03-26 19:59:14 -04:00
Rolf Bjarne Kvinge 3a30097d3a
[mtouch/mmp] Add better diagnostics if xcrun returns invalid data. (#8166) 2020-03-23 12:29:23 +01:00
Rolf Bjarne Kvinge d0b170bf8f
[d16-5-xcode11.4][mtouch/mmp] Only use stdout from xcrun as the path of the file that was found. Fixes #8147. (#8150) (#8164)
xcrun can print stuff to stderr even if it succeeds and prints what it found
to stdout, which means we have to separate stdout and stderr when capturing
xcrun's output.

This also means that we need a few changes to our RunCommand API:

* Add support for capturing stdout and stderr separately by providing
  different callbacks/StringBuilder instances.
* Use overloads instead of default arguments, because with default arguments
  we end up with ambiguous matches in a lot of places with the new overloads.

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

Backport of #8150.
2020-03-20 19:44:58 +01:00
Rolf Bjarne Kvinge c6e9932be9
[mtouch/mmp] Only use stdout from xcrun as the path of the file that was found. Fixes #8147. (#8150)
* [mtouch/mmp] Only use stdout from xcrun as the path of the file that was found. Fixes #8147.

xcrun can print stuff to stderr even if it succeeds and prints what it found
to stdout, which means we have to separate stdout and stderr when capturing
xcrun's output.

This also means that we need a few changes to our RunCommand API:

* Add support for capturing stdout and stderr separately by providing
  different callbacks/StringBuilder instances.
* Use overloads instead of default arguments, because with default arguments
  we end up with ambiguous matches in a lot of places with the new overloads.

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

* [tests] Fix mmptest build.

* [mtouch/mmp] Fix process log output.
2020-03-20 17:46:43 +01:00
Rolf Bjarne Kvinge 4d7186028e
[mtouch/mmp] Improve target framework code. (#8137)
* Unify target framework code between mtouch and mmp.
* Simplify the code in mmp: have three possible valid target frameworks for
  most of code, and add special code to handle setting any other valid target
  frameworks to redirect to one of those three valid target frameworks (and
  warn if given any of those valid, but not "main", target frameworks). Any
  other code can then depend on the target framework having exactly one of
  those specific values, which means we can make IsUnified* variables
  convenience properties instead.
* Unify a bit more of the argument parsing code between mtouch and mmp, since
  that made a few other things easier.
* Add TargetFramework.IsValidFramework to have one validation implementation.
* Move the implementation of TargetFramework.MonoFrameworkDirectory to mmp
  itself, it's not really related to the target framework.
* Remove Driver.IsUnified and IsClassic from mmp, they're not used anymore.
* Formally deprecate --xamarin-[full|system]-framework in mmp, they've really been deprecated for many years.
* Remove LinkerOptions.TargetFramework, it's not used anymore.
* Get rid of mmp's userTargetFramework fried, it's duplicated with the
  targetFramework field.
* Add a few tests, and tweak others a bit.

Breaking changes:

* Both mtouch and mmp require --target-framework now. The only direct
  consumers should be the MSBuild tasks, which already pass --target-framework
  all the time. This simplifies code, and removes assumptions.
2020-03-19 09:28:09 +01:00
Rolf Bjarne Kvinge bacd958be0 [mtouch/mmp] Rework how we find developer tools. Partial fix for #4634 and fixes #8005. (#8121) (#8128)
Partial fix for https://github.com/xamarin/xamarin-macios/issues/4634.
Fixes https://github.com/xamarin/xamarin-macios/issues/8005.
2020-03-18 13:07:08 -04:00
Rolf Bjarne Kvinge 13a56ffb95
[mtouch/mmp] Rework how we find developer tools. Partial fix for #4634 and fixes #8005. (#8121)
Partial fix for https://github.com/xamarin/xamarin-macios/issues/4634.
Fixes https://github.com/xamarin/xamarin-macios/issues/8005.
2020-03-17 15:49:39 +01:00
Whitney Schmidt e085125ab7
[StoreKit] Update bindings for Xcode 11.4 beta 3 (#8104)
* initial commit of StoreKit changes

* frameworks.cs to 6,2

* respond to round 1 feedback

* move StoreKit into COMMON_FRAMEWORKS

* fix manuel formatting suggestions

* add availability attributes to everything, add comments with questions

* remove extra [NoWatch], fix copyright
2020-03-16 16:54:16 -04:00
Rolf Bjarne Kvinge 7b92e9cda4
[registrar] Remove unused function. (#8101) 2020-03-13 15:48:06 +01:00
Rolf Bjarne Kvinge dac68f33b4 Merge remote-tracking branch 'origin/master' into dotnet-bgen 2020-03-11 12:01:31 +01:00
Rolf Bjarne Kvinge 9b82c1c311
[mmp] Only iOS has dual bitness now, no need to check for Xamarin.Mac. (#8076) 2020-03-10 20:23:17 +01:00
Rolf Bjarne Kvinge d2420661da Add .NET 5 target frameworks. 2020-03-09 18:43:41 +01:00
Alex Soto f5b3a6f1c4
Merge remote-tracking branch 'xamarin/xcode11.4' into d16-5-xcode11.4 2020-03-08 13:16:04 -04:00
Sebastien Pouliot 2be35fb1c8
[mtouch][mmp] Share error.cs and make it safer against FormatException (#8047)
* [mtouch][mmp] Share error.cs and make it safer against FormatException

Beside the obvious code sharing [1] this makes the error reporting code
safer against `FormatException`.

Even with code review this happened a few times in the past - we get
a string that can't format correctly in some error handling code. This
means the `FormatException` must be fixed before we can see the
underlying root issue (delaying bug fixes and support).

Recent changes made for localization makes it harder to review the
original strings (and even harder for translated strings) for
correctness. This means we can end up with something like

```
String.Format ("{0} {1}", "foo");
``

and easily miss it (since they split between different files) if there
are several changes inside a PR.

Finally sprinkle some unit tests :)

[1] we should move everything to use `ProductException` but that will be
for another PR...
2020-03-06 09:34:16 -05:00
Alex Soto a8f38e3696
[AutomaticAssessmentConfiguration] Update bindings to Xcode 11.4 Beta 3 (#8049)
* [AutomaticAssessmentConfiguration] Update bindings to Xcode 11.4 Beta 3
2020-03-05 19:48:28 -05:00
Rolf Bjarne Kvinge 19a4304c03
[tools] Remove the MonoTouch,v1.0 target framework. (#8051)
Nobody should be using it anymore.
2020-03-05 22:05:40 +01:00
Sebastien Pouliot 0129618de8
[mtouch] Add `force-rejected-types-removal` optimization (#8009) (#8042)
This optimization can be enabled when it's not possible to use the
managed linker (e.g. **Don't link**) or when the managed linker cannot
remove references to deprecated types that would cause an application
to be rejected by Apple.

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

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

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

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

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

Finally introspection tests have been updated to skip over the deprecated
(and renamed) types. It should not be an issue right now, since this
optimization is not enabled by default, but it made testing easier.
2020-03-04 21:21:41 -05:00
Sebastien Pouliot bdd39b529e
[mtouch][mmp] Add a `--warn-on-type-ref=X` option (#8038)
Using this option it's possible to test for the presence of a type
reference in both pre-linked and post-linked assemblies.

This makes it possible to detect if
* a 3rd party assemblies are using some specific type you would like to avoid;
* a type reference has been removed during the build (e.g. linker)

Notes:
* Custom attributes are encoded differently and not included in the assembly type references metadata.
* Assembly that define a type `X` do not have a reference (but the definition) of the type (and won't be reported).

If either the pre or post-linked warnings are not useful then it's possible
 to add `-nowarn:150x` to exclude the results.

E.g.
* `-nowarn:1502` would not report references in pre-linked assemblies;
* `-nowarn:1503` would not report references in post-linked assemblies;

Finally `-warnaserror:150x` can be used to stop a build that would not
satisfy either the pre or post-linked condition.

* `-warnaserror:1502` would not report references in pre-linked assemblies;
* `-warnaserror:1503` would not report references in post-linked assemblies;

_side note_ this was first done on `d16-6` to ease backports as `master`
has multiple changes for localization. A similar PR will be done for
`master` once merged.
2020-03-04 17:28:39 -05:00
Alex Soto 709a90599e Merge remote-tracking branch 'xamarin/xcode11.4' into d16-5-xcode11.4-merge 2020-03-03 10:57:24 -05:00
Sebastien Pouliot 54f2dae935
[mtouch] Add `force-rejected-types-removal` optimization (#8009)
This optimization can be enabled when it's not possible to use the
managed linker (e.g. **Don't link**) or when the managed linker cannot
remove references to deprecated types that would cause an application
to be rejected by Apple.

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

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

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

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

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

Finally introspection tests have been updated to skip over the deprecated
(and renamed) types. It should not be an issue right now, since this
optimization is not enabled by default, but it made testing easier.
2020-03-02 09:20:29 -05:00
Sebastien Pouliot 0cdfb53d3c
[linker] Remove a few redundant lines of code (#8004) 2020-02-28 11:11:31 -05:00
Rolf Bjarne Kvinge d2d93b6ec9
[mtouch/mmp] Share boolean parsing logic. (#7967) 2020-02-25 07:00:58 +01:00
Sebastien Pouliot 57b2a8ff63
[mtouch][mmp] Share TimeStampStep code in the linker pipelines (#7955)
This makes the `--time` options more useful to see inside the linker's
pipeline steps.

This was used only in `mtouch` before (and missed some steps [1]).
Now it's shared between both tools.

[1] not sure why... merge issue/backport maybe ?
2020-02-24 12:03:44 -05:00
Sebastien Pouliot d83e13edf1
[mtouch][mmp] Add a `--warn-on-type-ref=X` option (#7949)
Using this option it's possible to test for the presence of a type
reference in both pre-linked and post-linked assemblies.

This makes it possible to detect if
* a 3rd party assemblies are using some specific type you would like to avoid;
* a type reference has been removed during the build (e.g. linker)

Notes:
* Custom attributes are encoded differently and not included in the assembly type references metadata.
* Assembly that define a type `X` do not have a reference (but the definition) of the type (and won't be reported).

If either the pre or post-linked warnings are not useful then it's possible
 to add `-nowarn:150x` to exclude the results.

E.g.
* `-nowarn:1502` would not report references in pre-linked assemblies;
* `-nowarn:1503` would not report references in post-linked assemblies;

Finally `-warnaserror:150x` can be used to stop a build that would not
satisfy either the pre or post-linked condition.

* `-warnaserror:1502` would not report references in pre-linked assemblies;
* `-warnaserror:1503` would not report references in post-linked assemblies;

_side note_ same as https://github.com/xamarin/xamarin-macios/pull/7925
except that this one uses the localized mtouch/mmp errors only in master (so far)
2020-02-20 22:25:23 -05:00
Sebastien Pouliot 1ce5eeb3dc
[mtouch][mmp] Fix possible exception when logging strings with `{x}` (#7941)
We can end up with a format that has `{x}` inside it and no argument. If
this is logged (which depends on verbosity level) then we end up with an
uncaught exceptions and either `MT0000` or `MM0000` errors.

This happens in #7904 due to other, unrelated, issues (a variable is not
expanded) but this can happen in other circumstances, e.g. a file could
be named `{x}.cs`.

The easy fix is to use the right `Console.WriteLine` overload if there
are no arguments provided. This is always good since it avoid an non
required call to `String.Format`.

Fixes https://github.com/xamarin/xamarin-macios/issues/7904
2020-02-20 14:52:25 -05:00
Manuel de la Pena c68b94bb89
[Tests] Update MT4134 tests for the new Xcode 11.4 (#7931)
New frameworks were added and the test needs to be updated.
2020-02-19 16:13:34 -05:00
Rolf Bjarne Kvinge 759180672d
[mtouch/mmp] Share code to locate the framework directory. (#7911) 2020-02-19 09:23:52 -05:00
Rolf Bjarne Kvinge 984374157c
[mtouch/mmp] Share Main. (#7910) 2020-02-18 16:05:42 -05:00
Rolf Bjarne Kvinge 96d5d3e02b
[mtouch/mmp] Share verbosity code. (#7908) 2020-02-18 15:44:19 -05:00
Rolf Bjarne Kvinge 43336779cf
[mtouch] Fix looking up satellites for root assemblies without a path. (#7871)
This may happen when a root assembly is in the current directory.

This fixes the bug-13945 test in the scripted tests.
2020-02-13 08:06:24 +01:00
Alex Soto cee4b5e5a1
[xcode11.4] Add xcode 11.4 b1 initial support (#7805)
* [xcode11.4] Add xcode 11.4 b1 initial support

* [xtro] re-enable PDFKit

* Disable watchOS and fix xtro

Unfortunately watchOS simulator hangs when we try to deploy to it
and it keeps our tests timing out. Disabling for now until we
can investigate more.

Disables PDFKit on xtro in macOS

* [jenkins] Switch to use the catalina bot group (#7819)

* Bump maccore to get fix for launching the simulator for watch apps.

New commits in xamarin/maccore:

* xamarin/maccore@546270c8f9 [Xamarin.Hosting] Fix the name of the notification we get when the simulator has launched. (#2145)

Diff: 55957e908d..546270c8f9

* [tests] Diable watch due to time out, enable 10,15,4 in intro, fix min version

* Bump macios-binaries to get updated binary mlaunch as well.

New commits in xamarin/macios-binaries:

* xamarin/macios-binaries@f8c6e63 Bump mlaunch to xamarin/maccore@546270c8f9

Diff: eb6980e8b6..f8c6e63228

* [msbuild] Reflect ibtool changes in our tests

Looks like Apple reverted some changes introduces in Xcode 11
in ibtool, for more context see xamarin/xamarin-macios#6970

* [mtouch] Workaround strange behavior of realpath.

Co-authored-by: Sebastien Pouliot <sebastien.pouliot@gmail.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-02-11 20:25:43 -05:00
Waleed Chaudhry f85556c1e5
[mtouch] Fix tests broken by localization (#7798) 2020-02-06 11:14:10 -05:00
Waleed Chaudhry ed16e04923
[Localization] Fix mtouch/mmp errors being referenced in mlaunch (#7784) 2020-02-03 15:19:27 -05:00
Waleed Chaudhry 00985a55e2
[Localization] mtouch/mmp C# (#7710) 2020-01-31 15:02:52 -05:00
monojenkins b85e70fa66 [d16-5] [Mtouch] Make sure that the given SDK version and the iOS version do match. (#7736)
* [Mtouch] Make sure that the given SDK version and the iOS version do match.

We need to make sure that the iOS SDK and the iOS version do match the
ones present in Xcode.

* Add new variables to track the target version.
* Add method to get the target version.
* Modify mtouch to check agains the target framework rather than the
SDK.

This will allow to keep track of three independent things:

1. The SDK max version.
2. The Simulator max version.
3. The target version of the device.

This had to be added becuase 13.2 has targets to 13.2 but simulators for
13.3

Fixes: https://github.com/xamarin/xamarin-macios/issues/7705
2020-01-23 12:56:23 -05:00
monojenkins 0c4af7daa1 [d16-5] [registrar] Fixes NSString trampoline code generation in static registrar (#7738)
* [registrar] Fixes NSString trampoline code generation in static registrar

Fixes xamarin/xamarin-macios#7733

This was introduced as a side effect of commit 8425129, we
used to generate `id foo` instead of the full block signature
in the trampoline code used by the static registrar, this is
the reason we never caught this condition before.

Added registrar test.

* Move tests to the appropiate test file

Co-authored-by: Alex Soto <alex@alexsoto.me>
2020-01-22 16:27:38 -05:00
Alex Soto 621fc8089a
[registrar] Fixes NSString trampoline code generation in static registrar (#7735)
* [registrar] Fixes NSString trampoline code generation in static registrar

Fixes xamarin/xamarin-macios#7733

This was introduced as a side effect of commit 8425129, we
used to generate `id foo` instead of the full block signature
in the trampoline code used by the static registrar, this is
the reason we never caught this condition before.

Added registrar test.

* Move tests to the appropiate test file
2020-01-22 15:03:18 -05:00
Manuel de la Pena 8d83ec2bca
[Mtouch] Make sure that the given SDK version and the iOS version do match. (#7717)
We need to make sure that the iOS SDK and the iOS version do match the
ones present in Xcode.

* Add new variables to track the target version.
* Add method to get the target version.
* Modify mtouch to check agains the target framework rather than the
SDK.

This will allow to keep track of three independent things:

1. The SDK max version.
2. The Simulator max version.
3. The target version of the device.

This had to be added becuase 13.2 has targets to 13.2 but simulators for
13.3

Fixes: https://github.com/xamarin/xamarin-macios/issues/7705
2020-01-22 10:57:27 -05:00
Chris Hamons 7950155faf [mmp] Set ThrowManagedException in debug apps if unset (#7667)
- https://github.com/xamarin/xamarin-macios/issues/5738
- There are a number of managed exceptions Apple can throw at you during
debugging, such as expanding a NSColor in the wrong colorspace
- Throwing a managed exception is a nicer debugging experience, and
during debug we don't care about any performance penality.
2020-01-08 08:00:41 -05:00
Sebastien Pouliot 91dcc47971 [mtouch] Fix cache.cs wrt response files. Fix #7514 (#7650)
TL&DR
* re-apply the fix to cache.cs from https://github.com/xamarin/xamarin-macios/pull/7544
* which was reverted in https://github.com/xamarin/xamarin-macios/pull/7589
* since it regressed mscorlib/sim testing in xharness (for other reasons)
* Final part to fix https://github.com/xamarin/xamarin-macios/issues/7514

This was the ~night~ day before christmas... amd a tough nut to crack!

Thanksfully we had a good test case (inside #7514) and then xharness
regressed one test in consistent, reproducible manner.

xharness builds mscorlib tests twice (32 and 64 bits) even if it's a
fat application (could be reused). That should not be a huge problem
since the 2nd build should be identical and the cache should be (re)used.

An earlier attempt fixed this (comparison was true for the wrong
reasons [1]) but the fix did not end up with the same arguments !?! and
was reverted.

This is the diff between the first and second builds:

```diff
--- /Users/poupou/a.txt	2019-12-23 09:55:01.000000000 -0500
+++ /Users/poupou/b.txt	2019-12-23 09:55:01.000000000 -0500
@@ -182,5 +182,5 @@
 	-r=/Users/poupou/git/xamarin/xamarin-macios/builds/downloads/ios-release-Darwin-8f396bbb408b5758fccb8602030b9fa5293ce718/ios-bcl/monotouch/tests/Xunit.NetCore.Extensions.dll \
 	' --target-framework=Xamarin.iOS,v1.0' \
 	--root-assembly=/Users/poupou/git/xamarin/xamarin-macios/tests/xharness/tmp-test-dir/mscorlib/bin/mscorlib/iPhoneSimulator/Debug-unified/com.xamarin.bcltests.mscorlib.exe \
-	' -v -v -v -v' \
+	' -v -v' \
 	@/Users/poupou/git/xamarin/xamarin-macios/tests/xharness/tmp-test-dir/mscorlib/obj/iPhoneSimulator/Debug/response-file.rsp \
```

Since they are not identical the cache is invalidated (which is normal,
cache-wise) and produce an output app that is incorrect (and crash
32bits).

Now there is code to ignore verbosity options (both `-v` and -q`) since
they will not affect what `mtouch` generates. However this was broken
because mtouch's response-file parser is quite basic and stricter the the
specification

spec: https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-options/response-file-compiler-option
issue: https://github.com/xamarin/xamarin-macios/issues/7644

That failed in two different ways

1. note the extra space before the first `-v` in the diff (before the `'`
quote). That skipped the line.

2. there are multiple `-v` in the same line, again that make the
filtering skip the line.

*Unknowns*

It's too close to xmas/vacation so I might not find the reasons/issues
for the following, unanswered questions...

1. Why is the re-build app bundle failing at runtime when p/invoking ?
Something is not regenerated (symbol maps?) ?

2. Why xharness 2nd build has more verbosity than the first one (likely
harmless) ?

[1] the original cache.cs issue (prequel)

issue w/test case: https://github.com/xamarin/xamarin-macios/issues/7514
first attempt: https://github.com/xamarin/xamarin-macios/pull/7544

While incorrect the first attempt to fix `cache.cs` was a logical, if
not entirely complete, fix. Without it this is what we _currently_ cache:

```
/Users/poupou/git/xamarin/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/lib/mtouch/mtouch.exe \
```

and that does not include any of mtouch's arguments, that can change
between executions and (should) invalidate the cache.

In this case it means the cache is used (no difference) but this does
**not** parse the content of the **response file** which is obviously
wrong (and we do have code to process it).

On the original issue's test case this is what makes the difference
between using the same *old* nuget assembly after an update (and fail)
by itself and also because the updated framework was not copied (due
to the 2nd part of the bug report wrt `copyfile`).

OTOH re-using (incorrectly) the cache is what makes xharness's mscorlib
unit tests works right now :(
2020-01-02 15:01:55 -05:00
Chris Hamons e316fc38b5
[mmp][mtouch] Drill into wrapped exceptions to produce better linker errors
- https://devdiv.visualstudio.com/DevDiv/_workitems/edit/947932
- It turns out the linker in some cases can wrap expected exceptions in a outer exception. By drilling in we can produce better errors, again.
- Refactor pipeline exception handling to be shared between mmp/mtouch
2019-12-23 09:57:48 -06:00
Sebastien Pouliot 2694579530
[mtouch] Fix case where `copyfile` could fail silently (#7633)
Copying the framework could fail (error 260) and the failure was never
reported so the build succeeded - but without updating (completely) the
framework.

The exact reason it fails is unknown :( but we can recover from it by
deleting the target and copying (everything) back to the expected
(target) location.

Build logs will now indicate when this fails and will try to recover
before reporting a build error. Best case it works :) worse case we'll
be aware something is wrong (which is better than ignoring)

This is half the fix from https://github.com/xamarin/xamarin-macios/pull/7544
which was reverted due to the second half causing a regression (under
investigation).

Reference: https://github.com/xamarin/xamarin-macios/issues/7514 (partial fix)
2019-12-23 09:18:04 -05:00
Alex Soto 9ac17bdbcf
Merge remote-tracking branch 'xamarin/xcode11.3' into master-xcode11.3 2019-12-17 19:25:11 -05:00
Alex Soto 01c1d04877
Merge remote-tracking branch 'xamarin/xcode11.3' into d16-5 2019-12-17 18:56:12 -05:00
Sebastien Pouliot 144c193332
Revert "[mtouch] Fix caching issues. Fix #7514 (#7544)" (#7589)
This reverts commit b3bc04c919.
2019-12-12 18:01:29 -05:00
Sebastien Pouliot ff2d5bb94f
[mtouch][mmp] Include satellite assemblies from nuget dependencies. Fix #7113 (#7548)
It's possible for a nuget to have dependencies that will bring satellite
assemblies into a project.

When doing so the satellite assemblies are copied to the right output
(e.g. `Debug`) directory, so they work fine at runtime. However it's
not 100% fine at build time, e.g. msbuild won't detected them as
satellite assemblies.

Something similar happens with `mtouch` (and `mmp`) since the satellite
assemblies won't be found inside a (culture-named) subdirectory from the
original assembly location. In our case this means the assemblies won't
be copied into the .app bundle (since we don't run from `Debug`) and
localization won't work properly.

The solution is to check for both the (culture-named) subdirectories
from the assembly location (like before) and, if nothing is found, also
try to locate them in the _build_ (like `Debug`) directory - so if
something else (nuget or custom build scripts) tried to outsmart the
build logic then we'll still bring those satellite assemblies in the
app bundle we produce.

https://github.com/xamarin/xamarin-macios/issues/7113
2019-12-10 09:23:31 -05:00
Sebastien Pouliot b3bc04c919
[mtouch] Fix caching issues. Fix #7514 (#7544)
The nice, repeatable test case from #7514 pointed out two issues

1. `cache.cs` ignored some changes

It looks like something changed (at some point) and the first _ignored_
line was the `@x.rsp` our response file - which should not be ignored.

This solved the build issue where updating the nuget should have
triggered a rebuild because
> /Users/poupou/.nuget/packages/skiasharp/1.68.0/lib/Xamarin.iOS/SkiaSharp.dll
and
> /Users/poupou/.nuget/packages/skiasharp/1.68.1/lib/Xamarin.iOS/SkiaSharp.dll
are different assemblies (but the same response file).

2. `copyfile` could fail silently

Copying the framework could fail (error 260) and the failure was never
reported so the build succeeded - but without updating (completely) the
framework.

The exact reason it fails is unknown :( but we can recover from it by
deleting the target and copying (everything) back to the expected
(target) location.

Build logs will now indicate when this fails and will try to recover
before reporting a build error. Best case it works :) worse case we'll
be aware something is wrong (which is better than ignoring)

ref: https://github.com/xamarin/xamarin-macios/issues/7514

* Do not call `Marshal.GetLastWin32Error` instead the callback
as the `SetLastError` logic has yet to be executed so we get a bogus
`260` value...

Instead we call it after the `copyfile` call returns but, at this stage,
the callback (i.e. **us**) signaled an error so what we get back (`17`)
is not very helpful - as we aborted (Quit) the logic when copying a file
that existed.

```c
#define EEXIST          17      /* File exists */
```

from Console logs

```
default	14:23:54.771292-0500	mono64	Cannot make directory /Users/poupou/Projects/gh7514/gh7514/bin/iPhoneSimulator/Debug/gh7514.app/Frameworks/libSkiaSharp.framework: File exists
default	14:23:54.771620-0500	mono64	Cannot make directory /Users/poupou/Projects/gh7514/gh7514/bin/iPhoneSimulator/Debug/gh7514.app/Frameworks/libSkiaSharp.framework/_CodeSignature: File exists
default	14:23:54.771850-0500	mono64	open on /Users/poupou/Projects/gh7514/gh7514/bin/iPhoneSimulator/Debug/gh7514.app/Frameworks/libSkiaSharp.framework/_CodeSignature/CodeResources: File exists
```

`copyfile.c` source code (might not be the latest) can be seen from
https://opensource.apple.com/source/copyfile/copyfile-42/copyfile.c

```c
if (mkdir(s->dst, mode) == -1) {
	if (errno != EEXIST || (s->flags & COPYFILE_EXCL)) {
		copyfile_warn("Cannot make directory %s", s->dst);
```

so `mkdir` fails - but not because of `EEXIST` and from `copyfile.h`
we see that `EXCL` exists but it's not using (or even defined) in our
bindings.

```c
#define COPYFILE_EXCL		(1<<17) /* fail if destination exists */
```

So sadly the `Err` condition (inside the callback) does not give us more
detail about the error itself.
2019-12-05 09:15:11 -05:00
monojenkins fd7a5360a5 [xcode11.3] [linker] Do not mark NSObject subclasses from Xamarin.Forms.Platform.iOS.dll assembly (#7483)
Turn older #7165 prototype into an experimental feature. It can be
enabled by adding `--optimize=experimental-xforms-product-type` to the
**Additional mtouch arguments** of the project.

ref: https://github.com/xamarin/xamarin-macios/pull/7165
2019-11-26 08:32:02 -05:00
Manuel de la Pena cb815ecd39
[Runtime] Update cflags and fix warnings accordingly. (#7478)
Update flags:

* Add -Werror so that warnings are errors.
* Move to -Wconversion that adds:
  * -Wbitfield-enum-conversion
  * -Wbool-conversion
  * -Wconstant-conversion
  * -Wenum-conversion
  * -Wfloat-conversion
  * -Wimplicit-float-conversion
  * -Wimplicit-int-conversion
  * -Wint-conversion
  * -Wliteral-conversion
  * -Wnon-literal-null-conversion
  * -Wnull-conversion
  * -Wobjc-literal-conversion
  * -Wshorten-64-to-32
  * -Wsign-conversion
  * -Wstring-conversion
Last work related to: https://github.com/xamarin/xamarin-macios/pull/7405
2019-11-25 16:00:24 -05:00
Sebastien Pouliot 58d325746a
[linker] Do not mark NSObject subclasses from Xamarin.Forms.Platform.iOS.dll assembly (#7473)
Turn older #7165 prototype into an experimental feature. It can be
enabled by adding `--optimize=experimental-xforms-product-type` to the
**Additional mtouch arguments** of the project.

ref: https://github.com/xamarin/xamarin-macios/pull/7165
2019-11-22 15:38:46 +01:00
Rolf Bjarne Kvinge 806404fa51
Keep track of SDK versions and OS versions separately. Fixes xamarin/maccore#2066. (#7454)
The latest SDK version and the latest OS version does not necessarily have to
match (for instance the iOS 13.2 SDK can support both iOS 13.2 and iOS 13.3),
so keep track of them separately.

Also use the latest OS version to determine which simulator to run, instead of
the latest SDK version (Xcode 11.3 ships with the iOS 13.2 SDK but only has an
iOS 13.3 simulator, not an iOS 13.2 simulator).

Fixes https://github.com/xamarin/maccore/issues/2066.
2019-11-15 17:21:10 +01:00
Vincent Dondain 44fd06324a Merge master into d16-5 2019-11-08 10:21:12 -05:00
Vincent Dondain a558d84457 Merge branch 'xcode11.2' into master-merge-xcode11.2 2019-11-05 15:25:49 -05:00
Vincent Dondain ec3c01d131 Merge branch 'xcode11.2' into d16-4-xcode11.2-merge 2019-11-01 17:11:44 -04:00
Sebastien Pouliot f6efbf551e
[registrar] Check parameter pointer before de-referencing it (#7336)
This case was generated (only) twice

1. https://developer.apple.com/documentation/uikit/uipopoverpresentationcontrollerdelegate/1622326-popoverpresentationcontroller?language=objc
where `inView:(inout UIView * _Nonnull *)view;`

2. https://developer.apple.com/documentation/quicklook/qlpreviewcontrollerdelegate/1617007-previewcontroller?language=objc
where `inSourceView:(UIView * _Nullable *)view;`
and `CGRect FrameForPreviewItem (QLPreviewController controller, [Protocolize] QLPreviewItem item, ref UIView view);`

This is not an issue because it won't be `null` in those case
but making the code safer (against future changes/API) is safer.

The output (copy-back) to the pointer already has a null-check.
2019-10-30 14:09:29 -04:00
William Kent 8425129eeb Add bindings for NSXpcConnection and related types (#7001)
* Add bindings for NSXpcConnection and related types

* Re-add accidentally deleted file

* Typo fix

* Add NSXpcInterface.CreateForType()

* Add MethodInfo-taking overloads to NSXpcInterface

* Add null check

* Mark methods with wrappers as internal

Also fixed a formatting bug that I didn't catch earlier.

* Change NSXPCProxyCreating methods to be strongly typed

I got rid of the NSXpcProxyCreating interface in this change,
because its only user was NSXpcConnection, and I needed to
inline the protocol methods into the class definition so I
could mark them as [Internal].

* Add missing casts

* Add NSXpcConnectionOptions enum

* Convert NSXpcConnection constructor to use new enum

* Remove now-unneeded manual constructor

* Fix bgen warning

* Typo fix

* Fix selector

* Remove incorrect use of BindAsAttribute

Per the docs, this only works for enums backed
by NSNumber and NSValue, not for enums
passed directly as integers.

* Fix duplicated selector errors

* Throw ArgumentException instead of InvalidOperationException

* Extend AppExtension targets to produce XPC services

Rather than create an entirely new set of targets
(that would require VS and VSMac updates to properly
consume), I have decided to use the existing AppExtension
build targets to produce XPC services as well. All the
user must do is set the $(IsXPCService) property to true in
their project file, and the targets will do The Right Thing™.

Note that this support is Mac-only for now; I may need a bit
of help adjusting them to work on for iOS/watchOS/tvOS, as I
am not as familiar with those platforms.

* Copy XPC service bundles into the correct location

* Move IsXPCService property definition to props file

* Don't pass /extension to mmp for XPC service targets

This would cause the XPC service binary to
be linked incorrectly.

* Add NSXpcConnection/NSXpcInterface.cs files to the build

* Fix build

* Fix build

* Add required type parameter requirements

* Fix type parameter requirements

* Fix return type

* Fix return type of NSXpcInterface.CreateForProtocol ()

* Take ownership of the returned object types

* Adjust XPC service mmp invocation

I need to link the XPC service bundle as if it is an app extension, but
I must not use xamarin_mac_extension_main. I added a new flag to make
this possible.

* Change mmp to correctly construct XPC service bundle

* Set the MonoBundleExecutable Info.plist key for XPC services

* Use the runtime to get the protocol

* Make NSXpcInterface.CreateForProtocol() public

The static registrar must be used for Cocoa to accept the protocol
as a valid XPC interface, but that then seems to break resolving
the protocol from the type. I must therefore hard-code the protocol
name in my code, and that requires I make this constructor public.

* Add XpcInterfaceAttribute

See the doc comment in XpcInterfaceAttribute.cs for why
this type is required. The referenced mmp optimizations
will be added in future commits.

* Add XpcInterfaceAttribute to generator build

* Add support for XpcInterfaceAttribute to the generator

* Force static generation of protocols decorated with XpcInterfaceAttribute

* Change how static registrar translates block parameters

Previously, they would always be marshalled as "id".
This would throw off the XPC subsystem, which parses
the block signature to determine the communication
protocol.

* Undo whitespace noise

* Remove unneeded casts

* Add trailing comma

* Use HasAttribute instead of GetCustomAttribute

* Fix style issues

* Bind NSXpcConnection.auditSessionIdentifier

* Address naming feedback

* Make Get/SetAllowedClasses public

IMHO, passing the selector as a string is just as
usable as passing a MethodInfo, and is also less
verbose if you copy/paste the selector string
from the ExportAttribute. There is no reason why
we cannot have both overloads be public.

* Update overload names to match

* Update more overload names to match

* Make mmp --xpc imply --extension

* Reformat if statement

* Fix build

* Conditionalize creation of PlugIns and XPCServices directories

* Add AutoGeneratedName

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

* Get rid of ProtocolizeAttribute

* Update availability attributes to please xharness

I actually think xharness is wrong here, since the
NSXPCConnection header lists these types as being
available starting in macOS 10.8.

* Update sharpie ignore files to reflect changes

This should fix the xtro-sharpie test failures CI has been reporting.

* Fix MM4105 error generation

* Adjust error message in test to match mmp

I had to change the error text slightly, because the type of the parameter
cannot be determined where the error is thrown anymore. However, the newer
exception message IMO is just as clear.

* Make exception message match test exactly

* Remove outdated copyright header text

* Remove more outdated copyright header text

* Revert changes to MM4105 error generation

I have a more elegant way of fixing this test now.

* Return "id" if Invoke method cannot be found

This fixes the MM4105 error unit test,
without requiring modification to that test.

* Remove redundant availability attributes

* Add DesignatedInitializerAttribute

* Re-add required code to macOS-Foundation.ignore

* Put DesignatedInitializer on the right constructor

* Update xtro-sharpie ignore files
2019-10-22 15:38:01 +02:00
Sebastien Pouliot a50c753117
[coreimage] Update for Xcode 11[.2] (#7216)
Apple decided to expose most (but not all) `CIFilter` using protocols
(instead of weakly named dictionaries). Most of this maps well with
our strong bindings but there are cases where we:

* missing some properties (easy, there were added); or
* used a different types [1] and that requires new members / obsoletion

A few other API were also added in Xcode 11 (nothing in 11.1 or 11.2) and
included in this PR.

New introspection tests were also added to minimize the risk that
the API and generator changes produced incorrect code. This lead
to the finding of some missing API (in particular `Output*` properties)
that were added.

[1] Often ours are better (using `float` for a `bool` value is not
optimal) but we do not have `[BindAs]` for protocols :( to _fix_ them

Note: this replace draft PR https://github.com/xamarin/xamarin-macios/pull/7120 but it's has quite a bit of changes in filter generation (inlining protocols) and that affected bindings too.
2019-10-16 09:16:32 -04:00
Rolf Bjarne Kvinge a8fdf6db6e
Implement a different escaping/quoting algorithm for arguments to System.Diagnostics.Process. (#7177)
* Implement a different escaping/quoting algorithm for arguments to System.Diagnostics.Process.

mono changed how quotes should be escaped when passed to
System.Diagnostic.Process, so we need to change accordingly.

The main difference is that single quotes don't have to be escaped anymore.

This solves problems like this:

    System.ComponentModel.Win32Exception : ApplicationName='nuget', CommandLine='restore '/Users/vsts/agent/2.158.0/work/1/s/tests/sampletester/bin/Debug/repositories/ios-samples/WorkingWithTables/Part 3 - Customizing a Table\'s appearance/3 - CellCustomTable/CellCustomTable.sln' -Verbosity detailed -SolutionDir '/Users/vsts/agent/2.158.0/work/1/s/tests/sampletester/bin/Debug/repositories/ios-samples/WorkingWithTables/Part 3 - Customizing a Table\'s appearance/3 - CellCustomTable'', CurrentDirectory='/Users/vsts/agent/2.158.0/work/1/s/tests/sampletester/bin/Debug/repositories', Native error= Cannot find the specified file
      at System.Diagnostics.Process.StartWithCreateProcess (System.Diagnostics.ProcessStartInfo startInfo) [0x0029f] in /Users/builder/jenkins/workspace/build-package-osx-mono/2019-08/external/bockbuild/builds/mono-x64/mcs/class/System/System.Diagnostics/Process.cs:778

ref: https://github.com/mono/mono/pull/15047

* Rework process arguments to pass arrays/lists around instead of quoted strings.

And then only convert to a string at the very end when we create the Process
instance.

In the future there will be a ProcessStartInfo.ArgumentList property we can
use to give the original array/list of arguments directly to the BCL so that
we can avoid quoting at all. These changes gets us almost all the way there
already (except that the ArgumentList property isn't available quite yet).

We also have to bump to target framework version v4.7.2 from v4.5 in several
places because of 'Array.Empty<T> ()' which is now used in more places.

* Parse linker flags from LinkWith attributes.

* [sampletester] Bump to v4.7.2 for Array.Empty<T> ().

* Fix typo.

* Rename GetVerbosity -> AddVerbosity.

* Remove unnecessary string interpolation.

* Remove unused variable.

* [mtouch] Simplify code a bit.

* Use implicitly typed arrays.
2019-10-14 16:18:46 +02:00
Sebastien Pouliot 445bf4be07
[registrar] Increase code sharing in generated `native_to_managed_trampoline_*` functions (#7221)
Several functions were 100% identical except for their signature. However
the signature were over-specialized and simplifying them allows the
(already) present code merge feature to achieve much better results.

Final size impact will vary based on the API used (both the managed and
native linker can remove some) but the more API you use the more likely
the application included duplicate code.

**Before**

`tools/mtouch/Xamarin.iOS.registrar.ios.x86_64.m` has `native_to_managed_trampoline_[1..379]`

```
find tools/ -name Xamarin.*.a | xargs ls -l
-rw-r--r--  1 poupou  staff  4143148 11 Oct 15:09 tools//mmp/Xamarin.Mac.registrar.full.a
-rw-r--r--  1 poupou  staff  4139052 11 Oct 15:09 tools//mmp/Xamarin.Mac.registrar.full.x86_64.a
-rw-r--r--  1 poupou  staff  4143160 11 Oct 15:09 tools//mmp/Xamarin.Mac.registrar.mobile.a
-rw-r--r--  1 poupou  staff  4139064 11 Oct 15:09 tools//mmp/Xamarin.Mac.registrar.mobile.x86_64.a
-rw-r--r--  1 poupou  staff  4521752 11 Oct 15:09 tools//mtouch/Xamarin.iOS.registrar.ios.i386.a
-rw-r--r--  1 poupou  staff  9240416 11 Oct 15:09 tools//mtouch/Xamarin.iOS.registrar.ios.simulator.a
-rw-r--r--  1 poupou  staff  4714336 11 Oct 15:09 tools//mtouch/Xamarin.iOS.registrar.ios.x86_64.a
```

**After**

`tools/mtouch/Xamarin.iOS.registrar.ios.x86_64.m` has `native_to_managed_trampoline_[1..132]`

```
find tools/ -name Xamarin.*.a | xargs ls -l
-rw-r--r--  1 poupou  staff  3723012 11 Oct 14:57 tools//mmp/Xamarin.Mac.registrar.full.a
-rw-r--r--  1 poupou  staff  3718916 11 Oct 14:57 tools//mmp/Xamarin.Mac.registrar.full.x86_64.a
-rw-r--r--  1 poupou  staff  3723016 11 Oct 14:57 tools//mmp/Xamarin.Mac.registrar.mobile.a
-rw-r--r--  1 poupou  staff  3718920 11 Oct 14:57 tools//mmp/Xamarin.Mac.registrar.mobile.x86_64.a
-rw-r--r--  1 poupou  staff  3995520 11 Oct 14:57 tools//mtouch/Xamarin.iOS.registrar.ios.i386.a
-rw-r--r--  1 poupou  staff  8195748 11 Oct 14:57 tools//mtouch/Xamarin.iOS.registrar.ios.simulator.a
-rw-r--r--  1 poupou  staff  4193956 11 Oct 14:57 tools//mtouch/Xamarin.iOS.registrar.ios.x86_64.a
```
2019-10-11 22:18:58 -04:00
Rolf Bjarne Kvinge 4d5d38be02
Drop the Xcode 9.4 dependency. (#7044) (#7135)
* Drop the Xcode 9.4 dependency. (#7044)

* Drop the Xcode 9.4 dependency.

Also bump mono to get the removal of the mac32 binaries.

New commits in mono/mono:

* mono/mono@beb9a1b182 [sdks] Remove the mac32 build.
* mono/mono@747a919a06 [ci] Make ios/mac sdks archive URL more predictable
* mono/mono@114013096e [ci] Build iOS/Mac Mono sdks archive using Xcode 11
* mono/mono@10a24f3ea1 Implement WriteCore and ReadCore in DeflateStream
* mono/mono@a925846b1f [offsets-tool] Install clang into the user-specific python directory. (#16933)
* mono/mono@fe64a4765e [2019-06] Bump msbuild and sdk versions to 3.0.1xx latest (#16870)
* mono/mono@7293597b90 [corlib] Fix building nunit-lite twice (#16910)
* mono/mono@1648e88687 Rename bundle identifier for the various Mono.frameworks we create for Xamarin.iOS. Fixes xamarin/xamarin-macios#7005. (#16896)
* mono/mono@a6b5187d76 [metadata] Fix leaks when handling a few attributes (#16675) (#16851)
* mono/mono@7da9a041b3 [2019-06] Bump to mono/corefx@e79cf5b
* mono/mono@2b7050bdf3 [2019-06] Add RenamedEvent* to FSW sources from CoreFX (#16758)
* mono/mono@4f5ed502c6 [msbuild] pick up p4 versions
* mono/mono@f04ee2219d [2019-06][msbuid][roslyn] Bump msbuild and roslyn-binaries to pick up dotnet 3.0.100-p9 toolset
* mono/mono@6b4b99e571 Vtable [i] can be null so this should be check before use it. Fixes #16712

Diff: 7af64d1ebe..beb9a1b182

* [tests] Add a fat macOS dylib for testing purposes.

Add a binary version of a fat macOS dylib (because we can't create one when we
need it since we can't create 32-bit slice anymore).

It was created like this (in tests/test-libraries):

	$ cat test.m
	int theUltimateAnswer ()
	{
		return 42;
	}

	$ /Applications/Xcode94.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang test.m -olibtest.i386.dylib -shared -isysroot /Applications/Xcode94.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -framework Foundation -framework CoreLocation -lz  -arch i386
	$ lipo -create libtest.i386.dylib .libs/macos/libtest.dylib -output libtest-fat.dylib

* [tests] Adjust XM tests to XM not having fat dylibs anymore.

* [tests] Adjust product tests to some libraries not being fat anymore.

* [tests] Don't treat an Xcode with the same major version number as old.

Fixes an issue in the MT0091 test, where it would fail on tvOS because the
test wanted to use an older Xcode, and we could end up returning Xcode 11.0
when the current Xcode is 11.1. Since the test depends on using the OS SDK as
it was designed for (technically using an OS SDK earlier than the latest), it
ended up failing because while the iOS SDK was bumped in Xcode 11.1, the tvOS
SDK was not.
2019-10-01 16:18:28 +02:00
Rolf Bjarne Kvinge 2adecee3d9
Drop the Xcode 9.4 dependency. (#7044)
* Drop the Xcode 9.4 dependency.

Also bump mono to get the removal of the mac32 binaries.

New commits in mono/mono:

* mono/mono@70d6903053 [2019-08] [merp] Use a separate program as the hang supervisor. (#16900)
* mono/mono@4bff2b6370 [offsets-tool] Install clang into the user-specific python directory.
* mono/mono@81894ec8ca Implement WriteCore and ReadCore in DeflateStream
* mono/mono@bfbf823ca1 [ci] Remove more XCODE32_DIR usages (#16964)
* mono/mono@ce01b20a4d Add net_4.8.xml to EXTRA_DIST and bump binary-reference-assemblies again
* mono/mono@7a587d7fa6 Add .NET 4.8 reference assemblies (#16912)
* mono/mono@35e454a8f6 [sdks] Remove the mac32 build. (#16936)
* mono/mono@75eb342f53 [2019-08] [System] Make FileSystemWatcher backend non-static (#16926)
* mono/mono@5881981f79 [2019-08] [mini] Add missing membars when initializing rgctx entries (#16909)
* mono/mono@6290b6cd6e Temporarily disable embedded ppdb data decompression (#16911)
* mono/mono@a0e7f9eaf2 [2019-08] [arm64_32] make "Debug Mode" work on Watch series 4 with --interpreter (#16886)
* mono/mono@6275840a7f Rename bundle identifier for the various Mono.frameworks we create for Xamarin.iOS. Fixes xamarin/xamarin-macios#7005. (#16901)
* mono/mono@25f6093283 [corlib] Fix building nunit-lite twice (#16895)
* mono/mono@7ec17ba1be [2019-08] [android sdk] Add aprofutil tool (#16884)
* mono/mono@f755f3b539 [metadata] Fix leaks when handling a few attributes (#16850)
* mono/mono@5f9a2db39b [2019-08] Fix infrequent hangs in test-runner. (#16854)
* mono/mono@f31f5ea1f1 [2019-08] [threads] do not convert NULL thread name (#16828)
* mono/mono@20308e6f87 [aot] Do not wrap tool_prefix path when calling strip (#16820)
* mono/mono@cecda47c48 [aprofutil] Add -p and -f options
* mono/mono@824cc12ac3 Bump to mono/corefx@e79cf5b
* mono/mono@b77dc06a7e [aprofutil] Install the tool correctly (#16112)
* mono/mono@1848d78d60 [aotprof-tool] Initial import of AOT profiler tool (#15384)
* mono/mono@da0086e304 [2019-08] Add RenamedEvent* to FSW sources from CoreFX (#16756)
* mono/mono@0297b21b03 [msbuild][roslyn] Bump msbuild and roslyn to pull in new versions (#16768)
* mono/mono@40631e3b9e [2019-08] [aot] move method_addresses to data.rel.so section to avoid text relocations (#16751)
* mono/mono@68b77674e2 Vtable [i] can be null so this should be check before use it. Fixes #16712
* mono/mono@4a0b4f41ed [mini] publish global patches after JitInfo has been added
* mono/mono@7a1f63fde6 [debugger][android] It was not initialising seq_points on MonoCompile on Android, so when was compiling dynamic methods, seq_points wasn't created and we got the assert when try to single step.

Diff: 29b1ac19c9..70d6903053

* [tests] Add a fat macOS dylib for testing purposes.

Add a binary version of a fat macOS dylib (because we can't create one when we
need it since we can't create 32-bit slice anymore).

It was created like this (in tests/test-libraries):

	$ cat test.m
	int theUltimateAnswer ()
	{
		return 42;
	}

	$ /Applications/Xcode94.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang test.m -olibtest.i386.dylib -shared -isysroot /Applications/Xcode94.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -framework Foundation -framework CoreLocation -lz  -arch i386
	$ lipo -create libtest.i386.dylib .libs/macos/libtest.dylib -output libtest-fat.dylib

* [tests] Adjust XM tests to XM not having fat dylibs anymore.

* [tests] Adjust product tests to some libraries not being fat anymore.

* One more test fix.
2019-09-24 13:40:18 +02:00
Bernhard Urban 04a4c3f2ce
[coop runtime] add a GC transition and relax some GC related assertions (#7036)
* [coop] add missing gc_unsafe transition

    frame #3: 0x02a39fd4 monotouchtest`log_callback(log_domain=0x00000000, log_level="error", message="../../../../../mono/metadata/object.c:1905: Expected GC Unsafe mode but was in STATE_BLOCKING state", fatal=4, user_data=0x00000000) at runtime.m:1251:3
    frame #4: 0x02a03f78 monotouchtest`monoeg_g_logv_nofree(log_domain=0x00000000, log_level=G_LOG_LEVEL_ERROR, format=<unavailable>, args=<unavailable>) at goutput.c:149:2 [opt]
    frame #5: 0x02a03f14 monotouchtest`monoeg_g_logv(log_domain=<unavailable>, log_level=<unavailable>, format=<unavailable>, args=<unavailable>) at goutput.c:156:10 [opt]
    frame #6: 0x02a03fa8 monotouchtest`monoeg_g_log(log_domain=<unavailable>, log_level=<unavailable>, format=<unavailable>) at goutput.c:165:2 [opt]
    frame #7: 0x029e54f8 monotouchtest`assert_gc_unsafe_mode(file="../../../../../mono/metadata/object.c", lineno=1905) at checked-build.c:396:3 [opt]
    frame #8: 0x0294ef98 monotouchtest`mono_class_vtable_checked(domain=0x16d87b70, klass=0x17bfab98, error=0x19498a08) at object.c:1905:2 [opt]
    frame #9: 0x0298f0dc monotouchtest`get_current_thread_ptr_for_domain(domain=0x16d87b70, thread=0x03f645d0) at threads.c:635:2 [opt]
    frame #10: 0x0298d9dc monotouchtest`mono_thread_current at threads.c:2026:23 [opt]
    frame #11: 0x02992a80 monotouchtest`mono_runtime_set_pending_exception(exc=0x0357e4a0, overwrite=0) at threads.c:5176:23 [opt]
    frame #12: 0x02a3c650 monotouchtest`::xamarin_process_nsexception_using_mode(ns_exception=name: "System.ApplicationException" - reason: "3,14", throwManagedAsDefault=false) at runtime.m:2369:4
    frame #13: 0x02a3c478 monotouchtest`::xamarin_process_nsexception(ns_exception=name: "System.ApplicationException" - reason: "3,14") at runtime.m:2336:2
    frame #14: 0x0270b488 monotouchtest`::xamarin_pinvoke_wrapper_objc_msgSendSuper18(__p__0=0x0357d0f0, __p__1=0x02ad1ef2) at pinvokes.m:5732:4
    frame #15: 0x02a64764 monotouchtest`do_icall(frame=<unavailable>, sig=0x17d70bf0, op=<unavailable>, sp=0x19498fa0, ptr=<unavailable>, save_last_error=0) at interp.c:1947:3 [opt]
    frame #16: 0x02a632b8 monotouchtest`do_icall_wrapper(frame=0x194991b0, sig=0x17d70bf0, op=547, sp=0x19498fb0, ptr=0x0270b408, save_last_error=0) at interp.c:2037:7 [opt]
    Messaging::void_objc_msgSendSuper @ 396160394 "calli.nat.fast" || frame #17: 0x02a51d5c monotouchtest`interp_exec_method_full(frame=0x194991b0, context=<unavailable>, clause_args=<unavailable>, error=<unavailable>) at interp.c:3229:9 [opt]
    ObjCExceptionTest::InvokeManagedExceptionThrower @ 396160296 "vcall" || frame #18: 0x02a524e8 monotouchtest`interp_exec_method_full(frame=0x19499370, context=<unavailable>, clause_args=<unavailable>, error=<unavailable>) at interp.c:3400:4 [opt]
    ExceptionsTest::ManagedExceptionPassthrough @ 396150902 "vcallvirt.fast" || frame #19: 0x02a521cc monotouchtest`interp_exec_method_full(frame=0x194994d0, context=<unavailable>, clause_args=<unavailable>, error=<unavailable>) at interp.c:3325:4 [opt]
    Object::runtime_invoke_direct_void__this__ @ 401347822 "vcall" || frame #20: 0x02a524e8 monotouchtest`interp_exec_method_full(frame=0x19499588, context=<unavailable>, clause_args=<unavailable>, error=<unavailable>) at interp.c:3400:4 [opt]
    frame #21: 0x02a506f8 monotouchtest`interp_runtime_invoke(method=<unavailable>, obj=0x0357c4f0, params=0x00000000, exc=0x1949965c, error=0x194998b8) at interp.c:1766:2 [opt]
    frame #22: 0x028a739c monotouchtest`mono_jit_runtime_invoke(method=0x17534858, obj=<unavailable>, params=0x00000000, exc=<unavailable>, error=0x194998b8) at mini-runtime.c:3170:12 [opt]
    frame #23: 0x02951cfc monotouchtest`do_runtime_invoke(method=0x17534858, obj=0x0357c4f0, params=0x00000000, exc=0x00000000, error=0x194998b8) at object.c:3017:11 [opt]
    frame #24: 0x0294e6d4 monotouchtest`mono_runtime_invoke_checked(method=<unavailable>, obj=<unavailable>, params=<unavailable>, error=<unavailable>) at class-getters.h:24:1 [opt] [artificial]
    frame #25: 0x02955408 monotouchtest`mono_runtime_try_invoke_array(method=0x17534858, obj=0x0357c4f0, params=0x00000000, exc=0x00000000, error=0x194998b8) at object.c:5564:10 [opt]
    frame #26: 0x02905fac monotouchtest`ves_icall_InternalInvoke(method=<unavailable>, this_arg=<unavailable>, params=0x00000000, exc=0x19499f0c) at icall.c:3753:8 [opt]
    frame #27: 0x02a64788 monotouchtest`do_icall(frame=<unavailable>, sig=0x17496978, op=<unavailable>, sp=0x19499d88, ptr=<unavailable>, save_last_error=0) at interp.c:1982:20 [opt]
    frame #28: 0x02a632b8 monotouchtest`do_icall_wrapper(frame=0x19499fb0, sig=0x17496978, op=552, sp=0x19499da0, ptr=0x02905bec, save_last_error=0) at interp.c:2037:7 [opt]
    RuntimeMethodInfo::InternalInvoke @ 400702536 "calli.nat.fast" || frame #29: 0x02a51d5c monotouchtest`interp_exec_method_full(frame=0x19499fb0, context=<unavailable>, clause_args=<unavailable>, error=<unavailable>) at interp.c:3229:9 [opt]
    RuntimeMethodInfo::Invoke @ 400701852 "call" || frame #30: 0x02a524e8 monotouchtest`interp_exec_method_full(frame=0x1949a110, context=<unavailable>, clause_args=<unavailable>, error=<unavailable>) at interp.c:3400:4 [opt]
    MethodBase::Invoke @ 400700872 "callvirt.fast" || frame #31: 0x02a521cc monotouchtest`interp_exec_method_full(frame=0x1949a280, context=<unavailable>, clause_args=<unavailable>, error=<unavailable>) at interp.c:3325:4 [opt]

* [coop] relax a couple GC state assertions

* [coop] update doc for enabling GC assertions

* [coop] relax a GC assertion in release trampoline
2019-09-23 22:08:25 +02:00
Rolf Bjarne Kvinge df523c8b18 Merge remote-tracking branch 'origin/xcode11' into d16-3. 2019-09-17 08:30:12 +02:00
Rolf Bjarne Kvinge f62791c1eb Renumber an error so that it doesn't clash with another error. 2019-09-16 15:18:34 +02:00
Rolf Bjarne Kvinge 5b4efe22f4 Fix merge conflict. 2019-09-16 15:17:49 +02:00
Rolf Bjarne Kvinge 303aa0a649 Merge remote-tracking branch 'origin/xcode11' into master-xcode11 2019-09-13 18:35:18 +02:00
Rolf Bjarne Kvinge f7363ecfbf Renumber an error so that it doesn't clash with another error. 2019-09-12 08:35:21 +02:00
Rolf Bjarne Kvinge f6e0531197 Merge xcode11 into d16-3. 2019-09-12 08:29:02 +02:00
Manuel de la Pena 489719f56a [CoreHaptics] Remove the framework from Mac OS X until we know better. (#6987) 2019-09-11 18:49:29 -04:00
Manuel de la Pena 036f23331c
[MetricKit] Add new framework up to Xcode11 GM. (#6969) 2019-09-11 15:46:38 -04:00
Manuel de la Pena b5a85a115b
[CoreHaptics] Add support for the new framework up to beta 7. (#6943) 2019-09-10 13:03:26 -04:00
Rolf Bjarne Kvinge 15f0af7a1a
[registrar] Report a warning when the registrar export an abstract INativeObject type to Objective-C. (#6659)
* [registrar] Report a warning when the registrar export an abstract INativeObject type to Objective-C.

Exporting abstract types to Objective-C can lead to problems when at runtime
we're asked to create an instance of such a type (which we can't), so warn
when this happens.

This would have caught #6655, and the problems explained in #4969 as well.

Since this may trigger for code that's currently working fine, I'm making it a
warning instead of an error (which means adding some extra code to be able to
easily report warnings from the generator code).

* Don't assume a TypeReference can be successfully resolved every time.
2019-09-10 04:35:59 -07:00
Sebastien Pouliot c41a5456eb
[simlauncher] Add missing weak frameworks to simlauncher (#6955)
Things often work fine without them but, in a few cases, you can run into
some weird problems.

Add better comments for synchronization... until we add some tests [1]

Replace the following, cancelled PR
* BackgroundTask https://github.com/xamarin/xamarin-macios/pull/6949
* INcomingCallNotifications https://github.com/xamarin/xamarin-macios/pull/6954
* LinkPresentation https://github.com/xamarin/xamarin-macios/pull/6953
* PencilKit https://github.com/xamarin/xamarin-macios/pull/6950
* SoundAnalysis https://github.com/xamarin/xamarin-macios/pull/6952

[1] https://github.com/xamarin/xamarin-macios/issues/6951
2019-09-09 22:58:39 -04:00
Jo Shields 926372c940 Bump to mono:2019-08 (#6723)
Included changes are:

* New Cecil API in 2019-08
* Permit new symbols from networkable AOT profiler in symbols test
* Bump Mono to include fix for zlib linking, and new Cecil API
* We need to link against zlib now, if using libmono.a
* [Tests] Ignore memory hungry tests in old devices. (#6913)
* Ignore certain tests that use too many resources in old devices.
* Add missing tests that use too much memory on 32b devices.
2019-09-09 09:44:03 -04:00
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
Rolf Bjarne Kvinge 08809f5bf7
[d16-3] Implement notarization. (#6927)
* 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-06 05:35:12 -07:00
Alex Soto f933589401
Merge pull request #6844 from dalexsoto/alex-visionkit-xcode11
[VisionKit] Add Xcode 11 Beta 1 - 6 bindings
2019-08-30 11:19:18 -04:00
Rolf Bjarne Kvinge ec09193daf
Build native code with -std=c++14. (#6864)
* Build native code with -std=c++14.

Apple's headers now require -std=c++14 to compile their headers in C++ mode.

This fixes a compile error that would occur with the PhotosUI framework when
compiling code for C++.

* [mmp] Use -std=c++14 when compiling.

* Fix command line output.

* [mmp] Add all source files at the end, so they all get the -x clang argument applied.

* Limit when using c++14 in mtouch according to language.
2019-08-29 08:49:06 -07:00
Sebastien Pouliot c5d75e18be
[network][watchos] Enable Network.framework for watchOS (new in 6.0) (#6874)
Note that there is no new Xcode 11 API in this PR - just existing
API (from Xcode 10) now available on watchOS 6.
2019-08-28 21:22:10 -04:00
Rolf Bjarne Kvinge b8e9c83ce0
[mtouch] Detect when we run into the 32-bit arm size limitation, and report a better error. Fixes #6526. (#6855)
Also limit the output from the native compiler, so that we don't overload the
IDEs with output if the native compiler produces tens of thousands of errors.

Fixes https://github.com/xamarin/xamarin-macios/issues/6526.
2019-08-28 04:54:26 -07:00
Alex Soto 7d7550cb26
[VisionKit] Add Xcode 11 Beta 1 - 6 bindings 2019-08-27 17:54:48 -04:00
Rolf Bjarne Kvinge f3fbbd7047
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.
2019-08-26 09:51:50 -07:00
Sebastien Pouliot d5f5eebb75
[quicklookthumbnailing] Update for Xcode11 beta 1 to 5 (#6789)
New framework - but it includes some of iOS API that were previously in
QuickLook.framework. Types were moved but remains in the old namespace
until `XAMCORE_4_0` is defined.
2019-08-19 09:01:52 -04:00
Sebastien Pouliot b9201c7afc
[executionpolicy] Update for Xcode 11 beta 1 (#6774)
New framework for macOS-only
No changes in beta 2 to 5
2019-08-14 22:07:55 -04:00
Rolf Bjarne Kvinge d4192a59f0
[xcode11] Remove the WatchKit framework from iOS while keeping API stability. Fixes #6492. (#6503)
* [WatchKit] Remove this framework for iOS while keeping backwards compatibility. Fixes #6492.

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

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

* [introspection] Adjust test.

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

* [xtro] Remove WatchKit for iOS.

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

There's probably a reason the field was obsoleted.

* [introspection] Add exception for the WatchKit framework.

* [xtro] Ignore obsolete enums.

There's probably a reason they're obsoleted.

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

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

* [WatchKit] Make more API obsolete/hidden.

Two classes managed to slip past the first time.

* [tests] Adjust test after WatchKit removal.
2019-08-14 17:46:55 +02:00
Sebastien Pouliot ca81952852
[fileprovider[ui]] Update for Xcode 11 beta 1 to 5 (#6759)
Moved some code from uikit.cs since the type moved a while ago. That
ease code sharing with macOS (XM) but it stays into the UIKit namespace
(for XI) until `XAMCORE_4_0` to ensure binary compatibility.
2019-08-14 08:12:07 -04:00
monojenkins 8015ece364 [mmp] Fix QTKit submission issue when linker is disabled (#6633)
- There is duplicate code so the QTKit exclusion is needed in two locations
- Patch from Sebastien
- Fix validated by customer submission to Apple
2019-07-29 09:31:30 -04:00
Rolf Bjarne Kvinge 6075a9aa5b
[mmp] Remove support for 32-bit apps. Partial fix for #6300. (#6642)
Partial fix for https://github.com/xamarin/xamarin-macios/issues/6300.
2019-07-24 09:01:14 -07:00
Chris Hamons d76257250e
[mmp] Fix QTKit submission issue when linker is disabled (#6628)
- There is duplicate code so the QTKit exclusion is needed in two locations
- Patch from Sebastien
- Fix validated by customer submission to Apple
2019-07-23 07:17:15 -07:00
Rolf Bjarne Kvinge a495077533
[xcode11] Stop building/shipping 32-bit Xamarin.Mac bits. Partial fix for #6300. (#6393)
This includes:

* 32-bit version of Xamarin.Mac.dll and OpenTK.dll
* XamMac.dll and XamMac.CFNetwork.dll
* 32-bit versions of the runtime libraries (libxammac.a and friends).
* 32-bit version of the partial static library for Xamarin.Mac.
* Classic support in the generator.

We still ship a few Classic files so that Visual Studio for Mac continue to detect that Xamarin.Mac is installed (otherwise VSfM won't open Classic projects, which makes it impossible to use the migration wizard).

This makes our build slightly faster.

Partial fix for #6300.
2019-07-15 10:19:24 -07:00
Manuel de la Pena 7e96b317e8
[CoreMedia] Add support for CoreMedia on Xcode 11 beta 3. (#6513) 2019-07-11 20:14:58 +02:00
Rolf Bjarne Kvinge 469287ed41
[mtouch] Work around regression in dyld. Fixes #6422. (#6545)
It seems dyld doesn't like an rpath without a trailing slash for '@executable_path'.

Fixes https://github.com/xamarin/xamarin-macios/issues/6422.
2019-07-10 05:06:27 -07:00
monojenkins a7f4c7011e [registar] Search the entire interface hierarchy for protocols. Fixes #6493. (#6524)
When we're searching for metadata for marshalling blocks, we must search the
entire interface hierarchy for protocols that implement optional members.

Fixes https://github.com/xamarin/xamarin-macios/issues/6493.
2019-07-09 06:50:55 -07:00
TJ Lambert d0b332c0c3 [LinkPresentation] Add Xcode 11 Beta 1 & Beta 2 bindings (#6437)
* adding LinkPresentation - does not pass intro

* adding pull request message to linkpresentation.cs

* passes tests

* removed comments

* removed watch

* fixing whitespace changes
2019-07-08 16:24:53 -04:00
Rolf Bjarne Kvinge 0ceced29a9
[registar] Search the entire interface hierarchy for protocols. Fixes #6493. (#6514)
When we're searching for metadata for marshalling blocks, we must search the
entire interface hierarchy for protocols that implement optional members.

Fixes https://github.com/xamarin/xamarin-macios/issues/6493.
2019-07-08 08:41:55 -07:00
Sebastien Pouliot 71a657d2c5
Bump for Xcode 11 beta 3 (#6480) 2019-07-02 23:34:24 -04:00
Manuel de la Pena fa78fb38d0
[BackgroundTasks] Add new Framework for Xcode 11 beta 1. (#6438) 2019-07-02 15:54:21 +02:00
TJ Lambert 065ad880d3 [Speech] Add Xcode 11 Beta 1 & Beta 2 bindings (#6440)
* adding Speech

* Style changes and fixed copyright

* fixing requested changes

* adding spacing to make less red in diff

* adding [DisableDefaultCtor] to SFSpeechRecognitionResult and SFTranscription

* Update src/speech.cs

Co-Authored-By: Alex Soto <alex@alexsoto.me>

* Update src/speech.cs

Co-Authored-By: Alex Soto <alex@alexsoto.me>

* Update src/speech.cs

Co-Authored-By: Alex Soto <alex@alexsoto.me>
2019-07-01 19:42:49 -04:00
TJ Lambert 903c3eec31 [PencilKit] Add Xcode 11 Beta 1 & Beta 2 bindings (#6415)
* Adding PencilKit to the src

* forgot the mac constants

* adding PencilKit and fixed whitespace

* removing whitespace

* removed mac capabilities and added ignore for PencilKit.todo

* removed newline

* added the iOS-PencilKit.ignore file

* removed pencilkit.todo

* adding DesignatedDefaultCtor
2019-06-27 09:18:58 -04:00
Sebastien Pouliot 644cf70370
[pushkit] Update for Xcode 11 beta 1 (#6432)
No change in beta 2

This enable PushKit on watchOS and macOS.

Availability macros suggest this is available on tvOS 13 but the
headers are not in the tvOS SDK (at least in beta 2)
2019-06-27 05:19:42 -07:00
Sebastien Pouliot dbe0d21282
[coremotion] Update for Xcode 11 beta 1 (#6419)
No change in beta 2

This enable some API in macOS. Headers are now present and some types are
marked as unavailable on macOS - but, sadly, nothing got marked as new
for 10.15 :|
2019-06-26 18:44:33 -07:00
Sebastien Pouliot 53c6b6d74e
[authenticationservices] Update for Xcode 11 beta 1 and 2 (#6408)
Also enable the framework for macOS, watchOS and tvOS
2019-06-26 05:27:29 -07:00
TJ Lambert 6ad81d8e63 [IncomingCallNotifications] Add Xcode 11 Beta 1 & Beta 2 bindings (#6374)
* adding IncomingCallNotifications

* adding IncomingCallNotifications

* added comments about INSCopying:copy issue

* INSCopying -> NSCopying

* passing intro and extro and added IgnoreAsync and skip iOSApiCtorInitTest

* removed newlines

* additional newline

* making recommended changes after breaking branch

* removed todo files
2019-06-24 14:42:45 -04:00
tj-devel709 2781658938 [SoundAnalysis] Add Xcode 11 Beta 1 & Beta 2 bindings (#6351)
* adding Sound Analysis

* set up error domain and added CMTimeRange for all platforms except watch

* removed whitespaces

* removed more whitespaces

* edited framework files and constants. Changed header names and added todo files

* Apply feedback

* fixing head and skipping functions with class issues

* fixing spacing-tab issues
2019-06-21 10:05:27 -04:00
Rolf Bjarne Kvinge 0cd58ff199 [xharness] Add helper methods to get/set deployment target in plist for macOS. 2019-06-20 10:36:15 +02:00
Rolf Bjarne Kvinge 626a859a46
[xcode11] Fix several issues to make the mtouch tests pass. Fixes #6259. (#6332)
* [tests] Minor refactor to get better Xcode version parsing.

* Rename Configuration.XcodeVersion to XcodeVersionString.
* Add Configuration.XcodeVersion a parsed Version instane of XcodeString.

* [tests] Ignore all 'MT0099: Not linking with WatchKit because Xcode 11 beta 1' warnings in tests.

* [tests] Adjust min OS version tests for Xcode 11b1.

* [tests] Adjust tests for changes in 'nm' output.

* [tests] Adjust tests for name changes in Clang.

* [tests] Adjust tests for changes in ld warning format.

* [msbuild] 'metal' and 'metallib' aren't in PATH anymore, so use xcrun to execute them.

* [msbuild] Fix DevicePlatformBinDir for the Metal and MetalLib targets on iOS.

Also set the SDKROOT variable, otherwise metal and metallib don't work
properly, and revert the previous attempt at a fix (use xcrun).

* [tests] Simplify version parsing code to not version parse anymore.

* [tests] Add FIXME for once Apple fixes the WatchKit disappearance.
2019-06-19 07:20:02 +02:00
Rolf Bjarne Kvinge 9b32d682b6 [mtouch] Fix building watch extensions with the watchOS 6.0 SDK.
The watchOS 6.0 SDK renames/moves a few symbols, so some magic is required to
make things work on both watchOS 6.0 and earlier versions.
2019-06-14 02:17:36 +02:00
Sebastien Pouliot 00ba38035f
[devicecheck] Update for xcode 11 beta 1 (#6286)
Added support for macOS 10.15 and for iOS simulator (>= 13)
2019-06-13 20:09:34 -04:00
Rolf Bjarne Kvinge 67e497abe8 [mtouch] Don't link with WatchKit, it's been removed. 2019-06-05 16:51:33 -07:00
Rolf Bjarne Kvinge 60a5392d35 [mmp/mtouch] Workaround broken frameworks in Xcode 11 beta 1.
* The Photos headers are broken when building in C++ mode.
* The PhotosUI headers include the Photos header, so those don't work either.
* The WatchKit framework just isn't there at all.
2019-06-04 13:45:33 -07:00
Sebastien Pouliot fc5b9e24d4
[mmp] Ignore, by default, frameworks that cause rejection from App Store. Fix #6039 (#6107)
So far this only applies to `QTKit`...

XM will now, by default, avoid natively link with QTKit unless it's
instructed to so explicitly using `--link-prohibited-frameworks`

ref: https://github.com/xamarin/xamarin-macios/issues/6039
2019-05-23 15:59:40 -05:00
monojenkins d62978945d [d16-2] [linker] Add the custom attributes removal step as an configurable optimization. Fix #3655 (#6058)
This allows the optimization to be disabled in cases where one, or
many, a custom attribute(s) are required by the application at runtime.

While not ideal disabling this single step is much better than disabling
linking for the whole application.

A better approach is described in https://github.com/xamarin/xamarin-macios/issues/6048
but this configuration optimization makes sense independently of it.

Fix https://github.com/xamarin/xamarin-macios/issues/3655
2019-05-16 16:55:10 -05:00
Sebastien Pouliot 2121b703cd
[linker] Add the custom attributes removal step as an configurable optimization. Fix #3655 (#6049)
This allows the optimization to be disabled in cases where one, or
many, a custom attribute(s) are required by the application at runtime.

While not ideal disabling this single step is much better than disabling
linking for the whole application.

A better approach is described in https://github.com/xamarin/xamarin-macios/issues/6048
but this configuration optimization makes sense independently of it.

Fix https://github.com/xamarin/xamarin-macios/issues/3655
2019-05-16 09:16:32 -07:00
Rolf Bjarne Kvinge 557d435844
Fix mlaunch build. (#6038)
An mlaunch fix in master required a code change in xamarin-macios; when
backporting this mlaunch fix to d16-2 the corresponding xamarin-macios fix was
not, causing the build to break.

Fixes this:

    [...]
    Build FAILED.

    "/Users/builder/jenkins/workspace/xamarin-macios/maccore/tools/mlaunch/Xamarin.Hosting/Xamarin.Hosting.sln" (default target) (1) ->
    "/Users/builder/jenkins/workspace/xamarin-macios/maccore/tools/mlaunch/Xamarin.Hosting/Xamarin.Hosting.csproj" (default target) (2) ->
    (CoreCompile target) ->
      /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/tools/common/MachO.cs(10,15): error CS0234: The type or namespace name 'Bundler' does not exist in the namespace 'Xamarin' (are you missing an assembly reference?) [/Users/builder/jenkins/workspace/xamarin-macios/maccore/tools/mlaunch/Xamarin.Hosting/Xamarin.Hosting.csproj]

        0 Warning(s)
        1 Error(s)

    Time Elapsed 00:00:03.63
    make[3]: *** [Xamarin.Hosting/Xamarin.Launcher/bin/Debug/mlaunch.app] Error 1
2019-05-10 15:40:51 +02:00
monojenkins 2d8396d0a0 [mtouch/mmp] Make the mono native mode a Target-specific variable. (#6037)
The arm64_32 slice for watchOS apps will always use the 'unified' mode, while
the armv7k can be both 'unified' and 'compat' depending on the deployment
target, so we need to keep track of this per Target.

This PR does not change anything related to arm64_32, that will come in a
later PR.
2019-05-10 15:40:17 +02:00
Rolf Bjarne Kvinge d657c723ee
[mtouch/mmp] Make the mono native mode a Target-specific variable. (#6028)
The arm64_32 slice for watchOS apps will always use the 'unified' mode, while
the armv7k can be both 'unified' and 'compat' depending on the deployment
target, so we need to keep track of this per Target.

This PR does not change anything related to arm64_32, that will come in a
later PR.
2019-05-09 21:36:42 +02:00
Rolf Bjarne Kvinge 6eeb2201a9
[mtouch] Move string null/empty check into CompilerFlags.AddOtherFlag. (#6027) 2019-05-09 18:43:39 +02:00
Rolf Bjarne Kvinge 0887877c97 [mtouch] Fix framework information for MetalKit in the simulator.
MetalKit wasn't available in the simulator until iOS 10.0.
2019-05-09 13:24:47 +02:00
Rolf Bjarne Kvinge f7796e1eee [xharness] Add support for running tests with the earliest possible simulator, and use it for introspection tests. 2019-05-09 13:23:34 +02:00
Rolf Bjarne Kvinge 744ec56156 Merge remote-tracking branch 'origin/master' into xharness-old-simulators5 2019-05-08 15:05:05 +02:00
Rolf Bjarne Kvinge ef0d7a1718
[generator] Show proper errors when failing to compile something. (#6003)
* [mtouch/mmp] Split out the RunCommand[Async] methods to a separate file so that the generator can reuse more easily.

* [generator] Show proper errors when failing to compile something.

* Fix grammar
2019-05-07 13:40:59 +02:00
Rolf Bjarne Kvinge 2f86feae7d [mtouch] Fix framework information for MetalKit in the simulator.
MetalKit wasn't available in the simulator until iOS 10.0.
2019-05-06 17:01:17 +02:00
Rolf Bjarne Kvinge e48955268f [xharness] Add support for running tests with the earliest possible simulator, and use it for introspection tests. 2019-05-06 17:00:33 +02:00
Rolf Bjarne Kvinge a36019c83c
[mtouch/mmp] Remove dead code. (#5997) 2019-05-06 14:40:31 +02:00
Rolf Bjarne Kvinge dbd8e111ee
Bump maccore to get fix for #5888. (#5969)
This also requires a minor fix in MachO.cs.

Diff: 758f471fbc..f7ca470c0a

Fixes https://github.com/xamarin/xamarin-macios/issues/5888.
2019-05-03 15:18:03 +02:00
Rolf Bjarne Kvinge 868b3ecf44 [registrar] Add support for ref/out arrays. 2019-04-30 14:29:24 +00:00
Rolf Bjarne Kvinge b750056271 [registrar] Fix/implement returning SEL/Class in a ref/out parameter in the registrars. 2019-04-30 14:29:24 +00:00
Rolf Bjarne Kvinge 84b99d85e5 [registrar] Reuse some more array conversion code from the static registrar. 2019-04-30 14:29:24 +00:00