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

1535 Коммитов

Автор SHA1 Сообщение Дата
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
Sebastien Pouliot da60263a0a [mtouch] Fix NRE when optimizing bindings. Fixes #44701 (#900)
Some binding assemblies contains extra, unneeded code, generated by the C# compiler, e.g.

IL_002f: stloc.0
IL_0030: ldloc.0

which the binding optimizer did not expect.

https://bugzilla.xamarin.com/show_bug.cgi?id=44701
2016-09-27 16:09:42 -04:00
Chris Hamons c46f5d4793 [XM] Add ThreadSafe to API that gets called on background thread by Cocoa (#901) 2016-09-27 14:51:00 -05:00
Sebastien Pouliot bf47897568 Bump mono/bug42443 branch
It was missing a few recent commits which broke the build with:

[8:45:24] make[5]: *** No rule to make target `/Users/builder/data/lanes/3426/8568b0c2/source/xamarin-macios/_mac-build/Library/Frameworks/Xamarin.Mac.framework/Versions/git/lib/mono/4.5/System.Numerics.Vectors.dll'.  Stop.
2016-09-27 08:57:04 -04:00
Rolf Bjarne Kvinge 19d237473e [runtime] Fix support for debugging on watch device with multiple IP addresses. Fixes #44568. (#898)
At startup we send a request to all the IP addresses we have,
so we must make sure to not get confused if we get responses
from more than one of them.

This fix also requires an updated mlaunch.

https://bugzilla.xamarin.com/show_bug.cgi?id=44568
2016-09-27 08:07:31 -04:00
Rolf Bjarne Kvinge c8993a3597 [tests/mscorlib] Fix template. (#897) 2016-09-27 11:20:32 +02:00
Sebastien Pouliot 8568b0c2c1 [AppleTls]: Disallow calling SSLHandshake() again after the handshake has finished.
Bump Mono to pickup the BCL part of the fix (from temporary PR'ed branch)

commit 7ec55bdbe668b917dddab9996ddda372bcc9a561
Author: Martin Baulig <martin.baulig@xamarin.com>
Date:   Fri Sep 23 17:42:05 2016 +0200

    [AppleTls]: Flush the write queue before finishing the handshake.

    It is possible for SSLHandshake() to return SslStatus.Success while we're still
    having a pending write (AsyncOperationStatus.WantWrite).

    This is because our managed write callback must never return 'WouldBlock', so
    SSLHandshake() things that all data have been sent while we still have them in
    our write queue.

    When this happens, we currently flush the write queue then call SSLHandshake()
    again via AsyncOperationStatus.WantWrite -> AsyncOperationStatus.Continue.

    This returns SslStatus.Protocol on iOS 10.

    (cherry picked from commit 2cc1b887c1c6e86b6844116c8010bac3305c84f9)
2016-09-26 16:34:10 -04:00
Sebastien Pouliot 5102d80f2c Merge branch 'xcode8' into xcode8.1 2016-09-26 14:48:48 -04:00
Sebastien Pouliot 4ab6730dd2 [mtouch] Update script to use mono64. Fixes #44122 and others (#887)
Our move to open source and the mtouch/mlaunch split changed mtouch from
a 64bits to a 32bits application (because mono is, by default, still
32bits on OSX).

That's the cause for several recent bugs

* https://bugzilla.xamarin.com/show_bug.cgi?id=44122
* https://bugzilla.xamarin.com/show_bug.cgi?id=44521
* https://bugzilla.xamarin.com/show_bug.cgi?id=44518
* https://bugzilla.xamarin.com/show_bug.cgi?id=44516
2016-09-26 14:47:30 -04:00
Alex Soto 912ab01d1e Merge pull request #891 from dalexsoto/generator
[generator] Fix bug 37175 and bug 44322
2016-09-26 11:26:33 -05:00
Rolf Bjarne Kvinge 86e1e0e882 [mtouch] Show more information about LinkWith attributes. (#895)
* [mtouch] Fix source analysis warning about culture-aware string comparison.

* [mtouch] Show more information about LinkWith attributes.
2016-09-26 16:23:28 +02:00
Rolf Bjarne Kvinge ab14b432d2 [generator] Order the list of generated files to ease diffs. (#894) 2016-09-26 08:54:12 -04: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
Alexander Köplinger 32e87b3f9a Bump MAX_MONO_VERSION (#893)
We're using 4.9.x in mono master now.
2016-09-26 10:33:26 +02:00
Chris Hamons 4d299f35ae [XM] Add missing Javascript bindings in webkit.cs (#890)
- https://bugzilla.xamarin.com/show_bug.cgi?id=32975
2016-09-24 10:32:22 -04:00
Martin Baulig a7676cd373 Merge pull request #892 from xamarin/appletls-finish-write
[AppleTls]: Disallow calling SSLHandshake() again after the handshake has finished
2016-09-24 11:10:08 +02:00
Martin Baulig 6ed46cc6a1 [AppleTls]: Disallow calling SSLHandshake() again after the handshake has finished.
Bump Mono to pickup the BCL part of the fix.

commit 2a3e4002ead94aae6796c7eb7af9a850398beb51
Author: Martin Baulig <martin.baulig@xamarin.com>
Date:   Fri Sep 23 17:42:05 2016 +0200

    [AppleTls]: Flush the write queue before finishing the handshake.

    It is possible for SSLHandshake() to return SslStatus.Success while we're still
    having a pending write (AsyncOperationStatus.WantWrite).

    This is because our managed write callback must never return 'WouldBlock', so
    SSLHandshake() things that all data have been sent while we still have them in
    our write queue.

    When this happens, we currently flush the write queue then call SSLHandshake()
    again via AsyncOperationStatus.WantWrite -> AsyncOperationStatus.Continue.

    This returns SslStatus.Protocol on iOS 10.

    (cherry picked from commit 2cc1b887c1c6e86b6844116c8010bac3305c84f9)
2016-09-24 07:41:28 +02: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
Alex Soto bcbe813ab1 [generator] Fix bug 37175 and bug 44322
https://bugzilla.xamarin.com/show_bug.cgi?id=37175
https://bugzilla.xamarin.com/show_bug.cgi?id=44322

Sometimes iOS API is returning objects of the wrong type for example

- (NSURLSessionDownloadTask *)downloadTaskWithRequest:(NSURLRequest *)request

It clearly states that it will return an NSURLSessionDownloadTask
instance, but yet it returns a NSURLSessionTask and we throw an
InvalidCastException when creating the managed object. This is
fine in ObjC but for us in a type-safety context is not.

Introducing ForcedTypeAttribute when applying this attribute
we will use GetINativeObject instead of GetNSObject which
the former does not perfom a type check on the underlying object
2016-09-23 17:53:22 -05:00
Rolf Bjarne Kvinge 85cead2337 [mtouch] Don't use nested Parallel.ForEach loops. (#888)
The nested Parallel.ForEach loops don't take into account the outer
MaxDegreeOfParallelism value, causing us to spawn more concurrent tasks than
we want to.

So refactor the code to have one static list of tasks, which each subtask adds
to.
2016-09-23 16:03:23 -04:00
Chris Hamons fa18df5710 Fix build warning (#889) 2016-09-23 14:27:53 -05:00
Sebastien Pouliot 3983064ae5 [mtouch] Update script to use mono64. Fixes #44122 and others (#887)
Our move to open source and the mtouch/mlaunch split changed mtouch from
a 64bits to a 32bits application (because mono is, by default, still
32bits on OSX).

That's the cause for several recent bugs

* https://bugzilla.xamarin.com/show_bug.cgi?id=44122
* https://bugzilla.xamarin.com/show_bug.cgi?id=44521
* https://bugzilla.xamarin.com/show_bug.cgi?id=44518
* https://bugzilla.xamarin.com/show_bug.cgi?id=44516
2016-09-23 14:22:00 -04:00
Sebastien Pouliot 4ab726601b Bump mono to mono-4.6.0-branch-c8sr0/8c9e34069f63e516038cd12a237d648079789622 2016-09-23 14:16:28 -04:00
Sebastien Pouliot 4d05122bb9 Bump watch-mono for socket fix #44666 2016-09-23 13:27:34 -04:00
Sebastien Pouliot 298cdbaf4c Bump mono for socket fix #44666 2016-09-23 13:27:21 -04: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 12ad32b7f7 [apidiff] Update references files to match XI 10.0 (C8) (#813) 2016-09-23 13:02:18 -04:00
Sebastien Pouliot eb91e692a6 [mtouch] Update script to use mono64. Fixes #44122 and others (#887)
Our move to open source and the mtouch/mlaunch split changed mtouch from
a 64bits to a 32bits application (because mono is, by default, still
32bits on OSX).

That's the cause for several recent bugs

* https://bugzilla.xamarin.com/show_bug.cgi?id=44122
* https://bugzilla.xamarin.com/show_bug.cgi?id=44521
* https://bugzilla.xamarin.com/show_bug.cgi?id=44518
* https://bugzilla.xamarin.com/show_bug.cgi?id=44516
2016-09-23 12:55:11 -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
Sebastien Pouliot 2b0370d4a1 Revert "Stay on 10.0.0.x for SR0"
SR0 (beta) build was still on 10.0.1.x

This reverts commit a2876c1739.
2016-09-23 08:58:14 -04:00
Rolf Bjarne Kvinge 7656a92756 Revert "[mtouch] Don't use nested Parallel.ForEach loops." (#886) 2016-09-23 14:35:43 +02:00
Rolf Bjarne Kvinge fc55e4306f [mtouch] Don't use nested Parallel.ForEach loops. (#881)
The nested Parallel.ForEach loops don't take into account the outer
MaxDegreeOfParallelism value, causing us to spawn more concurrent tasks than
we want to.

So refactor the code to have one static list of tasks, which each subtask adds
to.
2016-09-23 07:02:11 +02:00
Sebastien Pouliot d7d3c82d1d Bump Xcode to 8.1 beta 1 2016-09-22 14:40:29 -04:00
Rolf Bjarne Kvinge 02818182f1 [Foundation] Add a few missing NSAttributedString methods to watchOS. Fixes #44455. (#880)
https://bugzilla.xamarin.com/show_bug.cgi?id=44455
2016-09-22 13:11:50 -04:00
Jeffrey Stedfast 5922215e72 [msbuild] Add watch-companion to UIRequiredDeviceCapabilities for watchOS1 extensions (#868)
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=44257
2016-09-22 19:09:10 +02:00
Rolf Bjarne Kvinge 388e62ef49 [WatchKit] Bind [WKInterfaceDevice preferredContentSizeCategory] as PreferredContentSizeCategoryString. Fixes #44456. (#878)
https://bugzilla.xamarin.com/show_bug.cgi?id=44456
2016-09-22 18:08:42 +02:00
Rolf Bjarne Kvinge 88a9b809d2 CFNetworkHandler is not a valid http message handler for watchOS, so show a helpful message if someone tries. (#879) 2016-09-22 18:08:16 +02:00
Artur Shamsutdinov 351bb29f0c [corewlan] Added CWWiFiClient class. (#853) 2016-09-22 09:39:57 -04:00
Rolf Bjarne Kvinge 0db1fe1ff2 [mtouch] Add support for -j X to specify concurrency. (#876) 2016-09-22 09:21:20 -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 1412b5bbed Remove any code related to the IL registrar. (#874)
We've used the dynamic registrar for years now when selecting the IL registrar
(and I've never heard about anybody doing it), so just remove all the related
(and in fact dead) code.
2016-09-22 14:27:54 +02:00
Rolf Bjarne Kvinge fc72efdea0 [tests/scripted] Convert to Unified. (#875) 2016-09-22 14:27:38 +02:00
Rolf Bjarne Kvinge 7e3cc1f376 [mtouch-errors] Suggest disabling incremental builds to work around MT3001. (#872) 2016-09-22 10:37:02 +02:00