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

3536 Коммитов

Автор SHA1 Сообщение Дата
Jeffrey Stedfast d4091da877 [msbuild] Fixed ObjC binding targets to delete target zip files before re-zipping (#2840)
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=59848
2017-10-09 16:41:37 -04:00
Vincent Dondain 1836993c75 Bump for Xcode 9.1 beta 2 (#2866) 2017-10-09 16:11:27 -04:00
Alex Soto aae179d008 [VideoToolbox] Adds bindings from Xcode 9 Beta 1 to Stable (#2859)
* [VideoToolbox] Adds bindings from Xcode 9 Beta 1 to Stable

* implement feedback and remove weak prefix that I forgot to change
2017-10-09 13:43:17 -05:00
Vincent Dondain 5be10ed14a [Make.config] Bump Visual Studio version to 7.4.99 (#2862) 2017-10-09 13:32:25 -04:00
Rolf Bjarne Kvinge 610dcc8a03 [runtime] Don't hold the framework lock when running managed code. Fixes #59994. (#2848)
There is a deadlock between the framework lock and the GC lock; resolve this
by making sure we don't execute managed code while holding the framework lock.

The framework lock was introduced in
xamarin/maccore@4a0748b1d8, and from analyzing
that commit message, it seems we're safe as long as nobody retains/releases
NSObjects (in way that makes the retainCount jump to or from 1) while the GC
runs.

Calling `xamarin_unregister_nsobject` does not affect the retain count of the
object; thus it's not necessary to keep the lock during the call to
`xamarin_unregister_nsobject`.

https://bugzilla.xamarin.com/show_bug.cgi?id=59994
4a0748b1d8
2017-10-09 10:59:25 +02:00
Rolf Bjarne Kvinge 1a0f0b6903 [AudioToolbox] Free the right GCHandle when failing to create an InputAudioQueue. Fixes #59911. (#2852)
When we fail to create an InputAudioQueue, we need to free the local GCHandle
we previously created, not the instance GCHandle where we'd put the local
GCHandle in case of success.

This fixes bug #59911 to throw the correct (invalid parameter) exception (and
not leak the local GCHandle either).

https://bugzilla.xamarin.com/show_bug.cgi?id=59911
2017-10-06 20:02:43 +02:00
Rolf Bjarne Kvinge 6136855345 [UIKit] Don't construct new objects in UIDragDropSessionExtensions.LoadObjects if what we have is usable. Fixes #59944. (#2857)
We might get an array of instances that are of the right type; in that case
use those instances instead of creating new ones.

https://bugzilla.xamarin.com/show_bug.cgi?id=59944
2017-10-06 20:00:59 +02:00
Rolf Bjarne Kvinge e0e9cef39d [monotouch-test] The media library permission API is only available in iOS 9.3+. Fixes #59995. (#2854)
The media library permission API (to either query the permission status or ask
for permission) was introduced in iOS 9.3, so we need to make sure to not call
it on earlier iOS versions.

If running on older iOS versions, then just don't do anything (unless we're
asked to ignore tests that put up permission dialogs, in which case ignore the
test, since that's the safe approach).

https://bugzilla.xamarin.com/show_bug.cgi?id=59995
2017-10-06 17:17:41 +02:00
Rolf Bjarne Kvinge 1becd1ed1e Bump mono to HEAD get fixes for bug #58411 and bug #59832. (#2856)
* mono/mono@fbc487ff42 [sre] register a canonical MonoReflectionMethod for a methodref token
* mono/mono@72c4a0ca08 [sre] Expect a new token for MonoArrayMethod and SignatureHelper
* mono/mono@9685274a8a [sre] Remove MonoDynamicImage:handleref_managed field
* mono/mono@5cb0e59bea [sre] Map fieldref tokens to MonoClassField*
* mono/mono@fc364332ff [sre] Wrap mono_image_create_token with HANDLE_FUNCTION_{ENTER,RETURN}
* mono/mono@ff204dae30 [test] SRE ILGenerator test for methodref and fieldref token caching
* mono/mono@9b466abc49 [appletls] Trust SecTrustResult.Proceed as well. Fixes #58411.
* mono/mono@ab058f8e49 [aot] Don't error out if a method fails to JIT in full-aot mode. This was a regression caused by 9302c31f81abd2f5bbf9a8ddd27993e1ece55db2. Fixes #59832. (#5686) (#5709)
* mono/mono@cb4c3ca997 Add glib to the list of packages with debugging symbols. (#5658)
* mono/mono@0dd35e9d64 [w32handle] Only own first handle if doing WaitHandle.WaitAny (#5625)
* mono/mono@7ba4e9e7b1 [w32process] Fix inverted kernel and user ticks (#5641)
* mono/mono@71277e78f6 Merge pull request #5619 from mono/2017-06-bump-bockbuild
* mono/mono@c61b3bd6d9 Bump bockbuild to get gtk Japanese IME fixes

Diff: 7d78877800...fbc487ff42

https://bugzilla.xamarin.com/show_bug.cgi?id=58411
https://bugzilla.xamarin.com/show_bug.cgi?id=59832
2017-10-06 17:17:21 +02:00
Rolf Bjarne Kvinge bb0b45afce Bump Touch.Unit to get fix for running watchOS tests on device when the mac has multiple IP addresses. (#2858)
commit spouliot/Touch.Unit@b5b227e80b
Author: Rolf Bjarne Kvinge <rolf@xamarin.com>
Date:   Wed Oct 4 11:45:32 2017 +0200

    [TouchRunner] Improve logging output.

    When asked to write logs to a TCP host:port, and given multiple hostnames, we
    try to connect to all of them to see which hostname works.

    This logic does not necessarily work when asked to write to a http host:port
    (it would have to be implemented), which means that when given multiple
    hostnames, we'd enter a special case, not connecting to anything, and soon
    throwing a NullReferenceException.

    So refactor the logic slightly: we now only try to select the hostname when
    asked to write to a TCP host:port; when asked to write to a HTTP host:port we
    just select the first hostname (which is still better than throwing a NRE).

    We also don't unnecessarily try to resolve hostnames when asked to write logs
    to a file, and make absolutely sure there's no way to not have a log to write
    to by writing to Console.Out if we can't do anything else.
2017-10-06 17:16:41 +02:00
Rolf Bjarne Kvinge 3091cf67a3 Bump llvm to revert accidental unbump when merging the xcode9 branch. (#2828)
In 1690ccbc99 (when merging the Xcode 9 branch
into master), llvm was accidentally debumped from
mono/llvm@6aa74ae572 to
mono/llvm@975e3a6903.

So rebump (and one commit further, to match what we're using in the d15-4
branch).
2017-10-06 13:51:43 +02:00
Rolf Bjarne Kvinge f4b98cdf60 [tests][mtouch] Add support for reading binary plists. (#2849)
* [tests][mtouch] Add support for reading binary plists.

Some plists in Xcode 9 are now binary plists (instead of just plain xml files
like they were in previous versions of Xcode). This causes trouble for some of
our tests, so make sure we handle binary plists as well.

Fixes these failures:

1. Xamarin.MTouch.MT0091(tvOS,"tvOS") : System.Xml.XmlException : Data at the root level is invalid. Line 1, position 1.
  at System.Xml.XmlTextReaderImpl.Throw (System.Exception e) [0x00027] in <03a79101ea6a4b9ba07e4ed2f6d985f5>:0
  at System.Xml.XmlTextReaderImpl.Throw (System.String res, System.String arg) [0x00029] in <03a79101ea6a4b9ba07e4ed2f6d985f5>:0
  at System.Xml.XmlTextReaderImpl.Throw (System.String res) [0x00000] in <03a79101ea6a4b9ba07e4ed2f6d985f5>:0
  at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace () [0x0012c] in <03a79101ea6a4b9ba07e4ed2f6d985f5>:0
  at System.Xml.XmlTextReaderImpl.ParseDocumentContent () [0x002d4] in <03a79101ea6a4b9ba07e4ed2f6d985f5>:0
  at System.Xml.XmlTextReaderImpl.Read () [0x0008c] in <03a79101ea6a4b9ba07e4ed2f6d985f5>:0
  at System.Xml.XmlLoader.Load (System.Xml.XmlDocument doc, System.Xml.XmlReader reader, System.Boolean preserveWhitespace) [0x000a6] in <03a79101ea6a4b9ba07e4ed2f6d985f5>:0
  at System.Xml.XmlDocument.Load (System.Xml.XmlReader reader) [0x0002e] in <03a79101ea6a4b9ba07e4ed2f6d985f5>:0
  at Xamarin.Tests.Configuration.GetPListStringValue (System.String plist, System.String key) [0x00028] in <44c95c7e3d1e488ab633a77d9a794653>:0
  at Xamarin.MTouch.MT0091 (Xamarin.Profile profile, System.String name) [0x000ae] in <44c95c7e3d1e488ab633a77d9a794653>:0
  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) [0x00032] in <400071ddcfe64ed8a3531490bb763536>:0

2. Xamarin.MTouch.MT0091(iOS,"iOS") : System.Xml.XmlException : Data at the root level is invalid. Line 1, position 1.
  at System.Xml.XmlTextReaderImpl.Throw (System.Exception e) [0x00027] in <03a79101ea6a4b9ba07e4ed2f6d985f5>:0
  at System.Xml.XmlTextReaderImpl.Throw (System.String res, System.String arg) [0x00029] in <03a79101ea6a4b9ba07e4ed2f6d985f5>:0
  at System.Xml.XmlTextReaderImpl.Throw (System.String res) [0x00000] in <03a79101ea6a4b9ba07e4ed2f6d985f5>:0
  at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace () [0x0012c] in <03a79101ea6a4b9ba07e4ed2f6d985f5>:0
  at System.Xml.XmlTextReaderImpl.ParseDocumentContent () [0x002d4] in <03a79101ea6a4b9ba07e4ed2f6d985f5>:0
  at System.Xml.XmlTextReaderImpl.Read () [0x0008c] in <03a79101ea6a4b9ba07e4ed2f6d985f5>:0
  at System.Xml.XmlLoader.Load (System.Xml.XmlDocument doc, System.Xml.XmlReader reader, System.Boolean preserveWhitespace) [0x000a6] in <03a79101ea6a4b9ba07e4ed2f6d985f5>:0
  at System.Xml.XmlDocument.Load (System.Xml.XmlReader reader) [0x0002e] in <03a79101ea6a4b9ba07e4ed2f6d985f5>:0
  at Xamarin.Tests.Configuration.GetPListStringValue (System.String plist, System.String key) [0x00028] in <44c95c7e3d1e488ab633a77d9a794653>:0
  at Xamarin.MTouch.MT0091 (Xamarin.Profile profile, System.String name) [0x000ae] in <44c95c7e3d1e488ab633a77d9a794653>:0
  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) [0x00032] in <400071ddcfe64ed8a3531490bb763536>:0

* [tests] The MSBuild tests now need a reference to StringUtils.
2017-10-06 13:14:57 +02:00
Jeffrey Stedfast c7d6a7ac1d [msbuild] Force-Init AppleSdkSettings in DetectSdkLocationsTaskBase (#2781)
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=59756
2017-10-06 10:34:57 +02:00
Jeffrey Stedfast 9909748eb4 [msbuild] Emit a build error when CFBundleIdentifier is null/empty (#2791)
* [msbuild] Removed unused DetectBundleIdentifier task

* [msbuild] Emit a build error when Info.plist CFBundleIdentifier is null/empty

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=59572
2017-10-06 10:26:33 +02:00
Rolf Bjarne Kvinge 5f6134bca3 [monotouch-test] Fix tests causing trouble for the AOT compiler. (#2846)
Fix tests causing trouble for the AOT compiler by not building those tests on
device (they're testing error conditions in the simulator, which means it's
acceptable to exclude these tests for device builds).

This fixes an AOT-compiler assert:

> * Assertion at /Users/builder/data/lanes/1381/d264709b/source/xamarin-macios/external/mono/mono/metadata/marshal.c:8497, condition `sig->param_count == invoke_sig->param_count + 1' not met

due to invalid [MonoPInvokeCallback] attributes.
2017-10-06 10:16:56 +02:00
Alex Soto aa2c533501 [ModelIO] Adds Xcode 9 Beta 1 to Stable API bindings (#2832)
* [ModelIO] Adds Xcode 9 Beta 1 to Stable API bindings

* implement feedback

* implement Tim's feedback
2017-10-05 20:32:25 +02:00
Rolf Bjarne Kvinge 0d884048c6 [registrar] Fix casing of PDFKit's header path. Fixes #59965. (#2841)
https://bugzilla.xamarin.com/show_bug.cgi?id=59965
2017-10-05 20:17:52 +02:00
Rolf Bjarne Kvinge 2a8ca6d4d8 [appletls] Trust SecTrustResult.Proceed as well. Fixes #58411. (#2844) (#2847)
Apple states clearly in their documentation about SecTrustResult.Proceed [1]:

    The user explicitly chose to trust a certificate in the chain (usually by
    clicking a button in a certificate trust panel).

    Your app should trust the chain.

This fixes bug #[58411][2], where SecTrustEvaluate returns
SecTrustResult.Proceed starting with iOS 11.

There's an equivalent mono fix: https://github.com/mono/mono/pull/5703

[1]: https://developer.apple.com/documentation/security/1394363-sectrustevaluate
[2]: https://bugzilla.xamarin.com/show_bug.cgi?id=58411
2017-10-05 19:34:17 +02:00
Rolf Bjarne Kvinge ac45813621 [runtime] Call mono_raise_exception if mono_set_pending_exception isn't available. Works around bug #59979 (#2845)
mono_set_pending_exception is a private mono symbol, which means we won't find
it when using the system mono (as a dynamic library). In that case, we'd
abort.

Instead try to call mono_raise_exception, and hope for the best. It will leak
somewhat, but that's still better than asserting.

This changes the generated wrapper function from:

```c
MONO_API void
mono_set_pending_exception (MonoException * exc)
{
	if (mono_set_pending_exception_func == NULL)
		xamarin_assertion_message ("Could not load mono_set_pending_exception\n");

	return mono_set_pending_exception_func (exc);
}
```

to

```c
MONO_API void
mono_set_pending_exception (MonoException * exc)
{
	if (mono_set_pending_exception_func == NULL)
		return mono_raise_exception (exc);

	return mono_set_pending_exception_func (exc);
}
```

Also this only applies to Xamarin.Mac apps that use the system mono (such as VSfM).

https://bugzilla.xamarin.com/show_bug.cgi?id=59979
2017-10-05 18:13:44 +02:00
Rolf Bjarne Kvinge 9150d8de5e [appletls] Trust SecTrustResult.Proceed as well. Fixes #58411. (#2844)
Apple states clearly in their documentation about SecTrustResult.Proceed [1]:

    The user explicitly chose to trust a certificate in the chain (usually by
    clicking a button in a certificate trust panel).

    Your app should trust the chain.

This fixes bug #[58411][2], where SecTrustEvaluate returns
SecTrustResult.Proceed starting with iOS 11.

There's an equivalent mono fix: https://github.com/mono/mono/pull/5703

[1]: https://developer.apple.com/documentation/security/1394363-sectrustevaluate
[2]: https://bugzilla.xamarin.com/show_bug.cgi?id=58411
2017-10-05 18:06:46 +02:00
Jeffrey Stedfast 8d8a071a29 [msbuild] Improved logic for obtaining local IP addresses for WiFi debug (#2835)
* [msbuild] Improved logic for obtaining local IP addresses for WiFi debug

* If we can't resolve the local host, connect to microsoft.com and use LocalEndPoint

* Use UDP instead of TCP to avoid network latency
2017-10-05 14:00:44 +02:00
Rolf Bjarne Kvinge 0b199a7080 [tests] Exclude tests whose category is !BITCODE when running on watchOS/Release. Partially fixes #59947. (#2839)
Exclude tests whose category is !BITCODE when running on watchOS/Release. This
also requires a minor update to xharness to add a BITCODE conditional
compilation flag to generated watchOS/Release projects configurations.

This partially fixes #59947 (the fix will be complete once we bump to mono/2017-08).

https://bugzilla.xamarin.com/show_bug.cgi?id=59947
2017-10-05 13:41:04 +02:00
Timothy Risi 1595206541 [HealthKit] Bind Xcode 9 APIs (#2817)
* [HealthKit] Update to Xcode 9 GM

* Add new xcode 9 beta APIs

* Fix PR comments

Marking SyncVersion as an int based on SpeedySloth sample from Apple:

            guard let version = route.metadata?[HKMetadataKeySyncVersion] as? NSNumber else {
                print("Route does not have a sync version for route \(route)")
                return
            }

            if version.intValue == 1 {
                self.makeWorkoutRouteSlothy(workout: workout, route: route)
            }

* Didn't save after deleting the FIXME

* Fix build issue

* Fix introspection tests

* Add new enum values to HKQuantityType.ToKey

* QuantityTypeIdentifierTest needs xcode version check for new enum types
2017-10-05 07:48:53 +02:00
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