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

4543 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge f54aa3b84b Remove unused file. 2018-08-01 17:11:07 +02:00
Rolf Bjarne Kvinge b5a8124684 Move Blocks.SimpleCall into NWConnection.Batch.
It's not worth it to have a helper function (Blocks.SimpleCall) for a single
API (NWConnection.Batch( that will never be widely used, when the cost is a
static field and the corresponding eternal memory usage for every app that
uses blocks at least once (which is pretty much every app).
2018-08-01 17:11:07 +02:00
Rolf Bjarne Kvinge c10a3d5742 Use 'ref BlockLiteral' in P/Invokes instead of unsafe code whenever we don't need to pass null blocks.
This makes it possible to avoid a lot of unsafe code, and additionally it
simplifies the block code greatly.
2018-08-01 17:11:07 +02:00
Rolf Bjarne Kvinge def474d3ac Don't leak blocks if GetCheckedHandle throws. 2018-08-01 17:11:07 +02:00
Rolf Bjarne Kvinge b539083d6d Fix typo. 2018-08-01 17:11:07 +02:00
Rolf Bjarne Kvinge 1091ff9dcc Don't dispose the same object twice. 2018-08-01 17:11:07 +02:00
Rolf Bjarne Kvinge ab8b84c43e Make NativeObject.handle a private field.
* This is how it's defined in the RFC (#3582).
* It forces us to call InitializeHandle (or use the property setter, which
  does the same thing), which makes it impossible to create broken types
  (instantiating C# wrapper objects successfully, but with a null handle)
2018-08-01 17:11:07 +02:00
Rolf Bjarne Kvinge 302c880d1e Avoid repeated null checks when the variable has been null-checked earlier in the method. 2018-08-01 17:11:07 +02:00
Rolf Bjarne Kvinge 4d7a166c41 Avoid double 'as'. 2018-08-01 17:11:07 +02:00
Rolf Bjarne Kvinge 06e4426e1c Use INativeObject.GetHandle in a few places to simplify code.
Since INativeObject.GetHandle is an extension method that can detect a null
'this' value and returns IntPtr.Zero.
2018-08-01 17:11:07 +02:00
Rolf Bjarne Kvinge a6efd56402 Rename NativeObject.GetHandle to NativeObject.GetCheckedHandle.
Two reasons:

* NativeObject.GetHandle looks too much like the existing
  INativeObject.GetHandle, which has a different behavior.
* It's not clear from the name that it can easily throw exceptions. This
  becomes particularly important with resource management (ensuring we don't
  leak stuff if calling the method happens to throw an exception).
2018-08-01 17:11:07 +02:00
Rolf Bjarne Kvinge df11c128bb Simplify the block creation pattern.
This should have no functional changes.
2018-08-01 17:11:07 +02:00
Rolf Bjarne Kvinge e04d7fdf9d Use nuint instead of IntPtr for size/length parameters. 2018-08-01 17:11:07 +02:00
Rolf Bjarne Kvinge 2f5e14434f Add a BlockLiteral.GetTarget method and use it to simplify code (and make it less unsafe as well). 2018-08-01 17:11:07 +02:00
Rolf Bjarne Kvinge f5914589e1 CoreFoundation: consistently use nuint instead of mixed (u)long usage.
This also fixes a few P/Invokes that were incorrectly bound with (u)long instead of nuint.
2018-08-01 17:11:07 +02:00
Rolf Bjarne Kvinge 63163714f5 Added some code review comments. 2018-08-01 17:11:07 +02:00
Rolf Bjarne Kvinge ca9b61693c NWError: don't double retain, base class already does it. 2018-08-01 17:11:07 +02:00
Rolf Bjarne Kvinge a605baca62 Fixed compiler warnings by removing unused variables. 2018-08-01 17:11:07 +02:00
Rolf Bjarne Kvinge 06eda3504c Fix whitespace, add comma after last enum value, and fix a few other style issues. 2018-08-01 17:11:07 +02:00
Rolf Bjarne Kvinge 05340241ed Merge remote-tracking branch 'origin/xcode10' into xcode10-network 2018-08-01 17:10:36 +02:00
Manuel de la Pena 96509612d0 Merge branch 'xcode10-network' of github.com:migueldeicaza/xamarin-macios into xcode10-network 2018-08-01 16:56:44 +02:00
Manuel de la Pena 00eedb9381 [Network] Ensure NWAdvertiseDescriptor does take the type when exposing
a service.

As per documentation the NWAdvertiseDescriptor CreateBonjourService
should always get a type. Added the change which fixes the introspection
failures.
2018-08-01 16:55:06 +02:00
Miguel de Icaza b9ee7a93d7 [Network] Undo the change that uses Runtime.GetINativeObject as discussed with the team, it is just slower and does not fetch a cached object as originally assumed 2018-08-01 10:50:51 -04:00
Alex Soto b808213465 [Vision] Update bindings to Xcode 10 beta 1, nothing in beta 2 (#4321) 2018-08-01 10:50:13 -04:00
Miguel de Icaza 49bb4aa0ca Xcode10 CoreGraphics B1-B5 (#4198)
* [CoreGraphics] Add first batch of Xcode10 APIs, added an enum that we did not surface before

* [xcode10] CoreGraphics support

* Fix whitespace/formatting and add comma after last enum value.

* Make CFPropertyList follow normal INativeObject creation pattern.

* Make CFPropertyList.AsData return the error as a tuple.

* Fix CFPropertyList.AsData to not leak.

* CFPropertyList.Value: use Runtime.GetNSObject so that we don't accidentally create duplicate wrappers for the same native object.

* [CoreGraphics] Update to beta 5.

* Update xtro definitions.

* Add tests.

* Don't compare value type with null.

* Use PascalCase for named return tuples.

* [CoreFoundation] Make CFPropertyList enums native and fix code accordingly.

* [tests] Fix fetching 64-bit int to actually fetch a 64-bit int and not a nint.

* [tests] Teach introspection's ApiCMAttachmentTest about CFPropertyList.
2018-08-01 16:25:40 +02:00
Vincent Dondain 52aae1858b [homekit] Remove export for 'RemoveUser' (iOS prohibited) (#4542)
We want to remove the native API because it's prohibited and Apple could reject apps with it. Therefore we exposed empty stubs to avoid breaking the API.
2018-08-01 08:13:49 -04:00
Sebastien Pouliot 7f30793364
[scenekit] Update for beta 5 (#4541) 2018-08-01 08:13:21 -04:00
Sebastien Pouliot b13347b1be
[storekit] Update for beta 5 (#4535) 2018-07-31 21:50:55 -04:00
Vincent Dondain 1ffa311117 [coreml] Update for Xcode 10 beta 5 (#4534) 2018-07-31 21:50:40 -04:00
Sebastien Pouliot c682959deb
[tvos][tvuikit] Update for beta 5 (#4533) 2018-07-31 21:50:10 -04:00
Vincent Dondain 021be4890b [modelio] Update for Xcode 10 beta 5 (#4536) 2018-07-31 21:25:30 -04:00
Sebastien Pouliot c987e054e3
[passkit] Update for beta 5 (#4537) 2018-07-31 21:22:30 -04:00
Vincent Dondain 839c26e21d [arkit] Add ARAnchorCopying protocol (#4523)
Even if empty this protocol will help with tests and subclasses.
2018-07-31 21:20:16 -04:00
Miguel de Icaza 4f33e6ab7b [CoreFoundation, Network, Security] Address review comments
* CoreFoundation/DispatchData: avoid possible integer overflow

* Network: move attributes for types introduced in Xcode10 from the
  members to the types.

* Network: for callbacks that surface INativeObjects, rather than using

* Hide P/Invokes that are not currently surfaced so xtro tests can track this

* guidelines: Ip -> IP

* SecIdentity2: fix a leak by releasing the returned array, check for handle being null.

* SecTrust2: check for handle being null.
2018-07-31 16:30:23 -04:00
Chris Hamons 65b1d0cfb5
AppKit 10b4 (#4488) 2018-07-31 15:17:25 -05:00
Sebastien Pouliot fe159bda2d
Update for xcode 10 beta 5 (#4527) 2018-07-31 08:49:19 -04:00
Vincent Dondain a9229354d2 [xtro] Update makefile to call u2todo.cs (#4529) 2018-07-30 21:39:56 -04:00
Vincent Dondain 53d7e23c46 [arkit] Introduce runWithConfiguration: (#4521)
The comment: "'runWithConfiguration:' selector marked as unavailable in Xcode 9 beta 5"
was *wrongly* referencing 'NS_SWIFT_UNAVAILABLE("Use run(_:options:) instead")'. However that applies to swift and not objective-c, this selector is valid and lets users skip the options.

Note: tested with real-world ARKit app.

* Add None to ARSessionRunOptions
2018-07-30 08:25:57 -04:00
Miguel de Icaza b8cf7b2bd8 Merge remote-tracking branch 'remotes/origin/xcode10' into xcode10-network 2018-07-27 13:45:55 -04:00
miguel 70ffd63b05 Blindly try to get this to build 2018-07-27 08:49:07 -04:00
Sebastien Pouliot 3bb8f82e19
[coreimage] Add new CISaliencyMapFilter from beta 4 (#4513) 2018-07-27 08:27:23 -04:00
Sebastien Pouliot 6ba08239a7
Bump mono to fix (2nd part) watchos calling convention (#4514) 2018-07-27 08:27:09 -04:00
Miguel de Icaza 804e4f1e38 [tests] ApiCMAttachmentTest add custom tests for SecTrust2 and SecIdentity2 2018-07-26 14:54:09 -04:00
Rolf Bjarne Kvinge 7b8a7a3ced
[CoreBluetooth] Add availability attributes for CBUUID.CBUUIDValidRangeString. (#4508)
Fixes introspection on macOS 10.7-10.11.
2018-07-26 15:04:58 +02:00
Sebastien Pouliot 0402ef3f2f
[watchos][intents] Enable MediaPlayer related API (now enabled for watchOS) (#4505) 2018-07-26 08:38:12 -04:00
Miguel de Icaza 185a599ce8 [Network] Tests, use proper constructor 2018-07-25 11:43:00 -04:00
Rolf Bjarne Kvinge 72124256f9
Merge pull request #4501: Use libc++ instead of stdlibc++ for Xamarin.Mac too.
Use libc++ instead of stdlibc++ for Xamarin.Mac too.

See 0d31720770 for more info.

Also revert a series of commits that bumps min macOS version from 10.7 to 10.9
2018-07-25 17:10:21 +02:00
Rolf Bjarne Kvinge f12c7259a8
Revert "[mtouch] Work around broken tvOS headers in Xcode 10 beta 1." (#4502)
This reverts commit 663eaeb389.
2018-07-25 16:00:22 +02:00
Jeffrey Stedfast 5e5e5382eb [msbuild] Xcode10 changed the copySceneKitAssets command-line arguments (#4469) (#4499)
Fixes https://github.com/xamarin/xamarin-macios/issues/4467
2018-07-25 08:23:29 -04:00
Rolf Bjarne Kvinge 03d4dc0aca Revert "Temporarily bump the MIN_OSX_SDK_VERSION to 10.9 to avoid SceneKit compilation issues"
This reverts commit 63a4f19356.
2018-07-25 11:56:41 +02:00