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

729 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge d42a9f4909 [mtouch] Make MT2015 (invalid HttpMessageHandler) a warning for known http message handlers on watchOS. Fixes #46552. (#1134)
Earlier versions of Xamarin Studio stored an invalid http message handler in
watchOS project files, which would cause a build error. In addition Xamarin
Studio removed the UI to set the http message handler (since only one value is
valid), which meant that the user had to edit the project file by hand to get
around this build error.

So make it a warning instead (and document what the user has to do to fix the
warning).

https://bugzilla.xamarin.com/show_bug.cgi?id=46552
2016-11-08 11:13:53 -05:00
Alex Soto 6b65ce9077 [AVFoundation] Low hanging fruits and xtro of AVFoundation (#980)
This commit brings all new 10.12 api + most of the unbound
AVFoundation API that is macOS specific and was left in the limbo
2016-11-07 09:32:56 -06:00
Rolf Bjarne Kvinge 503061f6ab [tests] Update to NUnit 3 in mtouch tests. (#1119) 2016-11-07 12:22:37 +01:00
Rolf Bjarne Kvinge 5ef045d764 [xharness] Capture stdout/stderr from simulator apps. (#1116)
And if we have a tty, just show the output directly there. Otherwise capture
it, and store it in log files.
2016-11-04 12:13:20 +01:00
Rolf Bjarne Kvinge 3351e2a633 Add a 'repositorypath' to our NuGet.Config and update paths everywhere accordingly. (#1110)
This makes us only put packages in one directory (saves disk space and time),
and it also makes project files in multiple solutions work properly
(mtouch.csproj is in tests/tests.sln and tests/mtouch/mtouch.sln).
2016-11-04 09:13:33 +01:00
Rolf Bjarne Kvinge a2a67377df [mtouch] Update the timestamp for the simlauncher when copying it into the app. (#1094)
This makes sure that the final executable has a timestamp after the .exe,
which makes the MSBuild tasks able to avoid unnecessary rebuilds.
2016-11-03 14:35:46 +01:00
Rolf Bjarne Kvinge 43c06e0cbb [tests] Ignore mtouch tests that require device support if device support was not included in the build. (#1109) 2016-11-03 13:20:31 +01:00
Rolf Bjarne Kvinge 4c8867c1b2 [xharness] Give the mtouch tests 120 minutes to finish. (#1095)
Give the mtouch tests 120 minutes to finish, since that's what wrench
currently gives them.
2016-11-03 11:53:49 +01:00
Sebastien Pouliot ee046ee034 [generator] Copy [Obsolete] attributes on smart enums. Fixes #46292 (#1104)
Covers attributes on the type itself and on its members.

Reference:
* https://bugzilla.xamarin.com/show_bug.cgi?id=46292
2016-11-02 23:18:59 -04:00
Sebastien Pouliot e55385637f [generator] Allow identical (numeric) values in smart enums. Fixes #46285 (#1102)
Considering the following binding code:

    public enum HMAccessoryCategoryType {
        [Field ("HMAccessoryCategoryTypeGarageDoorOpener")]
        DoorOpener,

        GarageDoorOpener = DoorOpener,
    }

We must

1. Ensure that `HMAccessoryCategoryType.DoorOpener.GetConstant () ==
	HMAccessoryCategoryType.GarageDoorOpener.GetConstant ()`;

This is done by using the numeric value of the enum member (instead of the name)

2. Ensure that `HMAccessoryCategoryTypeExtensions.GetValue ("HMAccessoryCategoryTypeGarageDoorOpener")`
   always return the same enum value, i.e. it can **not** change between
   XI versions (e.g. due to reflection ordering) as it could break
   comparison code;

This is done by only adding a map to the member that has a [Field] and
means that:

2.1. the _favorite_ enum member should be the one with the [Field]; and

2.2. a [Field] value can only be used once per enum (or else we report
     an BI1046 error). This also solve the duplicate code generation for
	 the constant loading code;

Reference:
* https://bugzilla.xamarin.com/show_bug.cgi?id=46285
2016-11-02 21:46:04 -04:00
Rolf Bjarne Kvinge f1420510da [xharness] Add support to configure which tests to run on Jenkins by using labels on pull requests. (#1082) 2016-11-02 16:46:32 +01:00
Rolf Bjarne Kvinge b13bbe0dfb [xharness] Detect and report launch failures better. (#1079) 2016-11-02 15:43:55 +01:00
Rolf Bjarne Kvinge e6b0ed232d [mtouch tests] Remove unnecessary parameter from helper method. (#1093) 2016-11-02 14:44:37 +01:00
Rolf Bjarne Kvinge 7728c4cd19 [registrar] Use metadata tokens instead of strings to find types and methods. (#1085)
Use metadata tokens instead of strings to find types and methods.

This makes the code to find methods more compact (a lot less strings in the
executable, and additionally in most cases a compact representation (32-bit
integer) of the corresponding metadata token and additional information can be
used, which results in less executable code (fewer parameters to methods,
etc)), resulting in smaller executables.

Size savings are around 200kb for dont link apps, and 20-60kb for linked apps
(this obviously varies a lot depending on how much has to registered by the
registrar).

|                |    Before     |     After     |       Diff        |
|----------------|--------------:|--------------:|------------------:|
| dontlink/32bit |  102.810.144  |  102.609.456  | -200.688 = -0,20% |
| dontlink/64bit |  107.420.576  |  107.221.792  | -198.784 = -0,19% |
| linksdk/32bit  |   40.957.296  |   40.936.864  |  -20.432 = -0,05% |
| linksdk/64bit  |   43.113.136  |   43.093.936  |  -19.200 = -0,04% |
| linkall/32bit  |   38.410.032  |   38.348.288  |  -61.744 = -0,16% |
| linkall/64bit  |   40.315.200  |   40.267.344  |  -47.856 = -0,12% |

Additionally I've removed the `lazy_map` dictionary, which we populated at
startup and was used to map between Class instances and the corresponding
managed type's FullName, and instead iterate over a native array of Class ->
metadata token mappings whenever we need to look up the managed type for a
certain Class instance.

This is slightly slower for each type we need to look up (for a non-linked app
there might be a 2000-3000 entries in the native array, which would be
iterated instead of using a hashtable lookup), but it's only done once per
type and there's a significant startup memory improvement.

For a non-linked test app I get the following using the Xamarin profiler:

|                   |  Before |  After  |       Diff      |
|-------------------|--------:|--------:|----------------:|
| Memory allocated  |  2,8 MB |  2,4 MB | -0,4 MB = -14 % |
| Objects allocated |   43678 |   38463 |   -5215 = -12 % |
| Private bytes     | 26,6 MB | 24,4 MB | -2,2 MB = -8,3% |
| Working set       | 26,6 MB | 24,4 MB | -2,2 MB = -8,3% |
2016-11-01 14:34:56 -04:00
Rolf Bjarne Kvinge dddd243dfd [xharness] Update to remove OpenTK-1.0 instead of OpenTK references after XI/Classic removal. (#1084) 2016-11-01 13:13:52 -04:00
Sebastien Pouliot 7b38187479 [mtouch][mmp] Unify user resources removal as a link step (#1026)
Right now the logic exists in a few places, both in and outside the
linker. We recently began to use part of the linker pipeline in normal /
all builds so it's easier to share (and unify) the code now.

The real gain is to avoid copying assemblies, in particular large ones,
more than strictly needed while building.

E.g. a build including a very large 1.3GB assembly, with several
native libraries embedded, save a lot of time avoiding the rewrites

mtouch (before)
		Total time: 64202 ms

mtouch (after)
		Total time: 34840 ms

* Add XM support for RemoveUserResourcesSubStep

* Tests supplied by @chamons
2016-11-01 13:11:25 -04:00
Rolf Bjarne Kvinge 23b693c5ff [mtouch] Update mdb files even if the corresponding assembly didn't change. Fixes #39535. (#1072)
Update mdb files even if the corresponding assembly didn't change, because the
mdb can change even if the assembly didn't (if whitespace was modified in the
source code, causing code lines to move).

https://bugzilla.xamarin.com/show_bug.cgi?id=39535
2016-11-01 15:37:37 +01:00
Rolf Bjarne Kvinge 5415c90092 [xharness] Add support for running the mtouch tests on Jenkins. (#1077) 2016-11-01 14:43:37 +01:00
Rolf Bjarne Kvinge c521bfde62 [mtouch] Don't link native libraries into the main executable if we're doing an incremental build. Fixes #42473. (#1073)
Native libraries are already linked into the dylib for the binding assembly,
which means that if we also link it into the main executable, the native code
ends up twice in the app (which is bad for many reasons).

https://bugzilla.xamarin.com/show_bug.cgi?id=42473
2016-10-31 16:55:45 -04:00
Rolf Bjarne Kvinge e8789f2af6 [mtouch] Copy frameworks referenced by watch extensions to the bundle. (#1070)
Watch extensions do not have access to the containing app bundle on the phone,
so instead copy frameworks to the extension itself.
2016-10-31 17:02:37 +01:00
Rolf Bjarne Kvinge 0b3ab9cc15 [mtouch] Copy third-party frameworks from extensions to the main app's Frameworks directory. Fixes #45800. (#1069)
The container app may not reference the same third-party frameworks as
extensions, which means that we must make sure the extension's frameworks are
also included in the app bundle.

So when building extensions save a list of all third-party frameworks, and
then read that list and include those frameworks when building the main app.

https://bugzilla.xamarin.com/show_bug.cgi?id=45800
2016-10-31 12:36:06 +01:00
Chris Hamons 612f52bd80 Fix binding project LinkWithAttributes generation to prevent unnecess… (#1029)
* Fix binding project LinkWithAttributes generation to prevent unnecessary rebuilds

- https://bugzilla.xamarin.com/show_bug.cgi?id=45762

* Remove duplicate ToString call
2016-10-31 10:37:10 +01:00
Rolf Bjarne Kvinge f1af70998f [tests] Fix test compilation. (#1065) 2016-10-31 10:09:57 +01:00
Rolf Bjarne Kvinge 0c43ddc615 Disable managed exception marshaling when the debugger is attached. Fixes #45116. (#1055)
Managed exception marshaling interferes with the debugger, because it adds
exception handlers to executing code, which makes the Mono runtime think an
exception is handled when logically it's not (although technically it is).

The consequence is that the IDEs will only be notified when we re-throw the
exception after catching it, making it impossible for the IDEs to stop when
the exception is thrown (they will instead stop when we re-throw the
exception).

So disable managed exception marshaling (unless the user changed the default
behavior) when a debugger is attached.

This is the same behavior as Xamarin.Android.

https://bugzilla.xamarin.com/show_bug.cgi?id=45116
2016-10-28 19:07:01 +02:00
Rolf Bjarne Kvinge 4371ea4540 [static registrar] Fix registration of generic types. Fixes #44926. (#1063)
https://bugzilla.xamarin.com/show_bug.cgi?id=44926
2016-10-28 18:42:45 +02:00
Rolf Bjarne Kvinge dde242c32a Allow using LinkWith attribute without a native library. (#997)
This makes it possible to set linker flags per assembly:

    [assembly: LinkWith (LinkerFlags = "-lsqlite3")]

Which is required when incremental builds is enabled and a particular assembly
needs special linker flags (because we don't propagate the global -gcc_flags
to each dylib we build when doing incremental builds).

Also add an option to set the dlsym mode for an assembly (using the LinkWith
attribute).
2016-10-28 10:50:42 -04:00
Rolf Bjarne Kvinge b6a0d06143 [tests] Remove dead code. (#1056) 2016-10-28 10:15:12 -04:00
Rolf Bjarne Kvinge bdbbea962a [tests] Unifiy namespaces in mtouch tests. (#1057) 2016-10-28 10:15:00 -04:00
Vincent Dondain 5d25bdc754 [mtouch/tests] BuildAndLaunchTime + RegistrarTime test (#1051)
- BuildAndLaunchTime is replacing AppLaunchTime as it calculates both
  build time and launch time for different linker modes.

* [mtouch/tests] Add RegistrarTime test

- Also fix MTouchTool --registrar:dynamic
2016-10-28 08:44:13 -04:00
Sebastien Pouliot 7177c8c811 [tests] Disable XM NSMetadataItem test as it randomly fails on bots (#1052) 2016-10-27 16:51:15 -04:00
Rolf Bjarne Kvinge 2fadd551de [tests] Fix xcode8.1 merge failure causing compilation error (duplicated method). (#1050) 2016-10-27 15:24:28 -04:00
Chris Hamons 82bfb2fe39 Fix XM dependency tracking of mmp bundle to prevent rebuilds (#1014)
- https://bugzilla.xamarin.com/show_bug.cgi?id=45764
- _CompileToNative's output in msbuild was incorrectly set to:
 $(_AppBundlePath)Contents\MacOS\$(TargetFileName) when the generated
 file lives at $(_AppBundlePath)Contents\MonoBundle\$(TargetFileName).
- This means we'd always try to rebuild, which can be rather time consuming.
- The XI target file is just different enough to require a seperate fix.
2016-10-27 20:15:28 +02:00
Vincent Dondain b252093691 [mtouch/tests] Add TimingTests (#1007)
* [mtouch/tests] Add TimingTests

- New MLaunchTool.
- AppLaunchTime (mlaunch): time to launch an application on the simulators.
  How it works: we first open the simulator by launching a dummy app. This allows us to detect if there are any launch watchdogs.
  Therefore, for consistency, all measurements are done with the simulator already open.
  In the case of the AppLaunchTime test, we build the app with the default config and launch it. It's automatically killed by the simulator
  because it does not have a valid entry point but this is fine because it also kills the process and lets us stop the stopwatch.
  We then simply log the time performance.
2016-10-27 14:05:44 +02:00
Sebastien Pouliot 8c93e7758d Merge branch 'xcode8.1' 2016-10-26 15:56:34 -04:00
Sebastien Pouliot ecf90178fa [tests] Update mlaunch executable to work with Xcode 8.1 GM 2016-10-24 18:28:18 -04:00
Rolf Bjarne Kvinge 1e4b395368 Revert "Fix binding project LinkWithAttributes generation to prevent rebuilds" (#1018) 2016-10-24 07:13:51 +02:00
Chris Hamons a8daab7cdd Fix binding project LinkWithAttributes generation to prevent unnecessary rebuilds (#1017)
- https://bugzilla.xamarin.com/show_bug.cgi?id=45762
2016-10-21 18:24:15 -04:00
Chris Hamons 3775d4c891 [XM] Add test for remote config fix in 3e1204278b (#1005) 2016-10-18 22:27:10 -04:00
Sebastien Pouliot ad3ec49f7c [test][mac-apitest] Fix NSMetadataItem on older bots (#1002)
* NSMetadataItem initWithURL: is 10.9+ so we can't run this test on
  earlier bots;

* NSRunningApplication.CurrentApplication.BundleUrl is 10.10 and it
  seems wrench bots don't like it;
2016-10-18 13:08:21 -04:00
Sebastien Pouliot 2b42122a5c [foundation] Add missing helper properties on NSMetadataItem. Fixes #34248 (#993)
* Added missing helper properties for iOS
* Made NSItemDownloadingStatus a "smart enum", i.e. field aware;
* Disable default .ctor for XAMCORE_4_0, such instances are unusable;
* Added `initWithURL:` for macOS [2] as it made it easier to test the
  changes since macOS it allows creating instances of `NSMetadataItem`
  from an URL.

references:
[1] https://bugzilla.xamarin.com/show_bug.cgi?id=34248
[2] osx.unclassified:!missing-selector! NSMetadataItem::initWithURL: not bound
2016-10-14 14:57:17 -04:00
Sebastien Pouliot 85e5c685e8 [tests] Subset of the classic removal fix to green'ify the branch (#999)
Subset of:

commit 0863e412b4
Author: Rolf Bjarne Kvinge <rolf@xamarin.com>
Date:   Fri Sep 30 21:02:17 2016 +0200

    Remove XI/Classic support (#926)

    * [tests] Remove Classic SDK tests.

    * Remove XI/Classic support.

    This also means we can remove support for the legacy registrars.

    * [monotouch-test] Remove legacy registrar tests.

    * [tests/mtouch] Remove Classic tests (and legacy registrar logic).

    * [tests/scripted] Fix tests to reference Xamarin.iOS.dll.
2016-10-14 13:09:30 -04:00
Rolf Bjarne Kvinge 39fd0efc66 [tests] Disable the docs tests until the documentation process is fixed. (#965) 2016-10-13 19:49:23 -04:00
Rolf Bjarne Kvinge 2a9f5a8238 Merge pull request #988 from rolfbjarne/bug44709d
Unify stret detection between the generator and platform assemblies, and fix stret detection on watchOS. Fixes #44709.
2016-10-13 19:44:02 +02:00
Chris Hamons 17bb354dca [XM] Fix 44707 by fixing launcher and mmp (#971)
- https://bugzilla.xamarin.com/show_bug.cgi?id=44707
- Sets MONO_CFG_DIR to work around embedding API bug: https://bugzilla.xamarin.com/show_bug.cgi?id=45279
- Added ability to run single XM test by setting XM_TEST_NAME to full test name.
2016-10-13 10:42:05 -05:00
Vincent Dondain e338dce193 [storekit] Update for iOS 10.1 beta 2 (#977) 2016-10-13 11:23:37 -04:00
Rolf Bjarne Kvinge d395e8df59 [tests] Generate some trampoline and registrar tests.
Generate trampoline and registrar tests that tests if a return type requires objc_msgSend or objc_msgSend_stret.

Now it's much easier to test new return types (a single line of code), which
avoids a _lot_ of copy-pasting, and makes sure all the different variations
are tested properly.

These new tests found several bugs, which are fixed in subsequent commits.
2016-10-13 15:10:43 +02:00
Rolf Bjarne Kvinge 70acf25bb4 [tests] Fix timeout in BuildTestProject. (#983)
In 9d4be4c we started building fat applications when building for device in
our test projects. That causes the BuildTestProject to take twice as long,
thus hitting a 5 min timeout value, causing the test to fail.

So change the test to the previous behavior: we were only building test
projects for ARM64 previously, so do that.
2016-10-13 10:40:39 +02:00
Rolf Bjarne Kvinge 7d3adbc193 [tests] Bump timeout for scripted tests to 10 minutes. (#960) 2016-10-12 09:25:01 -04:00
Rolf Bjarne Kvinge 6c6798e432 [tests] Move the 'build-dev-bots' tests to the mtouch tests and build/test Unified instead of Classic. (#818)
This way all the tests are run even if one of them fails.
2016-10-12 09:24:43 -04:00
Sebastien Pouliot 24b7b5be2e [passkit] API audit: remove default .ctor on PKLabeledValue, add tests for PKLabeledValue and add xtro comments (#979) 2016-10-12 11:30:11 +02:00
Rolf Bjarne Kvinge 516f764ec4 [tests] Add support for building device tests for 32-bit or 64-bit. 2016-10-11 19:52:36 +02:00
Rolf Bjarne Kvinge 1b84d7bbd9 [xharness] Add support for specifying 32-bit and 64-bit mode when running on device.
Also add support for running both 32-bit and 64-bit tests on device
with one target.
2016-10-11 19:52:35 +02:00
Rolf Bjarne Kvinge f7447a385c [tests] Default to fat apps for device configurations. 2016-10-11 19:52:35 +02:00
Rolf Bjarne Kvinge 5fd5b5ae8c [tests] Remove unused/deprecated variables from project files. 2016-10-11 19:52:35 +02:00
Rolf Bjarne Kvinge 432f7af3ed [tests] Set OutputPath according to Configuration instead of hardcoding it.
This makes c&p a little less error-prone.
2016-10-11 19:52:35 +02:00
Rolf Bjarne Kvinge 228f690469 [tests] Remove unused project configurations (AppStore, Ad-Hoc and DebugStaticRegistrar). (#974) 2016-10-11 19:51:58 +02:00
Rolf Bjarne Kvinge d940b592c8 [xharness] Fetch watch crash reports when running watch apps. (#973) 2016-10-11 19:30:11 +02:00
Chris Hamons b0606da28d [XM] Exclude NSPopover from apitest due to random crashes (#972) 2016-10-11 10:04:43 +02:00
Sebastien Pouliot 5504f45bb4 [coregraphics] Add managed validation to CGPath.FromRoundedRect to avoid native assertion/crash. Fixes #40230 (#966)
https://bugzilla.xamarin.com/show_bug.cgi?id=40230
2016-10-10 10:27:07 +02:00
Rolf Bjarne Kvinge 0a0503a6e9 [tests] Disable the docs tests until the documentation process is fixed. (#965) 2016-10-07 14:09:53 -04:00
Rolf Bjarne Kvinge bb6b8221b8 [monotouch-test] Fix CIImageColorSpaceTest on older devices. (#964) 2016-10-07 19:15:08 +02:00
Rolf Bjarne Kvinge 56bbf5e078 [tests] Remove duplicated (and unused) project. (#963) 2016-10-07 16:09:47 +02:00
Rolf Bjarne Kvinge 7caf33dd4e [tests] Bump timeout for scripted tests to 10 minutes. (#960) 2016-10-07 13:50:48 +02:00
Rolf Bjarne Kvinge 84c32b0a99 [tests] Run the mtouch tests in debug mode to get better stack traces. (#962) 2016-10-07 13:50:17 +02:00
Rolf Bjarne Kvinge 39ec76e28a [tests] Add workaround for file descriptor leak in System.Diagnostics.Process. (#961) 2016-10-07 13:50:08 +02:00
Sebastien Pouliot e5aa8f5bab Merge branch 'xcode8' into xcode8.1 2016-10-06 20:50:20 -04:00
Duncan Mak 043c11ac4f Merge branch 'cycle8-sr0-xi' into xcode8 2016-10-06 17:57:32 -04:00
Rolf Bjarne Kvinge a5fde9fbbe [monotouch-test] Remove duplicated entry in project file. (#958) 2016-10-06 19:37:27 +02:00
Rolf Bjarne Kvinge 2f60dd2220 [mtouch] Fix NullReferenceException in PInvoke wrapper generation. Fixes #44763. (#956)
Fix NullReferenceException in PInvoke wrapper generation when incremental
builds are enabled and the linker didn't run because cached results were
found.

https://bugzilla.xamarin.com/show_bug.cgi?id=44763
2016-10-06 16:13:01 +02:00
Rolf Bjarne Kvinge b2634bce56 [mtouch] Set install_name for libpinvokes.dylib. Fixes #44775. (#955)
https://bugzilla.xamarin.com/show_bug.cgi?id=44775
2016-10-06 15:17:40 +02:00
Rolf Bjarne Kvinge 7e1d9820b3 [mtouch] Bundle libpinvokes.dylib in the app. (#954)
Building a dylib is somewhat useless unless it ends up in the app bundle.
2016-10-06 14:16:55 +02:00
Sebastien Pouliot 0eff36c466 Bump Xcode 8.1 to beta 2 (#945)
* Bump Xcode 8.1 to beta 2
* Bump maccore to get simulator support fix
* [xharness] Get updated mlaunch binary. (#3)
2016-10-05 13:28:36 -04:00
Timothy Risi 065b189c26 [Mac] CoreBluetooth low hanging fruit bindings (#947) 2016-10-05 11:10:32 -05:00
Rolf Bjarne Kvinge d1361d963e Merge pull request #933 from rolfbjarne/watchos-network-api
Bump [watch-]mono to get more API removal for watchOS.
2016-10-04 19:47:10 +02:00
Vincent Dondain 92c1e9b798 [passkit] Update for iOS 10.1 beta 1 (#943) 2016-10-04 13:36:32 -04:00
Rolf Bjarne Kvinge 66915a01c0 [system-dependencies] Add logic to auto-provision cmake. (#940) 2016-10-04 10:28:41 +02:00
Alex Soto 462a3c79fa [CoreLocation] Review macOS CoreLocation low hanging fruits and xtro (#937) 2016-10-03 21:59:39 -04:00
Timothy Risi ecdd2fa43a [Mac] SceneKit and Metal low hanging fruit bindings from iOS (#931) 2016-10-03 16:02:32 -04:00
Rolf Bjarne Kvinge 7bcad32ddc [tests] Tweak link all/sdk tests after API change in watchOS. 2016-10-03 18:31:04 +02:00
Martin Baulig 032e2482e4 [AppleTls]: Make 'OldTlsProvider' derive from 'LegacyTlsProvider'.
Ideally, we should just simply use 'Mono.Net.Security.LegacyTlsProvider',
but that would require some tweaks to the linker code.
2016-10-03 18:31:04 +02:00
Rolf Bjarne Kvinge 0863e412b4 Remove XI/Classic support (#926)
* [tests] Remove Classic SDK tests.

* Remove XI/Classic support.

This also means we can remove support for the legacy registrars.

* [monotouch-test] Remove legacy registrar tests.

* [tests/mtouch] Remove Classic tests (and legacy registrar logic).

* [tests/scripted] Fix tests to reference Xamarin.iOS.dll.
2016-09-30 15:02:17 -04:00
Chris Hamons 97dfc6e972 [XM] Add missing NSNotification bits (#925)
- https://bugzilla.xamarin.com/show_bug.cgi?id=40494
2016-09-30 12:51:11 -04:00
Sebastien Pouliot d0773a9ffc [avfoundation] Add overloads to AVCaptureDevice that accept an enum. Fixes #32535 (#922)
The current API use `string`, not `NSString` is added as a step forward.
The `NSString` is more correct but it does not ease discoverability (e.g.
code completion) so an enum-based overload is added (as the preferred API).

https://bugzilla.xamarin.com/show_bug.cgi?id=32535
2016-09-30 12:49:45 -04:00
Alex Soto 1d828e9e5e [CoreFoundation] Fix bug 44399 - ArgumentNullException in AddObserver (#921)
https://bugzilla.xamarin.com/show_bug.cgi?id=44399

We did not fully support passing null to name and objectToObserve in
CFNotificationCenter::AddObserver an  ArgumentNullException was thrown

The use case of sending null to both name and objectToObserve is to
observe all notifications posted to the notification center, this
won't work using darwing notification center, it is restricted
by apple.
2016-09-29 13:35:29 -04:00
Rolf Bjarne Kvinge 876698ce25 [xharness] Define FEATURE_NO_BSD_SOCKETS for watchOS test projects. (#909) 2016-09-28 11:26:36 -04:00
Alex Soto b8bd71c7b5 [Security] Add convenience Certificate, Key and Identity ctors to SecRecord (#905) 2016-09-28 08:17:39 -04:00
Alex Soto 5c10b87637 [CoreImage] Add missing property ColorSpace to CIImage (#906)
https://bugzilla.xamarin.com/show_bug.cgi?id=44438

The ColorSpace property is decorated with the CF_RETURNS_NOT_RETAINED
macro, this means it returns an object that follows the CoreFoundation
[Ownership Policy](1) but it does not follow the naming convention
documented in the policy.

The [CF_RETURNS_NOT_RETAINED](2) indicates that the object reference
returned is not owned by the caller, so we should definitely call
CGColorSpaceRetain when obtaining a handle.

Since CGColorSpace is considered into the [MarshalType list](3) the
generated code ends up calling the IntPtr ctor which does the right
thing, [calling CGColorSpaceRetain](4) in the given ptr.

And last but not least, we already bind another property decorated
with [CF_RETURNS_NOT_RETAINED](2) in [CIColor::ColorSpace](5).

[1]: https://developer.apple.com/library/content/documentation/CoreFoundation/Conceptual/CFMemoryMgmt/Concepts/Ownership.html
[2]: http://clang-analyzer.llvm.org/annotations.html#attr_cf_returns_not_retained
[3]: 0bc23b379a/src/generator.cs (L2642)
[4]: https://github.com/xamarin/xamarin-macios/blob/xcode8/src/CoreGraphics/CGColorSpace.cs#L77-L80
[5]: https://github.com/xamarin/xamarin-macios/blob/xcode8/src/coreimage.cs#L112-L113
2016-09-28 12:33:51 +02:00
Sebastien Pouliot 0bc23b379a Bump mono for an (pre C9/master) alpha refresh (#902)
* mono revision at fc99fc4313e7afd75a4605a48b47e7d1273aefe4

* watch-mono revision is more recent to include the BCL adjustments
  for types not available on that platform

* Update two linksdk  test cases that won't work _normally_ for watchOS
2016-09-27 23:45:13 -04:00
Rolf Bjarne Kvinge c8993a3597 [tests/mscorlib] Fix template. (#897) 2016-09-27 11:20:32 +02:00
Alex Soto ff326bdfdb [generator] ForcedType is now only valid on parameters, properties and return value
https://bugzilla.xamarin.com/show_bug.cgi?id=37175
https://bugzilla.xamarin.com/show_bug.cgi?id=44322

* ForcedType is now only valid on parameters, properties and return value
* Added generator test
* Fixed bindings accordingly
* Fixed docs
2016-09-26 03:57:57 -05:00
Alex Soto 72f6d0a232 [Foundation] NSUrlSession's Create*Task methods may return a base class of the type the headers claim. Fixes #37175.
https://bugzilla.xamarin.com/show_bug.cgi?id=37175

NSUrlSession's Create*Task methods may return an object of the wrong
type (NSUrlSessionTask instead of NSUrl[Data|Download|Upload]SessionTask),
so we need to bypass our type check when creating the managed object,
otherwise we end up throwing InvalidCastExceptions randomly. We will
return the type that is declared on the headers so if the native side
returns a cat and headers says it barks we'll we make it bark :).
2016-09-23 21:37:33 -05:00
Alex Soto 7845caa577 [AVFoundaation] Fix bug 44322 - AVAssetDownloadUrlSession.CreateSession throws a System.InvalidCastException: Specified cast is not valid.
https://bugzilla.xamarin.com/show_bug.cgi?id=44322

AVAssetDownloadUrlSession.CreateSession according to headers it
should return an AVAssetDownloadUrlSession but it is returning
an apple internal type NSURLBackgroundSession so with our
current bindings it throws an InvalidCastException, adding
ForcedTypeAttribute will create the managed type wihout
the actual typecheck. Added test verifing that the API
no longer throws.
2016-09-23 19:17:57 -05:00
Sebastien Pouliot 51e2ae5e66 [tests][xtro] Add a few, late, xtro data and remove comments post audit (#828) 2016-09-23 13:04:18 -04:00
Rolf Bjarne Kvinge b69a6e1231 Update gitignore. (#819) 2016-09-23 13:03:35 -04:00
Rolf Bjarne Kvinge 63ccef9dc9 [tests] Update project file. (#820) 2016-09-23 13:03:23 -04:00
Sebastien Pouliot e4ce16e989 Update branch name (#882)
* Update branch name

* Update SDK version for iOS and watchOS (but not tvOS)

* [xharness] Add support for watchOS Series 2 simulators. (#812)

* [xharness] Add Jenkins support for watchOS Series 2 simulators. (#885)
2016-09-23 11:50:02 -04:00
Rolf Bjarne Kvinge e598db9621 [xharness] Add Jenkins support for watchOS Series 2 simulators. (#885) 2016-09-23 09:06:05 -04:00
Rolf Bjarne Kvinge d4edc453a6 Fix default http message handler for watchOS. (#873)
* Fix default http message handler for watchOS.

Fix default http message handler for watchOS to be NSUrlSessionHandler (the
previous attempt at eb7c2fd was quite incomplete), and make sure
HttpClientHandler is never used (show errors if someone tries).

* [tests] Remove explicit http client handler from project files.

Just use the default instead, since the set of valid http client handlers varies between platforms.
2016-09-22 14:29:18 +02:00
Rolf Bjarne Kvinge fc72efdea0 [tests/scripted] Convert to Unified. (#875) 2016-09-22 14:27:38 +02:00
Rolf Bjarne Kvinge 9000e48034 [tests] Remove Classic test projects, and make the Unified test projects the master projects. (#858) 2016-09-21 22:55:10 +02:00
Chris Hamons a2b5985f85 [XM] Add XM specific test for eb37363 (#849) 2016-09-21 08:36:40 -05:00
Rolf Bjarne Kvinge a4920078ff [registrar] Look up the right type when getting the constrained type for a generic type. Fixes #44309. (#848)
https://bugzilla.xamarin.com/show_bug.cgi?id=44309
2016-09-21 08:36:34 -05:00
Sebastien Pouliot 2aa3ce7273 [tests][intro] Add return type, arrays and generic in the model-vs-protocol check 2016-09-19 22:37:33 -04:00
Sebastien Pouliot 0a9a8d6569 [test][intro] Check for API parameters that are [Model] and not the [Protocol] interface
* incomplete and will report error (not to be merged yet)
2016-09-19 16:46:36 -04:00
Chris Hamons 1e53bed43b [XM] Add XM specific test for eb37363 (#849) 2016-09-19 15:28:37 -04:00
Rolf Bjarne Kvinge eb373635bd [registrar] Look up the right type when getting the constrained type for a generic type. Fixes #44309. (#848)
https://bugzilla.xamarin.com/show_bug.cgi?id=44309
2016-09-19 14:26:30 -04:00
Rolf Bjarne Kvinge de980207c8 [tests] Add scripts to install system dependencies to the XM tests package. (#847)
* [system-dependencies] Add arguments to disable certain checks.

* [tests] Add scripts to install system dependencies to the XM tests package.
2016-09-19 10:02:10 -04:00
Alex Soto e397849108 [generator] Fix bug 43579 - Generator emits invalid code when using the same method name (overload) in @delegates using events and C# delegates (#817)
* [generator] Fix bug 43579 - Generator emits invalid code when using the same method name (overload) in @delegates using events and C# delegates
https://bugzilla.xamarin.com/show_bug.cgi?id=43579

Bug Description:
Generator will emit invalid code when using the same name (overload)
in a method inside a @delegate (protocol) that is decorated
either with EventArgs or DelegateName

-----------------------------------------------------------------

This commit introduces a new attribute named DelegateApiNameAttribute
which mimics the EventNameAttribute but for delegate properties in
host classes

It is used to specify the delegate property name that will be created when
the generator creates the delegate property on the host
class that holds events and delegates.

This is really useful when you have two overload methods that makes
sense to keep them named as is but you want to expose them in the host class
with a better given name.

example:
 interface SomeDelegate {
     [Export ("foo"), DelegateApiName ("Confirmation"), DelegateName ("Func<bool>"), DefaultValue (false)]
     bool Confirm (Some source);
 }

 Generates propety in the host class:
	Func<bool> Confirmation { get; set; }

This also introduces two new BIXXXX errors:
- BI1043 Repeated overload {mi.Name} and no [DelegateApiNameAttribute]
provided to generate property name on host class.
- BI1044 Repeated name '{apiName.Name}' provided in [DelegateApiNameAttribute].

Which provides an error instead of generating invalid C# code.

Generator test included :D

* [docs] Added DelegateApiNameAttribute and IgnoredInDelegateAttribute docs

Also added Protocol where Model was used in our docs so we do not
misslead customers about it
2016-09-14 08:20:08 -04:00
Manuel de la Pena 85b519311a [CoreMedia] ClockOrTimebase should retain the pointer in the constructor that takes a handle. (#821)
This change fixes bug https://bugzilla.xamarin.com/show_bug.cgi?id=44154
2016-09-14 08:09:52 -04:00
Sebastien Pouliot eac032a0d6 [modelio] Add missing availability attributes on new API. Fixes #44192 (#831)
and ignore them when running tests on older devices, e.g. iOS 9.3.x

reference:
https://bugzilla.xamarin.com/show_bug.cgi?id=44192
2016-09-13 20:32:27 -04:00
Sebastien Pouliot 675ecae885 [tests][xtro] Add a few, late, xtro data and remove comments post audit (#828) 2016-09-13 14:55:01 -04:00
Rolf Bjarne Kvinge 5408c056d0 [xharness] Remove Classic logic from makefile generation. (#823) 2016-09-13 10:04:24 -04:00
Rolf Bjarne Kvinge 70b462439d [tests] Move the 'build-dev-bots' tests to the mtouch tests and build/test Unified instead of Classic. (#818)
This way all the tests are run even if one of them fails.
2016-09-13 12:23:35 +02:00
Rolf Bjarne Kvinge c26434d71a Update gitignore. (#819) 2016-09-13 12:23:17 +02:00
Rolf Bjarne Kvinge bbd6c2c3cf [tests] Update project file. (#820) 2016-09-13 12:23:12 +02:00
Rolf Bjarne Kvinge 16e36ce163 [xharness] Add support for watchOS Series 2 simulators. (#812) 2016-09-12 10:14:55 -04:00
Sebastien Pouliot 38148c718a Merge branch 'xcode8' 2016-09-09 15:29:37 -04:00
Rolf Bjarne Kvinge a1306ff23c [introspection] Show what fails in error messages. (#792)
So that we're not clueless when Console.WriteLines go looking for dragons
instead of showing up somewhere we can read.
2016-09-08 13:44:43 +02:00
Rolf Bjarne Kvinge 3d086ca280 [introspection] Fix ApiPInvokeTest.Signatures to not fail when previous tests failed. (#793) 2016-09-08 13:43:26 +02:00
Vincent Dondain 9a7f86d81a [healthkit] Update for iOS 10 GM (#800) 2016-09-07 18:19:19 -04:00
Sebastien Pouliot 4b90fce057 [tvos] Add missing attributes to get introspection to works on tvOS 9.0, 9.1, 9.2 and 10.0 (#798) 2016-09-07 15:18:20 -04:00
Rolf Bjarne Kvinge d8f1449ac7 [introspection] Fix API for introspection test for older watchOS versions. (#794)
* [introspection] Implement system version check for watchOS.

Fixes a P/Invoke test that should be skipped when running on
older OS versions.

* [tests] Add availability attributes to fix running introspection tests on older watchOS devices.
2016-09-07 13:45:36 -04:00
Alex Soto 424fe9ae1e [UIKit] Remove 3 protocol members until bug 43579 is fixed (#783)
https://bugzilla.xamarin.com/show_bug.cgi?id=43579

We are removing the following 3 protocol members
- UITextFieldDelegate.EditingEnded2 (UITextField textField, UITextFieldDidEndEditingReason reason)
- UITextViewDelegate.ShouldInteractWithUrl2 (UITextView textView, NSUrl url, NSRange characterRange, UITextItemInteraction interaction)
- UITextViewDelegate.ShouldInteractWithTextAttachment2 (UITextView textView, NSTextAttachment textAttachment, NSRange characterRange, UITextItemInteraction interaction)

Reasons:
- We need to fix bug https://bugzilla.xamarin.com/show_bug.cgi?id=43579
- Bad naming, we do not want 2 suffix

Hopefully we can have this ready for C8SR0 or C8SR1
2016-09-07 10:08:43 -04:00
Sebastien Pouliot 5db30f619e [metal] Fix MTLHeapDescriptor and test it only on devices (#782)
It turns out `MTLHeapDescriptor` does not exists on the simulator.

```Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_MTLHeapDescriptor", referenced from:
      objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture x86_64```

A `[DisableDefaultCtor]` was used (by mistake / lack of documentation)
and this was hiding the issue (on our bots).

However on device introspection was not happy:

iOSApiSelectorTest
[FAIL] Selector not found for Metal.MTLHeapDescriptor : cpuCacheMode
[FAIL] Selector not found for Metal.MTLHeapDescriptor : setCpuCacheMode:
[FAIL] Selector not found for Metal.MTLHeapDescriptor : size
[FAIL] Selector not found for Metal.MTLHeapDescriptor : setSize:
[FAIL] Selector not found for Metal.MTLHeapDescriptor : storageMode
[FAIL] Selector not found for Metal.MTLHeapDescriptor : setStorageMode:
    [FAIL] iOSApiSelectorTest.ApiSelectorTest.InstanceMethods :   6 errors found in 18339 instance selector validated

Note that these are the properties, not the `init` that's mentioned here.

So first `init` is possible, on devices, from Xcode:

	MTLHeapDescriptor *hd = [[MTLHeapDescriptor alloc] init];
	NSLog (@"%@", [hd description]);

gives

	<MTLHeapDescriptorInternal: 0x17401da50>
	{
		cpuCacheMode = MTLCPUCacheModeDefaultCache;
		size = 0;
		storageMode = MTLStorageModePrivate;
		}

so we need to remove our `[DisableDefaultCtor]`.

That does not fix the selectors above... but note the *Internal type
returned, they are forwarded and that's generally something that
respondToSelector (that introspection uses) does not cover.

But, to be sure, we add unit tests showing all the properties are
working like expected :-)
2016-09-07 08:03:14 -04:00
Sebastien Pouliot 596dd0a3f3 [macos] Fix introspection tests (typo + NSUrlSession* test sharing) 2016-09-06 13:32:51 -04:00
Sebastien Pouliot 3054daf39b [photos] Update TODOs wrt lack of PHLivePhotoShouldRenderAtPlaybackTime in the SDK 2016-09-06 09:58:36 -04:00
Sebastien Pouliot f5052c105c [healthkit] Change binding for HKDetailedCdaErrors (#757)
* [healthkit] Change binding for HKDetailedCdaErrors

* Hide [Fields]
* Easier access to the information from NSError
* Unit test (mostly to make sure of the returned type)

* [healthkit] Remove HKDetailedCDAValidationErrorKey from watchOS profile

It's used from an NSError returned from an API that is not available in
watchOS.
2016-09-03 11:36:05 -04:00
Sebastien Pouliot 838ccc4cf4 [tests][xtro] Update data files 2016-09-02 20:37:08 -04:00
Sebastien Pouliot 4c09e91f91 [watchos] Remove several [Obsolete] API when alternatives exists (#742) 2016-09-02 10:02:29 -04:00
Sebastien Pouliot 4220714485 Merge branch 'cycle8' into xcode8 2016-09-01 14:38:23 -04:00
Rolf Bjarne Kvinge 2a4fc5d23b [introspection] Fix build with mono 4.6 by referencing System.Core explicitly. (#735) 2016-09-01 14:29:57 -04:00
Sebastien Pouliot 3428fdc400 [tests] Update monotouch-test to add version checks when executing on older iOS versions. Fixes #43920 (#729)
Tested with iOS 9.3, 8.4 and 6.1.

https://bugzilla.xamarin.com/show_bug.cgi?id=43920
2016-08-31 23:08:54 -04:00
Sebastien Pouliot d9c309b85d [modelio] Fix several incorrect (headers) availability on new API (only in iOS10, not 9) (#726) 2016-08-31 17:59:53 -04:00
Alex Soto b8a2ced04b [Midi] Fix bug 43582 - MidiEndpoint throws, bad dispose of GCHandle
https://bugzilla.xamarin.com/show_bug.cgi?id=43582

- Thanks to @olegoid for the actual investigation and fix
- Added test that verifies the fix
2016-08-31 08:48:11 -04:00
Rolf Bjarne Kvinge 7de44f3253 [tests] Fix a couple of registrar tests to work on device. (#719)
Fixes the following test failures:

    [FAIL] BlockSignatureTest.WithoutUserDelegateTypeAttribute : System.ExecutionEngineException : Attempting to JIT compile method '(wrapper native-to-managed) MonoTouchFixtures.ObjCRuntime.BlockSignatureTest:<WithoutUserDelegateTypeAttribute>m__0 (intptr,intptr)' while running with --aot-only. See http://docs.xamarin.com/ios/about/limitations for more information.
    	  at (wrapper managed-to-native) System.Runtime.InteropServices.Marshal:GetFunctionPointerForDelegateInternal (System.Delegate)
    	  at System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate (System.Delegate d) [0x00011] in /work/maccore/xcode8/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs:1714
    	  at ObjCRuntime.BlockLiteral.SetupBlock (System.Delegate trampoline, System.Delegate userDelegate) [0x0000b] in /work/maccore/xcode8/xamarin-macios/src/ObjCRuntime/Blocks.cs:92
    	  at MonoTouchFixtures.ObjCRuntime.BlockSignatureTest.WithoutUserDelegateTypeAttribute () [0x00049] in /work/maccore/xcode8/xamarin-macios/tests/monotouch-test/ObjCRuntime/RegistrarTest.cs:2585
    	  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
    	  at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00038] in /work/maccore/xcode8/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:309

    [FAIL] BlockSignatureTest.WithUserDelegateTypeAttribute : System.ExecutionEngineException : Attempting to JIT compile method '(wrapper native-to-managed) MonoTouchFixtures.ObjCRuntime.BlockSignatureTest:<WithUserDelegateTypeAttribute>m__2 (intptr,intptr)' while running with --aot-only. See http://docs.xamarin.com/ios/about/limitations for more information.
    	  at (wrapper managed-to-native) System.Runtime.InteropServices.Marshal:GetFunctionPointerForDelegateInternal (System.Delegate)
    	  at System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate (System.Delegate d) [0x00011] in /work/maccore/xcode8/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs:1714
    	  at ObjCRuntime.BlockLiteral.SetupBlock (System.Delegate trampoline, System.Delegate userDelegate) [0x0000b] in /work/maccore/xcode8/xamarin-macios/src/ObjCRuntime/Blocks.cs:92
    	  at MonoTouchFixtures.ObjCRuntime.BlockSignatureTest.WithUserDelegateTypeAttribute () [0x00049] in /work/maccore/xcode8/xamarin-macios/tests/monotouch-test/ObjCRuntime/RegistrarTest.cs:2596
    	  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
    	  at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00038] in /work/maccore/xcode8/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:309
2016-08-31 13:54:47 +02:00
Alex Soto 83cfa197a9 [Midi] Fix bug 43582 - MidiEndpoint throws, bad dispose of GCHandle
https://bugzilla.xamarin.com/show_bug.cgi?id=43582

- Thanks to @olegoid for the actual investigation and fix
- Added test that verifies the fix
2016-08-31 01:48:28 -05:00
Sebastien Pouliot a2899b842c [cloudkit] Fix some missing .ctor (breaking changes) (#711)
Enabling CloudKit on watchOS required to remove some default .ctor that
watchOS does not _support_.

This commit fix this by either

* replacing the default .ctor with something that works across all
  platforms (best); or

* removing the default .ctor only on watchOS;

The commit also mark as abstract three existing types for watchOS (and
for XAMCORE_4_0) that were found reviewing the bindings.
2016-08-30 19:14:48 -04:00
Sebastien Pouliot 974ea0b792 Merge branch 'cycle8' into xcode8 2016-08-30 15:40:58 -04:00
Alex Soto 209f4f3709 [GameplayKit] Update from Xcode8 Beta 1 to Beta 6 (#689)
Runtime
- Added support for Vector2d, Vector3d and Vector4d SIMD types
- Added support for GKBox, GKQuad and GKTriangle SIMD types

GameplayKit
- Apple introduced GKQuadTreeNode and GKQuadTree in Xcode 7.1 and
  removed those types in a later Xcode (7.2?) but we kept them around.
  Now apple introduced again both types but renamed them to GKQuadtreeNode
  and GKQuadtree (lowercase t), this is a breaking change and since we do
  care about binary compat we are just changing the registration name and
  keeping the same managed name deprecating old methods and introducing
  the new ones.
- Added tests for new SIMD types
2016-08-30 15:32:46 -04:00
Sebastien Pouliot f74a7a7911 [messageui] Review (and add test) the enum breaking change from Apple. Fixes #42682 (#710)
Xcode8 SDK changed untyped enums (always 32 bits) into NSInteger. In this
case we can continue with the existing API (and ignore them in xtro)

reference:
https://bugzilla.xamarin.com/show_bug.cgi?id=42682
2016-08-30 14:26:49 -04:00
Rolf Bjarne Kvinge cbfd83be92 [xharness] Make sure a project reference's Name matches the file name of the reference. Fixes #43181. (#709)
Apparently XS can't find referenced project (to build them) otherwise.

It works fine when building using xbuild though.

https://bugzilla.xamarin.com/show_bug.cgi?id=43181
2016-08-30 13:32:32 -04:00
Rolf Bjarne Kvinge d9f8461cc2 [xharness] Make sure a project reference's Name matches the file name of the reference. Fixes #43181. (#709)
Apparently XS can't find referenced project (to build them) otherwise.

It works fine when building using xbuild though.

https://bugzilla.xamarin.com/show_bug.cgi?id=43181
2016-08-30 13:31:40 -04:00
Chris Hamons a43115a85e [XM] Fix native dependency processing by mmp when linker is disabled (#613)
* [XM] Fix native dependency processing by mmp when linker is disabled

- https://bugzilla.xamarin.com/show_bug.cgi?id=43364
- Fixed via a hack for now. Fixed https://bugzilla.xamarin.com/show_bug.cgi?id=43419 to clean up later
- Added null check in ProcessDLLImports due to facades
2016-08-30 08:45:03 -04:00
Sebastien Pouliot 3c28e427ce [tests][xtro] Update data files (#705) 2016-08-29 22:06:14 -04:00
Sebastien Pouliot 85f884c94d [corebluetooth] Update availability attributes for some obsolete (removed) API (#702)
references:
!extra-protocol-member! unexpected selector CBCentralManagerDelegate::centralManager:didRetrieveConnectedPeripherals: found
!extra-protocol-member! unexpected selector CBCentralManagerDelegate::centralManager:didRetrievePeripherals: found
!extra-protocol-member! unexpected selector CBPeripheralDelegate::peripheralDidInvalidateServices: found
2016-08-29 16:48:03 -04:00
Manuel de la Pena d5bb9326ec [Metal] Update bindings for Xcode 8. (#663) 2016-08-29 08:21:06 -04:00
Sebastien Pouliot b5638fce4d [tests][xtro] Update data files 2016-08-28 12:18:18 -04:00
Sebastien Pouliot d85caeffde [tvos][avfoundation] Adjust API for tvOS (#687)
Some types were removed in tvOS 10, including:

!unknown-protocol! AVAssetDownloadDelegate bound
!unknown-type! AVAssetDownloadTask bound
!unknown-type! AVAssetDownloadURLSession bound
!unknown-type! AVAudioInputNode bound

and we're replacing them with stubs so our binaries won't contain any of
the selectors that could be rejected by Apple on the app store

Some (new) fields are also not part of tvOS (and were not in iOS either)

!unknown-field! AVVideoCodecAppleProRes422 bound
!unknown-field! AVVideoCodecAppleProRes4444 bound
!unknown-field! AVVideoColorPrimaries_EBU_3213 bound
!unknown-field! AVVideoTransferFunction_SMPTE_240M_1995 bound
!unknown-field! AVVideoYCbCrMatrix_SMPTE_240M_1995 bound

* [tests][xtro] Many categories are not marked as not available on tvOS, even if the type being extended is not available. This adds entries for them so only missing AV* API remains in tvos.unclassified
2016-08-26 20:40:01 -04:00
Chris Hamons 9fdd40d114 [XM] Missing NSUserNotification bindings (#686)
- https://bugzilla.xamarin.com/show_bug.cgi?id=38118
2016-08-26 15:38:22 -05:00
Chris Hamons 3bdb0e37a6 [XM] More xtro-sharpie fixes (#682) 2016-08-26 12:32:45 -05:00
Chris Hamons bc9c25de72 [XM] Add missing SafariServices binding (#681) 2016-08-26 10:30:45 -05:00
Rolf Bjarne Kvinge a617bee08f [xharness] Crashing is not OK. (#680) 2016-08-26 09:12:44 -04:00
Sebastien Pouliot 6d5beb61cb Merge branch 'cycle8' into xcode8 2016-08-26 08:19:33 -04:00
Sebastien Pouliot 2bcd40054f [linker] Ensure we do not devirtualize methods that needs to be called from a base class to satisfy an interface. Fixes #34308 (#675)
Update unit tests to catch this case and be more precise in others.

reference:
https://bugzilla.xamarin.com/show_bug.cgi?id=43408
2016-08-26 08:17:01 -04:00
Sebastien Pouliot 0bea77b781 [linker] Ensure we do not devirtualize methods that needs to be called from a base class to satisfy an interface. Fixes #34308 (#675)
Update unit tests to catch this case and be more precise in others.

reference:
https://bugzilla.xamarin.com/show_bug.cgi?id=43408
2016-08-26 09:24:51 +02:00
Sebastien Pouliot 144d96999b Merge branch 'cycle8' into xcode8 2016-08-25 14:08:23 -04:00
Chris Hamons 3ad2491006 Fixup C8 static registrar to work w\ Xcode 8 (#647)
* Fix static registrar on 10.12 by teaching it that QTKit is dead (#472)
* Rip out all 64-bit registration in 32-bit XM.
2016-08-25 14:03:43 -04:00
Sebastien Pouliot afd50b2bef [watchos][avfoundation] Enable AVFoundation in watchOS (#659) 2016-08-25 11:39:48 -04:00
Rolf Bjarne Kvinge 1d4019e966 [xharness] Don't run into an infinite loop if failing to run sqlite3. (#666) 2016-08-25 11:08:40 -04:00
Rolf Bjarne Kvinge d99d8c8cbe Fix ObjC encoding of block signatures. Fixes #43592. (#662)
The P/Invoke callback method that's called by native code
has a simpler function signature than what the user delegate
has.

Example P/Invoke callback signature:

    static unsafe void Invoke (IntPtr block, IntPtr obj)

which ends up calling this delegate:

    System.Action<NSDictionary>

The NSDictionary parameter has been simplifed to just IntPtr.

The problem is that we need to encode the block signature according
to the signature of the user delegate (Apple uses the signature
in some cases, and fails/aborts if the signature doesn't match
what the code expects).

So add more metadata to make it possible to find the signature
of the user delegate at runtime.

The generator generates code like this:

    block_scheduledCompletion.SetupBlock (Trampolines.SDActionArity1V2.Handler, scheduledCompletion);

where SDActionArity1V2.Handler is defined as this:

    static internal readonly DActionArity1V2 Handler = Invoke;

this means we can get the type of `Trampolines.SDActionArity1V2.Handler` at runtime
(which would be `DActionArity1V2` in this case), so put a new attribute (`UserDelegateTypeAttribute`)
at that type:

    [UnmanagedFunctionPointerAttribute (CallingConvention.Cdecl)]
    [UserDelegateType (typeof (global::System.Action<NSDictionary>))]
    internal delegate void DActionArity1V2 (IntPtr block, IntPtr obj);

Then at runtime we check if the target delegate's type has this attribute,
and then we use the type specified by this new attribute instead when
computing the ObjC signature of the block.

https://bugzilla.xamarin.com/show_bug.cgi?id=43592
2016-08-25 11:08:22 -04:00
Rolf Bjarne Kvinge 451781a98f [xharness] Don't run classic tests on wrench. (#661) 2016-08-25 13:11:51 +02:00
Alex Soto 9354e2044e [Intents] Fixes bug 43205 - SiriKit API Inconsistencies
https://bugzilla.xamarin.com/show_bug.cgi?id=43205

Per documentation[1] INIntentResolutionResult is an abstract class
and now we honor that, also we now provide the right return type
on each of the properties (NeedsValue, NotRequired and Unsupported)
in all subclasses of INIntentResolutionResult.

Unit tests added for all INIntentResolutionResult subclasses.

[1]: https://developer.apple.com/reference/intents/inintentresolutionresult?language=objc
2016-08-24 10:14:27 -05:00
Alex Soto d0647bc0da [AudioUnit/AudioToolbox] Updated to Xcode8b1 to Xcode8b6 (#651) 2016-08-23 20:29:43 -04:00
Sebastien Pouliot eb8d0be0a4 [security] Add new API (up to beta 6) and unit tests (#646)
A problem, that exists with the current API, is that several constants
are hidden but many are needed in some dictionaries - and not all of
them can be turned into _classic_ StrongDictionary.

This initial PR does not solve all the (old) problems, but it does offer
some useful overloads that makes the API usable for basic usages and
expose the NSDictionary-based API.
2016-08-23 11:36:39 -04:00
Sebastien Pouliot f63ecd7a21 [uikit] Re-expose 'defaultFormat' in UIGraphicsRendererFormat subclasses since it returns a 'instancetype'. Fixes #43640 (#643)
https://bugzilla.xamarin.com/show_bug.cgi?id=43640
2016-08-23 10:53:57 -04:00
Manuel de la Pena ba37aa4419 [AVFoundation] Add bindings for Xcode 8. (#635) 2016-08-23 08:19:54 -04:00
Sebastien Pouliot 4f53b7e51f [tests] Fix NetworkReachabilityTest/Loopback difference on iOS/tvOS 10+. Fixes 42542 (#638)
https://bugzilla.xamarin.com/show_bug.cgi?id=42542
2016-08-22 11:03:26 -04:00
Alex Soto 16d5d68503 [UIKit] Updated UIKit to xcode8-beta6 (#636)
Expected extrospection test failures:

- ios.unclassified:!missing-field! UIApplicationInvalidInterfaceOrientationException not bound

Generator bugs:

- HACK: We have a generator bug(?) that won't allow overloads (AmbiguousMatchException) in protocols

tvOS/iOS 9 Introspection Expected failures (UIKit Only):

- [FAIL] UIKit.UIContentSizeCategoryExtensions.UIContentSizeCategoryUnspecified
Generated enum extensions do not honor availability on NSString properties

API Diff, expected changes (verified and correct):

Type Changed: UIKit.UIContentSizeCategory

Modified fields:

	ExtraExtraExtraLarge = 6 7
	ExtraExtraLarge = 5 6
	ExtraLarge = 4 5
	ExtraSmall = 0 1
	Large = 3 4
	Medium = 2 3
	Small = 1 2

Added values:

	AccessibilityExtraExtraExtraLarge = 12,
	AccessibilityExtraExtraLarge = 11,
	AccessibilityExtraLarge = 10,
	AccessibilityLarge = 9,
	AccessibilityMedium = 8,
	Unspecified = 0,
2016-08-22 08:44:43 -04:00
Vincent Dondain 5999d9cc4e [modelio] Update for iOS 10 beta 1 (#606) 2016-08-19 13:55:59 -04:00
Sebastien Pouliot b611414ef0 [tests] Add NSCameraUsageDescription to monotouch-test to avoid crash in AVFoundation. Fixes bug #43517 (#634) 2016-08-19 11:18:58 -04:00
Sebastien Pouliot c7abd28f2c [foundation] Fix NSDimension.BaseUnit on subclasses. Fixes #43444 (#623)
This is a static selector that needs to be overridden, which is not the
usual pattern in C#. We re-define it using [New] on subclasses.

Unit tests added for all NSDimension subclasses.

reference:
https://bugzilla.xamarin.com/show_bug.cgi?id=43444
2016-08-19 08:27:23 -05:00
Sebastien Pouliot c0d1ec3b7b [tests] Fix intro failures reported from iOS 6.1 and 7.1 devices (#629)
Also fix warnings printed while executing:

> CoreText performance note: Client called CTFontCreateWithName() using name "Arial" and got font with PostScript name "ArialMT". For best performance, only use PostScript names when calling this API.
> CoreText performance note: Set a breakpoint on CTFontLogSuboptimalRequest to debug.
2016-08-18 23:02:42 -04:00
Sebastien Pouliot a0fd00c083 [tests] Fix monotouch-test failures when executed on iOS 9.x. Fixes bug #43520 (#632) 2016-08-18 22:59:26 -04:00
Sebastien Pouliot df7f604aad [tests] Update xtro data files to get more accurate results (#630) 2016-08-18 22:02:42 -04:00
Manuel de la Pena a5f6564aaa [AVFoundation] Update bindings for Xcode 8. (#598)
[AVFoundation] Update bindings for Xcode 8.
2016-08-18 13:17:17 +02:00
Chris Hamons b54bcd6ae0 [XM] Fix xtro-sharpie issues (#620) 2016-08-17 20:11:05 -04:00
Sebastien Pouliot 1c7cd140c0 [tests] Fix introspection failures when running on iOS 9.3 (#615)
* ApiCMAttachmentTest
 	[FAIL] ApiCMAttachmentTest.CheckFailAttachments :   CGColorConverter.Handle

* SKNode added conformance to new (in iOS10) UIFocus protocol.
	[FAIL] Selector not found for SpriteKit.SKNode : didUpdateFocusInContext:withAnimationCoordinator:
	[FAIL] Selector not found for SpriteKit.SKNode : setNeedsFocusUpdate
	[FAIL] Selector not found for SpriteKit.SKNode : shouldUpdateFocusInContext:
	[FAIL] Selector not found for SpriteKit.SKNode : updateFocusIfNeeded
	[FAIL] Selector not found for SpriteKit.SKNode : preferredFocusedView

* HKWorkoutEvent conformance to NSCopying is new in iOS10
	[FAIL] Selector not found for HealthKit.HKWorkoutEvent : copyWithZone:

* HKDocumentType was added in iOS 10 (not iOS 8) and not watchOS 2 or 3

	ref: +HK_CLASS_AVAILABLE_IOS_ONLY(10_0)

	[FAIL] iOSApiProtocolTest.ApiProtocolTest.Coding : ObjCRuntime.RuntimeException : Wrapper type 'HealthKit.HKDocumentType' is missing its native ObjectiveC class 'HKDocumentType'.
2016-08-16 19:07:01 -04:00
Sebastien Pouliot 285756a083 [coretelephony] Re-enable CTCallCenter default ctor. Fixes #43329 (#617)
reference:
https://bugzilla.xamarin.com/show_bug.cgi?id=43329

It was disable as it crashed our test suite and the crash report from
the simulators were not very helpful. The issue becomes clear from
device builds...

Application Specific Information:
BUG IN CLIENT OF LIBDISPATCH: dispatch_barrier_sync called on queue already owned by current thread
Abort Cause 6244246656

Filtered syslog:
None found

Thread 0 name:  tid_a07  Dispatch queue: CTCallCenter
Thread 0 Crashed:
0   libdispatch.dylib             	0x00000001839fdf60 _dispatch_barrier_sync_f_slow + 596
1   CoreTelephony                 	0x000000018756e7ec -[CTCallCenter callEventHandler] + 128
2   CoreTelephony                 	0x000000018756e7ec -[CTCallCenter callEventHandler] + 128
3   CoreTelephony                 	0x000000018756f51c __27-[CTCallCenter description]_block_invoke + 60
4   CoreTelephony                 	0x000000018756f79c ___ZN8dispatch9sync_implIU13block_pointerFP8NSStringvEEENSt3__15decayIDTclfp0_EEE4typeEP16dispatch_queue_sOT_NS5_17integral_constantIbLb0EEE_block_invoke + 32
5   libdispatch.dylib             	0x00000001839ed1c0 _dispatch_client_callout + 16
6   libdispatch.dylib             	0x00000001839fa860 _dispatch_barrier_sync_f_invoke + 84
7   libdispatch.dylib             	0x00000001839fde9c _dispatch_barrier_sync_f_slow + 400
8   CoreTelephony                 	0x000000018756f4d0 -[CTCallCenter description] + 128
9   introspection                 	0x000000010192b7b8 wrapper_managed_to_native_ObjCRuntime_Messaging_IntPtr_objc_msgSend_intptr_intptr (/<unknown>:1)
10  introspection                 	0x00000001012dbff8 Foundation_NSObject_get_Description (NSObject.g.cs:717)
11  introspection                 	0x00000001012d8e34 Foundation_NSObject_ToString (NSObject2.cs:703)

so calling `description` is broken and we need to exclude this from our
introspection tests for the type.
2016-08-16 17:26:06 -04:00
Chris Hamons 1d09e9040b [XM] Fix native dependency processing by mmp when linker is disabled (#613)
* [XM] Fix native dependency processing by mmp when linker is disabled

- https://bugzilla.xamarin.com/show_bug.cgi?id=43364
- Fixed via a hack for now. Fixed https://bugzilla.xamarin.com/show_bug.cgi?id=43419 to clean up later
- Added null check in ProcessDLLImports due to facades
2016-08-16 15:24:01 -05:00
Sebastien Pouliot 77d246790c [metalperformanceshaders] Update up to beta 5 (#605) 2016-08-16 12:00:49 -04:00
Sebastien Pouliot 9fe13aaa58 Bump for Xcode8 beta 6 (#610)
* Bump for Xcode8 beta 6

* Bump maccore (to bump maciostools) and update mlaunch download location to run tests on the simulator
2016-08-15 20:19:51 -04:00
Sebastien Pouliot c7fb13d67c [tests] Wrench has mono 4.6 and it requires an explict reference to System.Core to compile introspection tests (#608) 2016-08-15 15:48:52 -04:00
Chris Hamons 9f27f8b6bc [XM] Disable QLPreviewPanel in introspection ctor tests due to random failure (#611) 2016-08-15 14:44:30 -05:00
Sebastien Pouliot f802a51b82 [foundation] Update up to beta 5 (#603) 2016-08-15 15:36:45 -04:00
Sebastien Pouliot f2f4bc8ccf [tests] Add NSMicrophoneUsageDescription to monotouch-test. Fixes #42544 (#604)
New requirement for iOS10 on devices

https://bugzilla.xamarin.com/show_bug.cgi?id=42544
2016-08-13 13:04:08 -04:00
Sebastien Pouliot c9633e3515 [coregraphics] Update up to beta 5 (#599)
Apple removed CGColorConverter even if it was publicly exposed in iOS 9.3,
not that I recall any API that consumed it...

It was replaced by a new, very close, type named CGColorConversionInfo and
the existing code and tests were updated to the new API.

So for `CGColorConverter` we're

* iOS: Obsoleted + code removal
* tvOS: Obsoleted + code removal
* watchOS: the API can be removed as it was not exposed in a stable release
* macOS: it was not enabled (did not work)

* [tests] Adjust ApiCMAttachmentTest so it knows how to create the new CGColorConversionInfo type
2016-08-12 13:45:09 +02:00
Manuel de la Pena 65ffc88aa5 [AVFoundation] Update bindings for XCode8. Focus on enums and structs. (#591) 2016-08-11 08:22:59 -04:00
Sebastien Pouliot 9fb98d9297 [watchos][gamekit] Add missing API and adjust xtro data files for deprecations (#595)
reference (missing)
!missing-selector! +GKAchievement::reportAchievements:withCompletionHandler: not bound
2016-08-10 13:16:10 -04:00
Sebastien Pouliot b184973b96 [watchos][cloudkit] Complete support of CloudKit on watchOS (#578)
Also apply fixes based on xtro results. Most of them are likely because the iOS frameworks contains out-dated headers wrt watchOS.

references:

* Missing fields /API
!missing-field! CKShareThumbnailImageDataKey not bound
!missing-field! CKShareTitleKey not bound
!missing-field! CKShareTypeKey not bound
!missing-selector! CKContainer::acceptShareMetadata:completionHandler: not bound
!missing-selector! CKContainer::fetchShareMetadataWithURL:completionHandler: not bound

* tvOS: enabled
!missing-selector! CKNotificationInfo::setShouldSendContentAvailable: not bound
!missing-selector! CKNotificationInfo::shouldSendContentAvailable not bound

* watchOS: xtro fixes for additions/removal in the same release
!missing-type! CKFetchRecordChangesOperation not bound
!missing-type! CKDiscoverAllContactsOperation not bound
!missing-type! CKDiscoverUserInfosOperation not bound
!missing-type! CKDiscoveredUserInfo not bound
!missing-selector! CKContainer::discoverAllContactUserInfosWithCompletionHandler: not bound
!missing-selector! CKContainer::discoverUserInfoWithEmailAddress:completionHandler: not bound
!missing-selector! CKContainer::discoverUserInfoWithUserRecordID:completionHandler: not bound

* watchOS: missing [NoWatch] on some types
!unknown-native-enum! CKQuerySubscriptionOptions bound
!unknown-native-enum! CKSubscriptionOptions bound
!unknown-native-enum! CKSubscriptionType bound
!unknown-type! CKDatabaseSubscription bound
!unknown-type! CKNotificationInfo bound
!unknown-type! CKQuerySubscription bound
!unknown-type! CKRecordZoneSubscription bound
!unknown-type! CKSubscription bound
2016-08-10 08:57:28 -04:00
Chris Hamons 31f056244c Revert "Enable logging during mac introspection tests (#510)" (#586)
- This reverts commit 9e731e842c.
- We've hopefully nailed down the test failure.
2016-08-09 20:27:50 -04:00
Sebastien Pouliot 69c1bddf23 [watchos][healthkit] Add entries to xtro to cover the two remaining special cases (#580) 2016-08-09 15:39:36 -04:00
Vincent Dondain c932422e9e [healthkit] Update for iOS 10 beta 1 (#572) 2016-08-09 10:23:12 -04:00
Manuel de la Pena 97bcc9fd0a [CloudKit] Update bindings for Xcode 8. (#530) 2016-08-09 08:11:44 -04:00
Sebastien Pouliot ff77f85a4c Merge branch 'cycle8' into xcode8 2016-08-08 15:29:36 -04:00
Sebastien Pouliot 21891ea3bc [spritekit] Replace incorrect TV (it's TVOS) condition to fix SKNode (#569)
references:
!missing-protocol-conformance! SKNode should conform to UIFocusItem
!wrong-base-type! SKNode expected UIResponder actual NSObject
2016-08-08 11:51:25 -04:00
Sebastien Pouliot 3590034537 [foundation] Add more bindings (but not complete, WIP) including NSMeasurement that is now needed by some Intents.framework API (#556) 2016-08-07 10:27:34 -04:00
Sebastien Pouliot 921b254adc [watchos][scenekit] Enable SceneKit on watchOS (#563)
* Enable some SceneKit-related WatchKit API
* Enable some SceneKit-related SpriteKit API
* Enable some SceneKit-related Foundation API
* Fix generator to include `using SceneKit;` on watchOS
* Adjust xtro tests since watchOS headers include some stuff that's not available in reality
* Lots of [Watch (3,0)] attributes
2016-08-06 10:59:16 -04:00
Rolf Bjarne Kvinge 812051ee18 [xharness] Don't generate makefile targets for non-executable projects. (#567) 2016-08-06 10:58:03 -04:00
Chris Hamons a3c7029c6a [XM] Fix "random" crash in introspection tests (#565)
- Hopefully kill https://bugzilla.xamarin.com/show_bug.cgi?id=42267
2016-08-05 16:14:37 -05:00
Rolf Bjarne Kvinge 56fc26b26f [xharness] Split the mscorlib/System test run for watchOS into multiple executions. (#564)
* [tests] Implement filtering based on test name to make it possible to run a subset of tests manually.

* [xharness] Add support for passing environment variables to test apps.

* [xharness] Split the mscorlib/System test run for watchOS into multiple executions.

When running on a watch, the complete set of mscorlib and System tests use too
much memory, so they end up crashing the app.

So instead don't run all the tests in the same test run, but
instead split them up.

This splits the System tests in 5 different sets, based on the first
character of the test class name.

The mscorlib tests are split in 26 different sets, one for each
character (A-Z).
2016-08-05 22:28:13 +02:00
Rolf Bjarne Kvinge 960a164e4e [tests] Tweak watchOS test UI a bit. (#561) 2016-08-05 22:26:43 +02:00
Rolf Bjarne Kvinge d22c7adcda [tests] Split mscorlib into two test assemblies. Fixes #41746. (#562)
On watchOS we can't include all the tests for device in a single
assembly, because the native object code becomes too big.

So instead split the tests into two assemblies. Luckily this
is fairly easy for test projects, since they have few dependencies
between source files (there are some however, so source files
are grouped per directory so that files in the same directory do
not end up in different test projects). There is also some hard-coded
logic.

https://bugzilla.xamarin.com/show_bug.cgi?id=41746
2016-08-05 21:04:46 +02:00
Rolf Bjarne Kvinge 9f3d438169 [xharness] Attach a native debugger when running watchOS tests on device. (#560)
Attaching a native debugger prevents the watch from backgrounding
the app, and makes the test run able to complete without having
to babysit it.
2016-08-05 21:03:56 +02:00
Rolf Bjarne Kvinge 4f3af5eefb [xharness] Simplify BCL project generation by merging iOS and tvOS logic. (#558) 2016-08-05 19:45:59 +02:00
Alex Soto 58a0e6136a [Scenekit] Update SceneKit to Xcode8 Beta 4 (#552)
* Fixed reports of xtro tests
* Fixed some members that are @required members of an existing protocol (XAMCORE_4_0)
* Added some new typo fixes to Intrespection tests
* Fixed SCNNode.EnumerateChildNodes delegate signature
2016-08-05 08:23:02 -04:00
Sebastien Pouliot b146861389 [tests] Fix LinkSDK DllImportTest on newer OS (#554)
Latest iOS 10, tvOS 10 and watchOS 3 uses a newer libsqlite version.

It's not clear is macOS 10.12 also does (and that could affect the
test when using the simulators)
2016-08-04 20:00:52 -04:00
Sebastien Pouliot 937eb70686 Merge branch 'cycle8' into xcode8 2016-08-04 13:26:08 -04:00
Rolf Bjarne Kvinge 08882e2e9c [tests] Add explicit reference to System.Core. (#545) 2016-08-04 16:55:40 +02:00
Rolf Bjarne Kvinge ee239a9cb9 Merge pull request #539 from rolfbjarne/xm-fix-static-registrar
[XM] Fix the static registrar.
2016-08-04 15:49:21 +02:00
Rolf Bjarne Kvinge 916838c7e3 [tests] Split mscorlib into two test assemblies. Fixes #41746. (#544)
On watchOS we can't include all the tests for device in a single
assembly, because the native object code becomes too big.

So instead split the tests into two assemblies. Luckily this
is fairly easy for test projects, since they have few dependencies
between source files (there are some however, so source files
are grouped per directory so that files in the same directory do
not end up in different test projects). There is also some hard-coded
logic.

https://bugzilla.xamarin.com/show_bug.cgi?id=41746
2016-08-04 15:47:05 +02:00
Chris Hamons 52a8642d2c [XM] Teach mmp to set rpath we we copy frameworks into bundle Framework dir (#506)
- https://bugzilla.xamarin.com/show_bug.cgi?id=42846
2016-08-04 08:35:23 -05:00
Chris Hamons 6f4be16d3a [XM] Fix static registrar.
Rip out all 64-bit registration in 32-bit XM.
2016-08-04 11:54:59 +02:00
Vincent Dondain ddd1988f64 [spritekit] Update for iOS 10 beta 1 (#498)
* [spritekit] Update for iOS 10 beta 1

* [spritekit] Add missing MarshalDirective

* [runtime] Add missing simd function signatures

- Add matrix_float2x2 and matrix_float3x3 natives types.

* [introspection] Fix ApiSignatureTest

- We now avoid checking {?=[X]} encoded signatures.
- We now calculate the right size for matrix_float2x2, matrix_float3x3 and matrix_float4x4.
- Fix SKWarpGeometryGrid wrong bindings revealed by tests (IntPtr instead of Vector2).

* [monotouch-test] Add SKUniform and SKWarpGeometryGrid tests
2016-08-03 19:12:07 +02:00
Sebastien Pouliot eab578af88 [callkit] Update for beta 4 (#531) 2016-08-02 21:13:54 -04:00
Sebastien Pouliot c99bca8695 Merge pull request #518 from spouliot/beta4-bump
Bump Xcode to beta 4 to run tests against the newest toolchain and SDKs
2016-08-02 13:59:24 -04:00
Rolf Bjarne Kvinge 395a497281 [xharness] Fail properly if we fail to load simulators. (#520) 2016-08-02 18:24:34 +02:00
Rolf Bjarne Kvinge 2c892e2b02 [xharness] Get new mlaunch for beta 4. 2016-08-02 18:15:54 +02:00
Chris Hamons 798aca0767 [XM] Fix static registrar.
Rip out all 64-bit registration in 32-bit XM.
2016-08-02 17:44:10 +02:00
Chris Hamons 9e731e842c Enable logging during mac introspection tests (#510)
- Try to track down a random crash
- https://bugzilla.xamarin.com/show_bug.cgi?id=42267
2016-08-02 08:33:01 -05:00
Sebastien Pouliot 3f0d43debf [foundation] Adding new iOS 10 API (part 1) (#503)
- Split in two to ease review;

- Unit tests added for NSUrlSessionTaskMetrics and
  NSUrlSessionTaskTransactionMetrics as they don't respond to selectors
  like expected (but just like other NSUrlSession* types)
2016-08-02 08:03:35 -04:00
Sebastien Pouliot f9b69492d5 Merge branch 'cycle8' into xcode8 2016-08-01 14:37:32 -04:00
Rolf Bjarne Kvinge c30a2f52ce [xharness] Don't run into an infinite loop if failing to run sqlite3. (#515) 2016-08-01 16:36:14 +02:00
Rolf Bjarne Kvinge f2c1e0e15e [tests] Add explicit reference to System.Core. (#513) 2016-08-01 15:57:15 +02:00
Marek Safar 03febb985d [tests] Add explicit System.Core references 2016-07-30 10:06:46 +02:00
Marek Safar 92bb1cd05f [tests] Add explicit System.Core references 2016-07-30 00:12:10 +02:00
Chris Hamons 08ba6a7af7 [XM] Teach mmp to set rpath we we copy frameworks into bundle Framework dir (#506)
- https://bugzilla.xamarin.com/show_bug.cgi?id=42846
2016-07-28 07:49:21 -05:00
Sebastien Pouliot afe6c788a2 [tests][xtro] Update some data files (#496) 2016-07-26 15:58:52 -04:00
Sebastien Pouliot 8f657bbd38 [passkit] Update for beta 1-2 for iOS and watchOS (#487) 2016-07-26 15:57:26 -04:00
Sebastien Pouliot c37f450a09 Merge branch 'cycle8' into xcode8 2016-07-26 11:41:45 -04:00
Rolf Bjarne Kvinge 556f9991a2 [tests] Exclude the 'RequiresBSDSockets' category from watchOS tests. (#495) 2016-07-26 11:39:50 -04:00
Rolf Bjarne Kvinge abd5d1ba46 Use dlsym for user assemblies on iOS. (#492)
We tried disabling dlsym for all assemblies on iOS, but it turned
out to break a significant amount of customer code [1].

So re-enable it, but only for user assemblies (since we control
all assemblies we ship and can thus make sure those work with
dlsym disabled).

https://trello.com/c/guig1MF2/623-re-enable-dlsym-for-ios
2016-07-26 11:39:18 -04:00
Rolf Bjarne Kvinge 130d981b5b Use dlsym for user assemblies on iOS. (#488)
We tried disabling dlsym for all assemblies on iOS, but it turned
out to break a significant amount of customer code [1].

So re-enable it, but only for user assemblies (since we control
all assemblies we ship and can thus make sure those work with
dlsym disabled).

https://trello.com/c/guig1MF2/623-re-enable-dlsym-for-ios
2016-07-26 08:12:40 -04:00
Vincent Dondain edbc04b720 [homekit] Add iOS 10 beta 2 missing bindings (#481)
- Made an API available for tvOS.
- Annotated ios.pending with things already bound.
2016-07-25 15:03:11 -04:00
Rolf Bjarne Kvinge dec9ff608f [xharness] Don't try killing a process that has already exited. (#483) 2016-07-25 15:02:35 -04:00
Rolf Bjarne Kvinge 51937dc7e3 [xharness] Don't generate makefile targets for non-executable projects. (#482) 2016-07-25 15:01:34 -04:00
Rolf Bjarne Kvinge d1d0e9a501 [xharness] Simplify BCL project generation by merging iOS and tvOS logic. (#480) 2016-07-25 15:01:14 -04:00
Rolf Bjarne Kvinge b30c4967da [tests] Fix a few compiler warnings about unused code. (#479) 2016-07-25 15:00:43 -04:00
Sebastien Pouliot d8d1fff94a [tvos][photos] Decorate API with [TV (10,0)] (#478)
xtro results do not show any missing/extra API
2016-07-25 11:38:25 -04:00
Sebastien Pouliot cb38c14bf8 Merge branch 'cycle8' into xcode8 2016-07-25 08:28:26 -04:00
Rolf Bjarne Kvinge 8f685cba8f [mtouch tests] Improve Sdk tests to list all failing assemblies instead of failing on the first one. (#474) 2016-07-25 08:18:49 -04:00
Sebastien Pouliot 1190aac04c [tvos][externalaccessory] Enable framework on platform (#470)
* Enable ExternalAccessory for tvOS and teach the static registrar about the lack of simulator headers.
2016-07-24 10:44:19 -04:00
Sebastien Pouliot 7a5f89e7a8 [clockkit][watchos] Update for beta 1-3 (#459)
`getPlaceholderTemplateForComplication:withHandler:` was @required in
watchOS 2.x but is now deprecated and downgraded to @optional in
watchOS 3 (betas)

This is a breaking change but we have not released our final watchOS 2.x
bits yet so it make sense to backport this change (unless Apple reverts
it before 3.0 is released)
2016-07-22 17:13:49 -04:00
Rolf Bjarne Kvinge 90f56133f9 [monotouch-test] Tweak UrlSessionTest.DownloadDataAsync to not crash the process if exceptions occur. (#466) 2016-07-22 17:11:45 -04:00
Chris Hamons 5ddc619589 [XM] Update bindings and tests for Xcode8b3 (#467)
* [XM] AppKit Xcode8 Beta3 changes

* [XM] Update intents.cs with macOS attributes

* [XM] Fix bindings caught by introspection test

* [XM] Fix classic introspection tests by marking safariservices as 64-bit only

* [XM] Async upgrade

* [XM] Fix apitest on classic by noting IntentsLibrary is 64-bit only
2016-07-22 17:10:23 -04:00
Sebastien Pouliot 5a9d8240c2 [watchos][gamekit] Enable GameKit on watchOS (#452)
Apple does not (yet?) ship the headers for GameKit on the watch simulator (radar [1]). The static registrar was tweaked to skip this on the simulator.

[1] https://trello.com/c/Okdw58IO/51-27476259-gamekit-header-files-are-missing-for-watchsimulator
2016-07-22 13:35:59 -04:00
Chris Hamons 2190f8b33d [XM] - Fix protocol bindings that had BaseType but no Model (#460)
- https://trello.com/c/9JANewiM
- My analysis was incorrect, the binding was wrong and the test caught it.
- If you have [Model] you must have [BaseType], and if you don't want [Model] you must not use [BaseType]
2016-07-22 15:58:17 +02:00
Alex Soto 958861869c [UserNotifications] Fix xtro test results and bug in UNNotificationResponse (#455)
* ActionIdentifier from UNNotificationResponse class can be
  a NSString defined in UNNotificationActionIdentifier but can
  also be a custom defined identifier so we can't really strong type it
* Renamed enums to use the same name as defined in the header because
  we don't really know how this framework will evolve over time
  and there is a chance that the current naming can create confusion
  in the long run so we play safe here
2016-07-22 08:11:28 -04:00
Alex Soto c27c86e03d [CallKit] Fix xtro test issues (#454) 2016-07-22 08:09:48 -04:00
Alex Soto 329648c08c Merge pull request #453 from dalexsoto/intents
[Intents] Fix xtro tests feedback
2016-07-21 13:49:57 -05:00
Sebastien Pouliot 7637658e28 Merge branch 'cycle8' into xcode8 2016-07-21 11:40:41 -04:00