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

3563 Коммитов

Автор SHA1 Сообщение Дата
Matt Sylvia f2955720b1 Branching for d15-4-xcode9.1 2017-10-04 15:41:48 -04:00
Jeffrey Stedfast ebea0f76a8 [msbuild] Properly subclass GetPropertyListValueTaskBase (#2793) 2017-10-04 20:08:54 +02:00
Alex Soto ac17126562 [ReplayKit] Update bindings to Xcode 9.1 Beta 1 (#2837) 2017-10-04 07:22:50 +02:00
Alexander Köplinger eb35aaaa38 Cleanup disabled Mono profiles for configure (#2836)
profile2, profile4 and profile4_5 were removed a long time ago, there's only profile4_x nowadays.
2017-10-04 07:21:17 +02:00
Rolf Bjarne Kvinge d264709b8d Change BlockLiteral.SetupBlock to keep a reference to the delegate passed as the trampoline. (#2822)
* Change BlockLiteral.SetupBlock to keep a reference to the delegate passed as the trampoline.

Change BlockLiteral.SetupBlock to keep a reference to the delegate passed as
the trampoline, so that it's safer for normal users (crashes due to incorrect
usage are rare and random, and as such they're also hard to track down).

Additionally introduce a BlockLiteral.SetupBlockUnsafe method, that still has
the old behavior, so that we can use it in our own (reviewed) code.

* [ObjCRuntime] Add some validation to BlockLiteral.SetupBlock.

* Use BlockLiteral.SetupBlockUnsafe instead of .SetupBlock

Use SetupBlockUnsafe in our own code, because we know our own code is using it
correctly (by passing a trampoline stored in a static field, so that the GC
doesn't free it).

* [tests] Fix xammac tests build.
2017-10-03 18:59:10 +02:00
Sam Schwarz f309d7f2c5 Update run-tests to use file. (#2831) 2017-10-03 11:35:49 +02:00
Chris Hamons aca0e2ed2e Fix a number of introspection test failures on 10.13 (#2815) 2017-10-02 16:55:23 -05:00
Rolf Bjarne Kvinge 43f84f6ca7 [xharness] Improve device selection, taking wireless devices into account. (#2827)
* [xharness] Don't list unusable devices.

* [xharness] Show the list of candidate devices in the html report.

* [xharness] Prioritize devices depending on the interface speed.
2017-10-02 17:37:19 +02:00
Rolf Bjarne Kvinge ea3f9736e1 [xharness] Don't freak out if we find a device we can't categorize. (#2824)
It's most likely just an untrusted device (in which case DeviceClass will be
an empty string).
2017-10-02 17:37:00 +02:00
Rolf Bjarne Kvinge f23bd79eff [xharness] Timestamp install logs. (#2825)
* [xharness] Simplify code a bit.

Logs are TextWriters by themselves, so no need to get a StreamWriter to pass
to API that takes TextWriter, when we can just pass the log instance itself.

This makes it possible to timestamp external process output (because
Log.Timestamp is honored instead of bypassed).

* [xharness] Timestamp install logs.

So that we get exact numbers of how long it takes to install on watch (and if
the watch installation stalls, or just times out because it takes too long).
2017-10-02 17:36:41 +02:00
Rolf Bjarne Kvinge 38a680aba6 Bump maccore to get support for wireless devices in mlaunch, and publicize it. (#2826)
commit xamarin/maccore@a02bf81604
Author: Rolf Bjarne Kvinge <rolf@xamarin.com>
Date:   Mon Oct 2 14:32:13 2017 +0200

    Bump maciostools to get support for wireless devices in mlaunch.

    commit xamarin/maciostools@1d6be938cb
    Merge: 0d6932b 854cbc0
    Author: Rolf Bjarne Kvinge <rolf@xamarin.com>
    Date:   Mon Oct 2 07:44:19 2017 +0200

        Merge pull request #91 from rolfbjarne/mlaunch-wireless-devices

        [mlaunch] Add support for wireless devices.
2017-10-02 17:26:47 +02:00
Rolf Bjarne Kvinge 622af84e72 [xharness] Always wait for processes to exit, even if they're killed. Fixes #57846. (#2823)
Always wait for processes to exit, even if they're killed.

Also make absolutely sure that we can safely handle any exception when getting
the ExitCode, no matter what.

https://bugzilla.xamarin.com/show_bug.cgi?id=57846
2017-10-02 12:06:57 +02:00
Rolf Bjarne Kvinge dbb37b3e4f [CoreGraphics] Implement CoreGraphics bindings for Xcode 9. (#2812)
* [ios11-b1] CoreGraphics bindings

* Updated with feedback from Sebastien

* Fix build, optimize checks

* Add version information

* Address comments

* Tests

* Remove Apply code, add special code for typo

* [CoreGraphics] Add comma after last enum value.

* [CoreGraphics] No need to bind CGColorSpaceGetName.

* [CoreGraphics] Add new field in Xcode 9 beta 5.

* [CoreGraphics] Move kCGPDFContextAccessPermissions to the correct dictionary container and implement the corresponding manual code.

* [CoreGraphics] Adjust nullability acceptance based on new attributes for CGColorSpace.CreateCalibratedGray/RGB functions.

* [CoreGraphics] Bind CGColorSpaceCreateLab, introduced in Xcode 9 beta 5.

* [CoreGraphics] Adjust CGColorSpaceCreateWithICCData and CGColorSpaceCreateWithICCProfile bindings according to Xcode 9 beta 2.

Apple introduced CGColorSpaceCreateWithICCData in b1, and made
CGColorSpaceCreateWithICCProfile a typedef to CGColorSpaceCreateWithICCData.

Apple reversed the typedef in b2 (probably because it creates broken
executables when targetting earlier versions of macOS, since those executables
would use CGColorSpaceCreateWithICCData, which would not exist), and instead
made CGColorSpaceCreateWithICCProfile a normal deprecated method.

So copy this logic in our bindings: deprecate CreateICCProfile, and introduce
CreateICCProfile, with two overloads for NSData and CGDataProvider (since
that's what's accepted according to the documentation).

* [CoreGraphics] Add CGContextPDF constructors to make parity between different overloads.

There are two types of CGContextPDF constructors: the first argument is either
an NSUrl or a CGDataConsumer. Previously the NSUrl type had more overloads,
and also allowed a null CGRect for the second argument. With the overloads are
identical between the two types of CGContextPDF constructors.

Existing constructors:

	CGContextPDF (NSUrl, CGRect, CGPDFInfo)
	CGContextPDF (NSUrl, CGRect)
	CGContextPDF (NSUrl, CGPDFInfo)
	CGContextPDF (NSUrl)
	CGContextPDF (CGDataConsumer, CGRect, CGPDFInfo)

Added constructors:

	CGContextPDF (CGDataConsumer, CGRect)
	CGContextPDF (CGDataConsumer, CGPDFInfo)
	CGContextPDF (CGDataConsumer)

Additionally the code has been fixed to not throw NullReferenceExceptions if
null is passed for any of the values and instead pass on any null values to
the native `CGPDFContextCreate` method (since `CGPDFContextCreate`'s arguments
are all `__nullable`).

* [tests] Add and improve existing tests for new and some existing CoreGraphics API.

* Undo accidental whitespace noise.

* [tests] Remove random characters in assert message.

* [CoreGraphics] Improve argument exception messages in CGColorSpace according to review.

* [CoreGraphics] Use 'Icc' instead of 'ICC' for new API, and also make the change for XAMCORE_4_0.

* [CoreGraphics] Fix availability attribute for High Sierra.

* [tests] Update monotouch-test after API changes.
2017-10-02 12:02:41 +02:00
Rolf Bjarne Kvinge 700480180f Fix solutions & projects as VSfM wants them. (#2821) 2017-10-02 11:57:50 +02:00
Chris Hamons c3d8555217 Move MT0091 to common code so Xamarin.Mac can benefit from the more f… (#2780)
- https://bugzilla.xamarin.com/show_bug.cgi?id=59186
2017-09-29 12:45:53 -05:00
Rolf Bjarne Kvinge b7b7240c90 [AudioUnit] Fix csc compiler error not allowing unsafe code in iterators. (#2386) (#2818)
csc does not allow unsafe code in iterators:

AudioUnit/AudioUnit.cs(1725,13): error CS1629: Unsafe code may not appear in iterators
AudioUnit/AudioUnit.cs(1725,33): error CS1629: Unsafe code may not appear in iterators
AudioUnit/AudioUnit.cs(1723,19): error CS1629: Unsafe code may not appear in iterators

It looks like mcs incorrectly allows this (https://bugzilla.xamarin.com/show_bug.cgi?id=56616).

So change the code to remove unsafe usage in iterators.
2017-09-29 18:57:31 +02:00
Alex Soto 6e05156fec [AVFoundation] AVFoundation API Enhancements (#2810)
* [AVFoundation] AVFoundation API Enhancements

Changes in AVFoundation
===================

AVCaptureSynchronizedDataCollection:

* Obsoletes `From` method because the name does not makes sense in the current context.
* Obsoletes `ObjectForKeyedSubscript` in favor of a C# indexer.
* Adds `GetSynchronizedData` to replace obsoleted `From` method`.

AVCaptureSynchronizedData:

* Adds `[Abstract]` in XAMCORE_4_0 because it is an abstract superclass.

AVCaptureDevice:

* Adds strong typed API to `GetAuthorizationStatus` and `RequestAccessForMediaType`
  using `AVAuthorizationMediaType` enum holding the only possible values.

AVCaptureDepthDataOutput:

* AVCaptureDepthDataOutput needs its default .ctor, there is no other way
  to instantiate this class.

Test
====

A test exercising the new API lives here:

4715069b2b/AVCaptureDataOutputSynchronizerTest/AVCaptureDataOutputSynchronizerTest/ViewController.cs

The API needs an iPhone 7+, 8+ or X in order to run.

* Fix casing typos
2017-09-29 11:14:57 -05:00
Alex Soto 81c9ae4510 [AVFoundation] Adds missing Xcode9 API. (#2811)
AVCapturePhotoOutput:

* Adds missing members `DepthDataDeliverySupported` and `DepthDataDeliveryEnabled`
  from `AVCapturePhotoOutputDepthDataDeliverySupport` category.

AVCaptureDevice:

* Adds missing members `ActiveDepthDataFormat`, `MinAvailableVideoZoomFactor` and
  `MaxAvailableVideoZoomFactor` from `AVCaptureDeviceDepthSupport` category.
2017-09-29 11:14:07 -05:00
Vincent Dondain 9b7cc6cbbe [uikit] Add UIContentSizeCategoryCompareToCategory & UIContentSizeCat… (#2805)
- Fixes bug #59422: https://bugzilla.xamarin.com/show_bug.cgi?id=59422)
2017-09-29 12:13:53 -04:00
Rolf Bjarne Kvinge 5cc46dee6f [UIKit] Store delegates in static members so that the GC doesn't free them prematurely. (#2820)
Split off from PR #[2383](https://github.com/xamarin/xamarin-macios/pull/2383)

https://github.com/xamarin/xamarin-macios/pull/2383
2017-09-29 17:25:02 +02:00
Rolf Bjarne Kvinge f660667990 [registrar] Store the attribute type separately for availability attributes saved for the registrar. (#2807)
The registrar requires the availability attributes to work properly, which is
non-trivial when the linker is being used, because the linker runs before the
registrar, and will remove availability attributes.

For this reason we store the availability attributes separately when the
linker removes them so that the registrar can still find them, but
unfortunately it's not enough to store the CustomAttribute instance, because
it may end up crippled: if the attribute type itself is removed by the linker,
then it's not possible to get the attribute type from the CustomAttribute
instance, because 'attribute.Constructor.DeclaringType' returns null (the
linker sets the declaring type of the constructor to null).

Solution: store the attribute type separately; now we use a Tuple of
CustomAttribute and TypeReference.

Fixes this ugly exception:

    System.NullReferenceException: Object reference not set to an instance of an object
      at XamCore.Registrar.Registrar.RegisterAssembly (Mono.Cecil.AssemblyDefinition assembly) [0x00146] in /work/maccore/master/xamarin-macios/src/ObjCRuntime/Registrar.cs:2316
      at XamCore.Registrar.StaticRegistrar.Generate (System.Collections.Generic.IEnumerable`1[T] assemblies, System.String header_path, System.String source_path) [0x00035] in /work/maccore/master/xamarin-macios/tools/common/StaticRegistrar.cs:4197
      at Xamarin.Bundler.RunRegistrarTask.Execute () [0x00001] in /work/maccore/master/xamarin-macios/tools/mtouch/BuildTasks.mtouch.cs:154
2017-09-29 17:19:08 +02:00
Rolf Bjarne Kvinge cc89891b4a [CoreData] Fix availability attribute for High Sierra. (#2819) 2017-09-29 10:11:32 -04:00
Vincent Dondain 99f127bd3a [uikit] Update for Xcode 9.1 beta 1 (#2814) 2017-09-29 13:11:52 +02:00
Alex Soto 4a7eb1621c [Intents] Update to Xcode 9.1 Beta 1 (#2813) 2017-09-28 21:36:05 -05:00
Rolf Bjarne Kvinge 108099b84c [CoreGraphics] Fix memory leak in CGColorSpace.Name. (#2809)
As the native name says, 'CGColorSpaceCopyName' returns a copy, which means we own the return value.
2017-09-28 16:20:48 -04:00
Sebastien Pouliot 6aead42617 [gameplaykit] Add bindings from Xcode 9.0 (#2798)
Re-based from Miguel's PR #2476 including reviewers feedback.

[1] https://github.com/xamarin/xamarin-macios/pull/2476

* [spritekit] Add GKSceneRootNodeType to SKScene too and adjust intro tests

* [tests][intro][macos] Don't skip protocol checks for SceneKit on 64 bits
2017-09-28 15:41:29 -04:00
Alex Soto f2f99e945f Bump maccore to get the right branch in maciostools (#2803) 2017-09-28 10:51:32 -05:00
Rolf Bjarne Kvinge 05484c915f [registrar] Don't verify the SDK for protocol members, and fix the SDK check for other cases. Fixes #59617. (#2790)
* [registrar] Remove useless interface.

* [registrar] Don't store LinkContext in the static registrar when in can be fetched from the Target. Partially fixes #59617.

This avoids a problem where our code would store null because LinkContext
wasn't created yet when the static registrar instance was created.

This fixes the missing error from bug #59617.

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

* [registrar] Don't verify the SDK for protocol members. Partially fixes #59617.

It's not needed, because protocol members don't end up in the registrar output
anyway (and would thus not prevent the registrar code from compiling).

Classes that implement any protocol members would still run into the SDK
check, so this should not prevent real problematic code from being reported
either.

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

* [tests][mtouch] Fix tests after registrar changes.
2017-09-28 17:35:21 +02:00
Rolf Bjarne Kvinge eeb6256834 [mtouch] Show MT0123 if the executable assembly does not reference the product assembly. Fixes #59798. (#2801)
It does not make sense to create Xamarin.iOS projects that don't reference
Xamarin.iOS.dll, so make this an explicit error.

This fixes a NullReferenceException which could (when building for device, or
when not using simlauncher) occur, and instead shows the MT0123 error.

> MTOUCH : error MT0000: Unexpected error - Please file a bug report at http://bugzilla.xamarin.com
> System.NullReferenceException: Object reference not set to an instance of an object
>   at Xamarin.Bundler.Target.GatherFrameworks () [0x00065] in /Users/builder/data/lanes/5024/152b654a/source/xamarin-macios/tools/common/Target.cs:122
>   at Xamarin.Bundler.Target.ProcessAssemblies () [0x000c2] in /Users/builder/data/lanes/5024/152b654a/source/xamarin-macios/tools/mtouch/Target.cs:802
>   at Xamarin.Bundler.Application.ProcessAssemblies () [0x0002f] in /Users/builder/data/lanes/5024/152b654a/source/xamarin-macios/tools/mtouch/Application.cs:1407
>   at Xamarin.Bundler.Application.BuildManaged () [0x00001] in /Users/builder/data/lanes/5024/152b654a/source/xamarin-macios/tools/mtouch/Application.cs:831
>   at Xamarin.Bundler.Application+<>c.<BuildAll>b__134_1 (Xamarin.Bundler.Application v) [0x00000] in /Users/builder/data/lanes/5024/152b654a/source/xamarin-macios/tools/mtouch/Application.cs:779
>   at System.Collections.Generic.List`1[T].ForEach (System.Action`1[T] action) [0x00024] in <48b95f3df5804531818f80e28ec60191>:0
>   at Xamarin.Bundler.Application.BuildAll () [0x00050] in /Users/builder/data/lanes/5024/152b654a/source/xamarin-macios/tools/mtouch/Application.cs:779
>   at Xamarin.Bundler.Driver.Main2 (System.String[] args) [0x00481] in /Users/builder/data/lanes/5024/152b654a/source/xamarin-macios/tools/mtouch/mtouch.cs:1420
>   at Xamarin.Bundler.Driver.Main (System.String[] args) [0x0000f] in /Users/builder/data/lanes/5024/152b654a/source/xamarin-macios/tools/mtouch/mtouch.cs:945

https://bugzilla.xamarin.com/show_bug.cgi?id=59798
2017-09-28 17:31:55 +02:00
Sebastien Pouliot ad47fd2182 [apidiff] Update XML files to 15.4 definitions (#2796) 2017-09-28 08:36:08 -04:00
Alexander Köplinger f7e079cde3 Bump min Mono version to 5.4.0.201 (#2797)
The previous one was a pretty old 5.4 build by now.
2017-09-27 22:20:27 -04:00
Sebastien Pouliot 97d933b082 Bump Xcode and versions for 9.1 beta 1 (#2795) 2017-09-27 19:42:23 -04:00
Sam Schwarz 098011f67d Update run-tests to use file. (#2789) 2017-09-27 19:31:19 +02:00
Rolf Bjarne Kvinge 8319b67fd3 [src] Fix directory dependence for build/tvos/reference/OpenTK-1.0.dll.config. Fixes #59432. (#2787)
Otherwise copying OpenTK-1.0.dll.config to its target destination would fail
because the target directory didn't exist:

> make[2]: *** [build/tvos/reference/OpenTK-1.0.dll.config] Error 1

https://bugzilla.xamarin.com/show_bug.cgi?id=59432
2017-09-27 18:44:42 +02:00
Rolf Bjarne Kvinge d0bb1c5d0c [tests] Recover BindAs test that got lost in merges. (#2786) 2017-09-27 14:05:54 +02:00
Sebastien Pouliot a61590967f [linker] Use correct namespace for async debugging helpers. Fixes #59015 (#2782)
Replace https://github.com/xamarin/xamarin-macios/pull/2704
It's almost identical but it adds unit tests so this does not regress.

The issue was already reported in [1] but the fix [2] was incorrect
and that was also missed when the bug was verified by QA [3].

[1] https://bugzilla.xamarin.com/show_bug.cgi?id=55037
[2] https://github.com/xamarin/xamarin-macios/pull/2004
[3] https://bugzilla.xamarin.com/show_bug.cgi?id=55037#c10
2017-09-27 07:50:01 -04:00
Rolf Bjarne Kvinge a867c4fa3b [mmp/mtouch] Don't link with frameworks not available in the current SDK. Fixes #59636. (#2777)
We already have this logic for frameworks we detect according to the namespace
of the used types, but not for frameworks we detect from P/Invokes.

Fix this by using the same framework exclusion logic for frameworks detected
from P/Invokes: don't link with frameworks not available in the current SDK.

https://bugzilla.xamarin.com/show_bug.cgi?id=59636
2017-09-27 11:40:28 +02:00
Rolf Bjarne Kvinge ee91b95c19 [tests] Unset XCODE_DEVELOPER_DIR_PATH when building mac binding projects. (#2776)
Unset XCODE_DEVELOPER_DIR_PATH when building mac binding projects, so that
when building from VSfM when the Xcode in VSfM differs from the system Xcode
(according to xcode-select) the Xcode command-line tools don't end up confused
and fail in strange ways.
2017-09-27 10:48:51 +02:00
Rolf Bjarne Kvinge 8798cea04f [docs] Fix doc formatting. (#2778)
Remove duplicated MT4171/MT4172 documentation, and fix some formatting to be proper markdown.
2017-09-27 10:47:13 +02:00
Rolf Bjarne Kvinge 50148e7c51 Merge pull request #2288 from rolfbjarne/bindas-registrar-support
[registrar] Add support for the BindAs attribute.
2017-09-26 15:39:46 +02:00
Rolf Bjarne Kvinge 40d9cb9bf1 Merge remote-tracking branch 'origin/master' into bindas-registrar-support 2017-09-26 10:58:35 +02:00
Chris Hamons 8100830d83 Add NSApplicationLaunchUserNotificationKey in more obvious location
- https://bugzilla.xamarin.com/show_bug.cgi?id=58243
2017-09-25 16:09:02 -05:00
Jon Goldberger f87c911017 Moved #if !XAMCORE conditional 2017-09-25 09:49:09 -10:00
Jon Goldberger 7b90d75638 Add #if !XAMCORE conditional around old binding 2017-09-25 09:46:39 -10:00
Jon Goldberger cf5604ae53 Remove #if !XAMCORE conditional 2017-09-25 09:41:20 -10:00
Jon Goldberger 1a8b172758 Fix bug 58243 new PR
This replaces PR #2765
2017-09-25 09:34:50 -10:00
Rolf Bjarne Kvinge cd542a0845 [generator] Remove non-IKVM code. (#2769) 2017-09-25 14:37:51 -04:00
Rolf Bjarne Kvinge 254aa87d3c [generator] Improve BI1049 to include the type name + member name of the broken definition, instead of just the member name. (#2768) 2017-09-25 14:37:24 -04:00
Timothy Risi 65daac9573 [macOS] Fix new xtro failures introduced by the xcode9 branch (#2741) 2017-09-25 09:50:44 -08:00
Rolf Bjarne Kvinge 90d0d978d9 Bump maccore to get fix for #59667. (#2770)
https://bugzilla.xamarin.com/show_bug.cgi?id=59667
2017-09-25 19:15:10 +02:00