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

56 Коммитов

Автор SHA1 Сообщение Дата
Sebastien Pouliot 9f90691820
[mtouch] Add the option of always weak link a framework. Fixes #4628 (#4641)
Linking with CoreNFC crash applications on iOS 12 on iPad (and likely
other device not supporting, or supported, for NFC).

This used to work on iOS 11.x (when introduced). The solution is to
always **weak** link CoreNFC (since we can't guess devices)

https://github.com/xamarin/xamarin-macios/issues/4628
2018-08-20 08:34:29 -04:00
Manuel de la Pena 7c7f46da28
[iTunesLibrary] Xcode 10 beta 3 support. (#4462) 2018-08-08 16:34:16 +02: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
Miguel de Icaza b8cf7b2bd8 Merge remote-tracking branch 'remotes/origin/xcode10' into xcode10-network 2018-07-27 13:45:55 -04:00
Miguel de Icaza d5248e6bb4 Merge remote-tracking branch 'remotes/origin/xcode10' into xcode10-network 2018-07-24 11:11:24 -04:00
Manuel de la Pena 60398bf53b
[MediaPlayer] Xcode 10 beta 2 support. (#4387) 2018-07-10 18:38:19 +02:00
Miguel de Icaza ee4faee1c9 [Network] Declare the Network library in the relevant places 2018-07-05 15:01:47 -04:00
Manuel de la Pena fce1e4c135 [NaturalLanguage] Xcode 10 beta 3 update. (#4390) 2018-07-04 14:43:00 -04:00
Sebastien Pouliot b63f668a4e
[tvos][tvuikit] Add new TVUIKit (up to beta 2) (#4346) 2018-06-28 08:51:38 -04:00
Manuel de la Pena 145237dd7a
[UserNotifications] Add Xcode 10 support. (#4290) 2018-06-19 07:39:55 +02:00
Alex Soto 3aa2167928
[IdentityLookupUI] Add bindings for Xcode 10 Beta 1 (#4281) 2018-06-15 20:46:35 -05:00
Sebastien Pouliot f9a0253e71
[videosubscriberaccount] Update for beta 1 (#4275)
This ended up enabling the framework for macOS.
2018-06-15 16:43:23 -04:00
Manuel de la Pena f77f44940e
[NaturalLanguage] Added the new framework for Xcode10. (#4236) 2018-06-14 19:21:44 +02:00
Sebastien Pouliot 5784f8daee
[authenticationservices] New iOS-only framework added in beta 1 (#4234) 2018-06-13 14:06:37 -04:00
Alex Soto 20f5d952a9
[CarPlay] Adds Xcode 10 Beta 1 Bindings (#4217)
* [CarPlay] Adds Xcode 10 Beta 1 Bindings

* Adds [DisableDefaultCtor] to CPVoiceControlTemplate

* Implement feedback
2018-06-12 12:12:20 -07:00
Sebastien Pouliot 7372f627ad
[adsupport] Update for beta 1 (#4213) 2018-06-12 05:19:16 -07:00
Sebastien Pouliot 45ae4c53ce
[tests] Add introspection tests to ensure there are native linking instructions for all frameworks. Fixes #3976 (#4194) (#4208)
* [tests] Add introspection tests to ensure there are native linking instructions for all frameworks. Fixes #3976

or a good, documented (in test code) reason for not needing it.

https://github.com/xamarin/xamarin-macios/issues/3976

* Fix failures

- static registrar failed on 32bits because one type in PhotoUI missed
  its `onlyOn64: true`

- link with the top, not the sub-frameworks

* [tvos] Fix mistakes in tvOS where some extranous types triggered unrequired/unavailable (or missing) frameworks

* [watchos] Fix watchOS frameworks mapping
2018-06-11 08:01:41 -07:00
Sebastien Pouliot 9208e9a0a4 Add xcode9.4 support into 15.7
The PR is not final and cannot be merged until the final Xcode 9.4
release from Apple is available.

Since there's no macOS specific changes (at least up to beta 2) we can
directly merge into the _normal_ milestone branch and avoid having
separate branches to maintain for XI and XM (until 15.8).
2018-05-03 13:55:11 -04:00
Alex Soto 6a2614a68b [BusinessChat] Make mtouch and mmp aware of BusinessChat framework (#3882) 2018-04-05 18:33:02 -05:00
Alex Soto db6cfeca20
[BusinessChat] Make mtouch and mmp aware of BusinessChat framework (#3882) 2018-04-05 15:38:28 -05:00
Alex Soto 347160cf51
[ClassKit] Add Xcode 9.4 Beta 1 Bindings (#3853)
* [ClassKit] Add Xcode 9.4 Beta 1 Bindings

* ClassKit moved to v11.4 or we'd link against a private frmework in 11.3

* Turn CLSPredicateKeyPath into a static class

CLSPredicateKeyPath does not make much sense as an enum, we'll use
a static class instead so we do not have to call GetConstant() and
use the NSString directly.

Sample code using CLSPredicateKeyPath:

```csharp
var store = CLSDataStore.Shared;
var predicate = NSPredicate.FromFormat ("%K = %@", CLSPredicateKeyPath.Parent, store.MainAppContext);
var ctxs = await store.FindContextsMatchingAsync (predicate);
foreach (var ctx in ctxs) {
	Console.WriteLine (ctx.Title);
}
```

* [tests] Exclude WeakTopic incorrect check, bound as smart enum
2018-04-05 10:20:05 -05:00
Chris Hamons c0202e0e2b
PMCS Removal (#3197)
You were the preprocessor we wished C# had natively

Removing PMCS requires these changes:
* Remove XamCore from src/
* Remove XamCore from tools/
* Remove XamCore from runtime/
* nint/nuint enum conversion
* _compat_ enum conversion
* NSAction conversion
* Hand fix single API incorrectly converted by PMCS to unbreak compatibility
   - Due to a bug in PMCS, the nuint was incorrectly converted in this API.
   - However, as that ship as sailed, we must "fix" it until XAMCORE_4_0
* Update readme
* Bump macios-binaries
2018-02-05 10:26:29 -05:00
Timothy Risi 87f9e23989 [MetalPerformanceShaders] Xcode 9 bindings (#3005)
* [MetalPerformanceShaders] Activate bindings for Xamarin.Mac and add n… (#2816)

* [MetalPerformaceShaders] Several MPSCnnKernel properties should be readonly (#2938)

The subclasses versions of the properties need Override, cannot be removed since it would break visibility for iOS 10

* Remove some [Model] attributes that sholdn't be needed

* Fix introspection test crashes

* More introspection fixes

* NN does not need to be PascalCased

Remove unneeded Models and BaseTypes

* PR Whitespace fixes and renamings

* Paste fail

* More fixes from PR comments

* [MPS] Adds new intro test, fixes ctors and xtro output

* Removes duplicated availability attributes.
* Removes obsoleted API from macOS since mps is new to it.
* Fixes xtro output.
* Adds missing API.
* Fixes parameterless ctors, some of them do not really work, found
  by our new intro test and disabled the one that seem to not make
  sense due to the presence of DesignatedInitializers.
* Fixes a selector typo.
* Adds new `ShouldNotExposeDefaultCtorTest` to intro.

ShouldNotExposeDefaultCtorTest
==============================

This test checks for types with a parameterless ctor that are subclasses
of `NSObject` and then cheks if the BaseType of said objects also expose
a parameterless ctor (all in .NET land), if this is not the case it reports
them and so they can manually audited. Also this test has the ability to
print alloc/init ObjC code by setting `genObjCTestCode` to `true` so you can
take this code into an Xcode project and easily tests the ctors.

It seems that xtro (sharpie) does not have a complete picture of when a ctor
must be exposed hence the hability to generate this code and manually test.

Right now this test is just enabled for MPS since it is the scope of this PR.
In the future it should be enabled for all other frameworks and the output be
manually audited.

* [MPS] Fixes premature collection possible in bindings (bug 59547) and implements feedback.

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

* Fixes premature collection possible in bindings im MPSKernel.cs
* Fixes MPSImageHistogramTest from using deprecated API.
* Removes renamed selectors and typos from ApiSelectorTest and ApiTypoTest.

* [MPS] Reenable Copy API and DesignatedInitializer xtro feedback

* Implement more feedback

* More feedback
2017-11-28 14:29:05 -06:00
Sebastien Pouliot a74174eb65 [iosurface] IOSurface is not usable before iOS/tvOS 11. Fixes #59201 (#2706)
Apple rejects apps that links with the previously private IOSurface.framework.
We were not sure about this [1] and had it disabled (this is removed).

However another bug stopped our adjustment logic [2] from being executed. This
is needed since `clang` picks up the private framework if it does not find the
public one (even when asking for a weak framework),

[1] https://bugzilla.xamarin.com/show_bug.cgi?id=59201
[2] Added a while ago for JavascriptCore
2017-09-14 23:34:55 -04:00
Rolf Bjarne Kvinge f081bd5c20 [mtouch] Teach mtouch about the 'IOSurface' framework for tvOS. Fixes #59333. (#2630)
https://bugzilla.xamarin.com/show_bug.cgi?id=59333
2017-09-11 07:23:53 +02:00
Miguel de Icaza c453776ac0 [Xcode9] Add IOSurface bindings (#2363)
* This framework was a private framework before iOS 11.

This framework was a private framework before iOS 11, yet the headers claim
many API were introduced in iOS 10.

So take account of this difference by using the private framework location in
iOS 10.3 or earlier.

Testing these API from Xcode works fine when run on an iOS 10.3 device, and
I've confirmed the IOSurface framework is loaded from the private frameworks
path on older devices (and when built using Xcode 9 and linked with the public
framework path).

* Disable code to make IOSurface work on iOS 10.

Disable the code to make IOSurface work on iOS 10, since it may be rejected by
the App Store.

This also means adjusting the availability attributes, so that the
introspection tests pass (and to document that technically these API won't
work when used with Xamarin.iOS in iOS 10).

I've filed bug #[59201][1] to keep track of this, maybe we can re-enable this later.

[1]: https://bugzilla.xamarin.com/show_bug.cgi?id=59201
2017-09-05 08:57:58 -04:00
Alex Soto 1cbac6a367 [PDFKit] Update to Xcode 9 Beta 1, 2, 3 & 4 (#2378)
* [PDFKit] Update to Xcode 9 Beta 1, 2, 3 & 4

* [PDFKit] Implement feedback

* [PDFKit] the forgotten enum

* [PDFKit] More feedback

* [PDFKit] Add Mac changes

* Missing change

* Fix test RectangleF VS CGRect
2017-08-04 08:06:21 -05:00
Alex Soto ff87ac1197 [FileProviderUI] Add Xcode 9 Beta 1 to 3 bindings (#2356) 2017-07-24 10:12:30 -05:00
Alex Soto 5467bb668a [FileProvider] Add Xcode 9 Beta 1, 2 & 3 Bindings (#2279)
* [FileProvider] Add Xcode 9 Beta 1 Bindings

* Better naming

* Feedback not related to BindAs

* [FileProvider] Removes BindAs, add manual code for it and updated to Beta 3

* [FileProvider] Implement feedback
2017-07-20 10:16:46 -05:00
Alex Soto 89071bc19d [Vision] Add bindings for Xcode 9 Beta 1, 2 & 3 (#2301)
* [Vision] Add bindings for Xcode 9 Beta 1 & 2

This commit also adds two convenience overloads to GetAttachments
that allows you to get a more strongly typed version of the
returned dictionary, this is needed because there is no easy way
to downcast from NSDictionary to NSDictionary<TKey, TValue>
and it is used in the sample that excecises the Vision API found here

https://github.com/dalexsoto/FaceDetector

* [Vision] Implement feedback

* Add commas to enums to avoid diff spam
* Throw a managed exception when we fail to dinamically call Vision framework

* [Vision] Update to xcode 9 Beta 3

* [vision] fix VNImageCropAndScaleOption enum

Also removed public modifier from enums in order to have interfaces
and enums in sync

* [Vision] Add missing comma to enum

* [Vision] More API enhancements

* Removed default .ctor from types that are not user created
* Added Strong Dictionary to VNImageRequestHandler ctors
* Turned VNImageOption into a StrongDictionary
* Added bug report[1] for BarcodeDescriptor so we do not forget
* Removed duped metadata from manual bindings
* VNDetectedObjectObservation subclasses now have the factory
  method FromBoundingBox inherited from its parent class
  (VNDetectedObjectObservation).

[1]: https://bugzilla.xamarin.com/show_bug.cgi?id=58197

* [Vision] Merge extern API with wrappers, fixed intro!

* [Vision] Add one missing public accessor to VNUtils
2017-07-18 11:12:10 -05:00
Alex Soto f34b61da2b [CoreML] Add Xcode 9 Beta 1 bindings (#2275)
* [CoreML] Add Xcode 9 Beta 1 bindings

* Do not C# 7 here... :'(

* No C# 7 here either :'(

* Apply feedback

* [CoreML] Fix feedback and xtro

* [CoreML] Add more feedback

* Fix build.... What the heck was I thinking, always rebuild your stuff...
2017-06-30 17:35:30 -05:00
Alex Soto 56af0689da [IdentityLookup] Adds Xcode 9 Beta 1 bindings 2017-06-29 21:21:53 -05:00
Alex Soto cb3446464b [DeviceCheck] Add Xcode 9 Beta 1 bindings 2017-06-28 23:03:18 -05:00
Vincent Dondain ad906427ea [arkit] Update for iOS 11 beta 1 (new framework) (#2187)
- Fixed the generator to avoid `ARKit/ARSCNViewDelegate.g.cs(189,43): error CS0432: Alias 'Iglobal' not found`.
- ARPointCloud can be tested with this [sample](https://github.com/VincentDondain/ios-testcases/tree/master/ARPointCloudTest).
  It requires deploying on devices and moving the camera around so ARKit can return some points. After 5 seconds it should print the points.
- Fixed intro tests.
- Fixed `bindings-generator.cs` for new simd types.
2017-06-22 19:02:17 -05:00
Alex Soto 72332b4ae6 [CoreNFC] Add CoreNFC Xcode 9 Beta 1 Bindings (#2226)
* [CoreNFC] Add CoreNFC Xcode 9 Beta 1 Bindings

CoreNFC is not exposed in iOS simulator, no framework/headers are found
makes sense since there is no NFC chip on it.

CoreNFC says it is available on tvOS but headers says just 3 enums
are so not enabling tvOS in this first beta.

* [mtouch] CoreNFC not available on sim, this makes mtouch aware of it
2017-06-19 13:56:00 -05:00
Rolf Bjarne Kvinge 0dd385d81f [mtouch] Link with AVFoundation in watchOS apps when needed. Fixes #56862. (#2143)
The AVFoundation framework's headers used to be broken in the simulator SDK
([1], [2]) until watchOS 3.2 (Xcode 8.3) fixed it. This means it's now safe to
use AVFoundation.

Additionally set the initial SDK version where this framework was introduced
to 3.2 for simulator builds, which means that if customers try to use it (with
an old Xcode), they will get a nice-ish error:

> MTOUCH : error MT4134: Your application is using the 'AVFoundation' framework, which isn't included in the watchOS SDK you're using to build your app (this framework was introduced in watchOS 3.2, while you're building with the watchOS 3.1 SDK.) Please select a newer SDK in your app's watchOS Build options.

instead of an ugly:

> MTOUCH : error MT4109: Failed to compile the generated registrar code. Please file a bug report at http://bugzilla.xamarin.com

the error message is slightly incorrect (the problem is only with the
simulator SDK, not the device SDK), but this should happen very rarely (it
only occurs if all of the following are true: using AVFoundation + in a
simulator build * the static registrar manually selected), so IMHO a more
accurate error description isn't worth it.

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

[1] 7149661251
[2] https://openradar.appspot.com/29131674
2017-05-31 13:10:51 +02:00
Alex Soto f833bbc6ff Add Intents and VideoToolbox to registrar and fix version check (#1733)
A fix (thanks Rolf!) in how we do SDK version checks is needed
because for some reason `new Version (3, 2, 0)` isn't the same to
`new Version (3, 2)` and we end up with a MT4134 when building the
watchOS static registrar.
2017-03-28 09:50:08 -05:00
Rolf Bjarne Kvinge d1102c800e [mtouch] Remove most static state and put it on an instance. (#1398)
* [mtouch] Remove most static state and put it on an instance.

Remove most static state, and put it on an instance (of Application) instead.

Soon we'll build multiple apps (app extensions) in the same process, and we
need to make sure we're not inadvertedly (and incorrectly) sharing state
between apps, so remove as much static state as possible to avoid any
problems.

* [mtouch] Rename GetIsUsingClang -> IsUsingClang.
2016-12-23 18:50:35 +01:00
Sebastien Pouliot b5632f9c2f merge xcode8.2 into master 2016-12-12 21:26:23 -05:00
Rolf Bjarne Kvinge cf0be91860 [mtouch] CoreAudioKit didn't exist in the simulator until iOS 9. Fixes #44996. (#998)
https://bugzilla.xamarin.com/show_bug.cgi?id=44996
2016-10-14 18:56:08 +02:00
Sebastien Pouliot 7149661251 [mtouch|mmp] Add missing frameworks with platform versions (#703)
note: AVFoundation is commented on watchOS 3 as this breaks the static
registrar .a helper built for watchOS.

AVFoundation does a file check to enable some types - but the watchSimulator
include that file, leading to compilation errors later (missing CMTime.h)

	#if TARGET_OS_WATCH
	#if ! __has_include(<AVFoundation/AVAnimation.h>)
	#define AVF_IS_WATCHOS_SDK 1
	#endif
	#endif
2016-08-29 19:22:34 -04:00
Sebastien Pouliot 89ffd0c7a8 [tvos][photos[ui]] Enable both Photos[UI] frameworks in mtouch for tvOS (#581) 2016-08-09 15:39:15 -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
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 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
Alex Soto af8289880e [IntentsUI] Add IntentsUI framework from Xcode 8 b2 (#400) 2016-07-14 20:42:48 -04:00
Alex Soto aef1775532 [Intents] Add Intents bindings from Xcode 8 b2 2016-07-14 04:02:12 -05:00
Sebastien Pouliot b16a95b0d1 [tvos] Enable MultipeerConnectivity and ReplayKit frameworks, existing in iOS but just added in tvOS 10 (#361)
* Xcode 8 beta 2 tvOS SDK does not ship ExternalAccessory headers for the simulator (but the framework itself is present) so it's not yet enabled (causing registrar build issues)

https://trello.com/c/2e2VdbGR/49-27266975-externalaccessory-header-files-are-missing-for-appletvsimulator

* MapKit was not added for 9.2 - it's added now (and will be fixed in master/cycle8 later)
2016-07-10 11:15:45 -04:00
Alex Soto 074c4f6530 [UserNotificationsUI] Add UserNotificationsUI framework from xcode 8 beta 1 2016-07-04 14:41:22 -05:00
Alex Soto 046a3fad30 [UserNotifications] Add UserNotifications framework xcode 8 beta 1 2016-07-04 14:39:45 -05:00