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

131 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge 344dadb212
Bump the minimum iOS version to 7.0. Fixes #6213. (#6878)
Xcode 11 doesn't support anything below iOS 7.0 (the linker will automatically
change the deployment target to 7.0), so we need to drop support as well
(since our native bits will be targetting iOS 7.0, and we can't change that).

https://github.com/xamarin/xamarin-macios/issues/6213
2019-08-30 01:07:30 -07:00
prmallic fb225bbbdd
[UIKit] Fix threading issue in the selector performAsCurrentTraitCollection. #6870 (#6872)
The thread safe decorator was missing which made the API not behave like the Apple docs states.

https://github.com/xamarin/xamarin-macios/issues/6870
2019-08-29 09:25:59 -04:00
Sebastien Pouliot fac23dc599
[xcode11] Update with Xcode 10.3 changes and fix intro on iOS 12.4 (#6851)
Xcode 10.3 was released over the summer with a very small subset
of the (already out) Xcode 11 betas API.

This PR fix some availability attributes and also ensure we can
run introspection tests successfully on an iOS 12.4 device.
2019-08-27 08:38:12 -04:00
Alex Soto a0b73b6663
[UIKit] Update bindings to Xcode 11 Beta 6 (#6807)
* [UIKit] Update bindings to Xcode 11 Beta 6

* Update src/uikit.cs

* Apply suggestions from code review

* Update src/uikit.cs

* Update src/uikit.cs

* Update src/uikit.cs
2019-08-20 21:55:08 -04:00
Sebastien Pouliot 04263f36d4
[contactsui] Update for Xcode 11 beta 1 to 5 (#6771)
Mark the `iconWithContact:` API as not available with Catalyst

Note that the category `UIApplicationShortcutIcon (ContactsUI)` was
inlined in UIKit's `UIApplicationShortcutIcon` so only that file needs
to be updated.
2019-08-14 22:03:52 -04:00
Sebastien Pouliot ca81952852
[fileprovider[ui]] Update for Xcode 11 beta 1 to 5 (#6759)
Moved some code from uikit.cs since the type moved a while ago. That
ease code sharing with macOS (XM) but it stays into the UIKit namespace
(for XI) until `XAMCORE_4_0` to ensure binary compatibility.
2019-08-14 08:12:07 -04:00
Alex Soto d883febff0
[UIKit] Update bindings to Xcode 11 Beta 5 (#6717) 2019-08-06 07:53:08 -04:00
Whitney Schmidt 6bdb2c6107 add [BindAs] UIWindowSceneSessionRole for UIKit (#6703) 2019-08-01 20:01:14 -04:00
Alex Soto d10d7f0370
[xcode11] Bump to Xcode 11 Beta 5 (#6684)
* [xcode11] Bump to Xcode 11 Beta 5
2019-07-30 14:16:44 -04:00
Alex Soto d095f75471
[registrar] Fix a generics type issue with dynamic registrar (#6646)
* [registrar] Fix a generics type issue with dynamic registrar

Fixes xamarin/xamarin-macios#6567

This Fixes an issue in the registrar where the dynamic registrar
misses a case to check for a NSObject constraint triggered by UIKit's
`NSDiffableDataSourceSnapshot` object.

This also enables the rest of missing bindings in UIKit for Xcode 11 B4
which also works as a test case for the registrar fix. Without this fix
introspection test would throw an `AggregateException` and also
includes `NSDiffableDataSourceSnapshotTest` to check that the created
objects are usable.

* Check for Xcode 11 in tests

* Exclude the macOS in our UIKit tests ツ
2019-07-25 05:56:39 -04:00
Alex Soto 50af930c5e
[UIKit] Update bindings to Xcode 11 beta 4 (#6618) 2019-07-19 16:24:51 -04:00
Sebastien Pouliot 7fcd8d7974 Bump for Xcode 11 beta 4 (#6603)
* Bump for Xcode 11 beta 4

xtro tests will fail until we have an update for sharpie, however
the introspection tests should be fine (with the small changes in
arkit.cs and uikit.cs)

xtro failure:

```
System.NotImplementedException: AVAudioInteger
  at (wrapper managed-to-native) Clang.Ast.AstReader.LoadInternal(Clang.Ast.AstReader,string)
  at Clang.Ast.AstReader.Load (System.String astPath) [0x00014] in /Users/builder/vsts-agent/_work/5/s/Clang/Ast/AstReader.cs:33
  at Extrospection.Runner.Execute (System.String pchFile, System.Collections.Generic.IEnumerable`1[T] assemblyNames) [0x0019a] in /Users/poupou/git/xcode11/xamarin-macios/tests/xtro-sharpie/Runner.cs:54
  at Extrospection.MainClass.Main (System.String[] args) [0x00046] in /Users/poupou/git/xcode11/xamarin-macios/tests/xtro-sharpie/Program.cs:20
```

due to

```diff
-typedef CF_ENUM(NSInteger, AVAudioSessionErrorCode) {
+typedef CF_ENUM(AVAudioInteger, AVAudioSessionErrorCode) {
```
https://github.com/xamarin/xamarin-macios/wiki/CoreAudioTypes-iOS-xcode11-beta4

* [tests] CoreText stopped reporting error when font files are missing

* Fix xtro (EnumCheck.cs) and update its data files

* Fix xtro results (due to some local changes)
2019-07-18 05:44:34 -04:00
Rolf Bjarne Kvinge c1e6ac029f [src] Remove/obsolete 'onlyOn64: true' in attributes. (#6595)
* [src] Obsolete 'onlyOn64' parameter to the availability attributes.

* [src] Remove 'onlyOn64: true' from attributes.

* [src] Adjust availability attributes.
2019-07-16 12:13:11 -04:00
Alex Soto 2d53b90723
[UIKit] Partial update to Xcode 11 Beta 1, 2 and 3 - Part 2 of ? (#6553)
* [UIKit] Partial update to Xcode 11 Beta 1, 2 and 3 - Part 2 of ?

Missing bindings for

* NSDiffableDataSourceSnapshot
* UICollectionViewDiffableDataSource
* UITableViewDiffableDataSource

due to a registrar issue git generics.

* Update src/UIKit/UIFont.cs

Co-Authored-By: Rolf Bjarne Kvinge <rolf@xamarin.com>

* Update src/uikit.cs

* More feedback

This also disables

* FloatRangeTest.Equals
* FloatRangeTest.ManagedVersusNative

due to https://github.com/xamarin/maccore/issues/1885

* [UIKIt] Start fixing `UITextWritingDirection` situation

But the complete fix is for another time https://github.com/xamarin/xamarin-macios/issues/6573
2019-07-12 13:44:24 -04:00
Sebastien Pouliot 71a657d2c5
Bump for Xcode 11 beta 3 (#6480) 2019-07-02 23:34:24 -04:00
Alex Soto a8b90e68f0
[UIKit] Partial update to Xcode 11 Beta 1 and 2 - Part 1 of ? (#6392)
* [UIKit] Partial update to Xcode 11 Beta 1 and 2 - Part 1 of ?

Adds new classes included in Xcode 11 Beta 1 and 2, all stuff
included in this PR is up to date with Beta 2.

* Fix whitespace.

* Add tvOS availability attributes.

* UNNotificationResponse is public, it just need a using.

* Update xtro.

* [tests/.gitignore] Update ignored files

Avoid new generated csprojs

```
	tests/apitest/apitest-unified-32.csproj
	tests/apitest/apitest-unified.csproj
	tests/apitest/apitest-unifiedXM45-32.csproj
	tests/apitest/apitest-unifiedXM45.csproj
	tests/introspection/Mac/introspection-mac-unified-32.csproj
	tests/introspection/Mac/introspection-mac-unified.csproj
	tests/linker/mac/dont link/dont link-mac-unified-32.csproj
	tests/linker/mac/dont link/dont link-mac-unified.csproj
	tests/linker/mac/dont link/dont link-mac-unifiedXM45-32.csproj
	tests/linker/mac/dont link/dont link-mac-unifiedXM45.csproj
```

* Implement feedback

* More feedback

* [Tests] Fix Apple's lies in headers for tvOS

Whatch is fine
2019-06-21 18:25:04 -04:00
Sebastien Pouliot 31014b0367 [uikit] Allow `null` in `CanOpenURL` Fixes #6256
This is not documented to accept `nil` and from sharpie / headers

```csharp
	// -(BOOL)canOpenURL:(NSURL * _Nonnull)url __attribute__((availability(ios, introduced=3.0)));
	[iOS (3,0)]
	[Export ("canOpenURL:")]
	bool CanOpenURL (NSUrl url);
```

so it looks like we allowed this (it's a rather old API) based on it's
behavior (and well before nullability annotations were available)

Now since the API

* returns a `bool` value **and** `false` is better than an exception;
* was an [old bug fix](https://bugzilla.xamarin.com/show_bug.cgi?id=865);

I added a `[PreSnippet]` so our behavior does not change on newer OS

references:
* https://developer.apple.com/documentation/uikit/uiapplication/1622952-canopenurl?language=objc
* https://github.com/xamarin/xamarin-macios/issues/6256
2019-06-12 13:40:36 -04:00
Rolf Bjarne Kvinge af30ef8a7d [src] Sprinkle availability attributes for iOS 8.1, tvOS 9.0 and watchOS 2.0. 2019-05-09 13:24:50 +02:00
Vincent Dondain 86d1b42ad2 Merge branch 'xcode10.2' into master-merge-xcode10.2 2019-04-03 13:57:31 -04:00
Sebastien Pouliot 2e1c3dbea7
[uikit] Update for xcode 10.2 beta 3 (#5635) 2019-02-20 08:22:44 -05:00
Rolf Bjarne Kvinge dbd247ed38
[NSLayoutManager] Complete bindings for NSLayoutManager. Fixes #4740. (#4853)
Fix numerous issues with NSLayoutManager[Delegate]:

* The classes are available in both AppKit and UIKit, but the bindings are
  duplicated (unsuccessfully) in both appkit.cs and uikit.cs. So create a new
  xkit.cs that is shared between XI and XM, and put a shared version of the
  bindings there.

* Bind everything that hasn't already been bound (or deprecated by Apple).

* Methods that take a nullable NSRangePointer has been bound with three overloads:

	* A protected overridable (exported) method that uses IntPtr.
	* A public method without the parameter.
	* A public method with the parameter typed as 'ref NSRange'.

	This makes sure the native method can be overridden if needed, while at
	the same time making it possible to call without providing the nullable
	parameter.

* Fix numerous ugly bindings:

	* There's a great nint/nuint confusion for parameters referring to
	  'character index' and 'glyph index'. XI seems to prefer nuint, while XM
	  seems to prefer nint. Standardize on nuint, since that's how Apple
	  created them.

	* Many methods have names than sound like Objective-C. Fix them all,
	  either right away when possible, or for XAMCORE_4_0.

	* Several parameter names have been modified to comply with our naming
	  guidelines (no abbreviations).

Fixes https://github.com/xamarin/xamarin-macios/issues/4740.
2019-01-29 15:37:48 -05:00
Chris Hamons 6ebe19f630
Add xtro test for [Deprecated] attributes and fix up usages (#4966)
- https://github.com/xamarin/xamarin-macios/issues/4431
2019-01-29 15:37:48 -05:00
Alex Soto 0e8393f1f7
[UIKit] Update bindings to Xcode 10.2 Beta 1 (#5475)
* [UIKit] Update bindings to Xcode 10.2 Beta 1

* Remove the test from tvOS because it will break the build...
2019-01-25 13:01:07 -05:00
Sebastien Pouliot 8757f36ca5
Clarify usage of `[NullAllowed]` in our bindings (#5417)
First part to fix https://github.com/xamarin/xamarin-macios/issues/5416

We currently allow the `[NullAllowed]` attribute anywhere an attribute
can be used on metadata (i.e. no `AttributeUsage` is used).

However the generator only process the attribute in some specific cases,
*silently* ignoring others. This leads to situations such as

```csharp
[NullAllowed, Export ("setInputHandler:")]
void SetInputHandler (AUInputHandler handler);
```

where a `null` argument will throw an `ArgumentNullException` because
`[NullAllowed]` does not mean anything on a method declaration.

To avoid such confusion `[NullAllowed]` should be added on each parameter
(even if all of them requires it) and if a `null` return value is
possible then use `[return: NullAllowed]`.

This PR allows XI/XM bindings to be built, without error, when this
patch is applied.

```diff
diff --git a/src/generator-attributes.cs b/src/generator-attributes.cs
index 965d8469..77162253 100644
--- a/src/generator-attributes.cs
+++ b/src/generator-attributes.cs
@@ -250,6 +250,7 @@ public class IsThreadStaticAttribute : Attribute {

 // When applied to a member, generates the member as static
 // and passes IntPtr.Zero or null if the parameter is null
+[AttributeUsage (AttributeTargets.Property | AttributeTargets.ReturnValue | AttributeTargets.Parameter)]
 public class NullAllowedAttribute : Attribute {
        public NullAllowedAttribute () {}
 }
```

Note that it's unlikely we'll apply this patch _as-is_ to avoid breaking
existing projects. A better approach (in a future PR) is to have the
generator (instead of the C# compiler) issue a warning (instead of an
error) when a `NullAllowed` is ignored.
2019-01-16 09:42:45 -05:00
Sebastien Pouliot f2a05eddc7
Merge xcode10.1 into d15-9 (#5063) 2018-10-31 17:30:44 -04:00
Sebastien Pouliot 3ab481ea70 Merge xcode10.1 into master
Also update apidiff from d15-9 since it's both frozen and includes xcode10.1
2018-10-31 15:54:48 -04:00
Sebastien Pouliot cbfb047adc
Update for Xcode 10.1 final release, including last minute Pen/Tap API (#5055) 2018-10-30 21:12:54 -04:00
monojenkins 1ec90f0fe5 [uikit] Duplicate bindings for 'UIScrollView.ContentOffset' to get correct availability information. Fixes #4893 (#5007)
`ContentOffset` was moved to `UIFocusItemScrollableContainer` in iOS 12.
Since it's a new protocol it's decorated as introduced in iOS 12 - but
the API was actually already available for a long time.

The _trick_ is to keep the original binding inside `UIScrollView`
so it overrides the protocol and keeps the correct availability info.
It requires adding `new` to bindings to avoid compiler warnings.

reference: https://github.com/xamarin/xamarin-macios/issues/4893

---

from @rolfbjarne 

In iOS 12 this property was moved to a protocol, but that protocol's
availability attributes limits it to iOS 12, not iOS 2 where this property was
originally introduced.

This is problematic, because it means we'll throw a
PlatformNotSupportedException if someone tries to call it on 32-bit iOS.

So put the property back on UIScrollView, so that the generated code ends up
with the right availability attributes (and a correct 32-bit implementation).

https://github.com/xamarin/xamarin-macios/pull/5004
2018-10-18 14:37:30 -04:00
Miguel de Icaza dca1f4793f [UIKit] UIGestureRecognizer, support a way of unsubscribing without creating cycles (#4729)
* [UIKit] UIGestureRecognizer, support a way of unsubscribing without creating cycles

This now tracks all the uses of AddTarget with delegates by recording
the Token/Selector pair and making `Dispose()` release all the linkage
as well as providing an enumerator that can be used to get all the
registered Action handlers - this can then be used with .First() and
then passed to `RemoveTarget`.

This addresses https://github.com/xamarin/xamarin-macios/issues/4190

This initial patch is here for discussion of the approach, want to
review and test this before we merge.

* Simplify code a little bit.

* Add test.

* [tests] Add an NSAutoreleasePool to make GestureRecognizerTest.NoStrongCycles happy on 32-bit.
2018-10-18 12:31:39 +02:00
Chris Hamons 1082ce7a09
Add xtro test for [Deprecated] attributes and fix up usages (#4966)
- https://github.com/xamarin/xamarin-macios/issues/4431
2018-10-15 10:43:17 -05:00
Sebastien Pouliot 78af341ca4
[uikit] Duplicate bindings for 'UIScrollView.ContentOffset' to get correct availability information. Fixes #4893 (#4982)
`ContentOffset` was moved to `UIFocusItemScrollableContainer` in iOS 12.
Since it's a new protocol it's decorated as introduced in iOS 12 - but
the API was actually already available for a long time.

The _trick_ is to keep the original binding inside `UIScrollView`
so it overrides the protocol and keeps the correct availability info.
It requires adding `new` to bindings to avoid compiler warnings.

reference: https://github.com/xamarin/xamarin-macios/issues/4893
2018-10-15 08:20:52 -04:00
Rolf Bjarne Kvinge 788b63d96f
[NSLayoutManager] Complete bindings for NSLayoutManager. Fixes #4740. (#4853)
Fix numerous issues with NSLayoutManager[Delegate]:

* The classes are available in both AppKit and UIKit, but the bindings are
  duplicated (unsuccessfully) in both appkit.cs and uikit.cs. So create a new
  xkit.cs that is shared between XI and XM, and put a shared version of the
  bindings there.

* Bind everything that hasn't already been bound (or deprecated by Apple).

* Methods that take a nullable NSRangePointer has been bound with three overloads:

	* A protected overridable (exported) method that uses IntPtr.
	* A public method without the parameter.
	* A public method with the parameter typed as 'ref NSRange'.

	This makes sure the native method can be overridden if needed, while at
	the same time making it possible to call without providing the nullable
	parameter.

* Fix numerous ugly bindings:

	* There's a great nint/nuint confusion for parameters referring to
	  'character index' and 'glyph index'. XI seems to prefer nuint, while XM
	  seems to prefer nint. Standardize on nuint, since that's how Apple
	  created them.

	* Many methods have names than sound like Objective-C. Fix them all,
	  either right away when possible, or for XAMCORE_4_0.

	* Several parameter names have been modified to comply with our naming
	  guidelines (no abbreviations).

Fixes https://github.com/xamarin/xamarin-macios/issues/4740.
2018-10-01 14:17:28 +02:00
Sebastien Pouliot 8dd288925b [uikit] Fix/comment missing API reported by xtro 2018-08-24 11:24:47 -04:00
Manuel de la Pena bf3d722360 [UIKit] Add support for Xcode 10 beta 5. (#4556) 2018-08-02 16:31:35 -04:00
Alex Soto 38bbffde76
[WebKit] Update bindings to Xcode 10 Beta 1, Nothing on beta 2 or 3 (#4443)
Allso adds UIKit UIWebView deprecations
2018-07-13 21:19:57 -05:00
Manuel de la Pena 6c06b962ab [UIKit] Added support for Xcode 10 beta 3. (#4395) 2018-07-06 11:52:56 -04:00
Manuel de la Pena 553238abc8
[UIKit] Update for Xcode10. (#4253) 2018-06-18 16:01:47 +02:00
Rolf Bjarne Kvinge b1c5ebf326
[generator] Register models with unique names to not match platform types. Fixes #3875. (#3879) (#3888)
* Move Registrar.SanitizeName to StringUtils.SanitizeObjectiveCName.

* [generator] Register models with unique names to not match platform types. Fixes #3875.

* [NSObject] Don't compare against a non-existent protocol.

* [generator] Make it possible to register models like before if the binding developer wishes it.

* [src] Make sure to not declare ObjC classes Apple already defines.

Fixes these warnings at startup:

    Class DOMNodeFilter is implemented in both /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebKitLegacy.framework/Versions/A/WebKitLegacy (0x7fffa944a788) and /Users/builder/data/lanes/6035/0ca02336/source/xamarin-macios/tests/xharness/tmp-test-dir/dont link-mac-unified/bin/x86/Debug-unified/dont link.app/Contents/MacOS/dont link (0x10d8a9958). One of the two will be used. Which one is undefined.
    Class WebOpenPanelResultListener is implemented in both /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebKitLegacy.framework/Versions/A/WebKitLegacy (0x7fffa944e4c8) and /Users/builder/data/lanes/6035/0ca02336/source/xamarin-macios/tests/xharness/tmp-test-dir/dont link-mac-unified/bin/x86/Debug-unified/dont link.app/Contents/MacOS/dont link (0x10d8a9a98). One of the two will be used. Which one is undefined.
    Class WebPolicyDecisionListener is implemented in both /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebKitLegacy.framework/Versions/A/WebKitLegacy (0x7fffa944e838) and /Users/builder/data/lanes/6035/0ca02336/source/xamarin-macios/tests/xharness/tmp-test-dir/dont link-mac-unified/bin/x86/Debug-unified/dont link.app/Contents/MacOS/dont link (0x10d8a9ae8). One of the two will be used. Which one is undefined.
    Class MTLCaptureScope is implemented in both /System/Library/Frameworks/Metal.framework/Versions/A/Metal (0x7fffa806f1d0) and /Users/builder/data/lanes/6035/0ca02336/source/xamarin-macios/tests/xharness/tmp-test-dir/dont link-mac-unified/bin/x86/Debug-unified/dont link.app/Contents/MacOS/dont link (0x10d8aa858). One of the two will be used. Which one is undefined.
    Class JSExport is implemented in both /System/Library/Frameworks/JavaScriptCore.framework/Versions/A/JavaScriptCore (0x7fffa7eb4f60) and /Users/builder/data/lanes/6035/0ca02336/source/xamarin-macios/tests/xharness/tmp-test-dir/dont link-mac-unified/bin/x86/Debug-unified/dont link.app/Contents/MacOS/dont link (0x10d8aaa38). One of the two will be used. Which one is undefined.
2018-04-06 19:58:20 +02:00
Sebastien Pouliot 7c45477e40
[foundation][uikit] Add missing [DesignatedInitializer] on default constructor (#3454)
Like reported by xtro (data files updated)
using the new, simpler `[DesignatedDefaultCtor]` attribute
2018-02-12 22:52:33 -05:00
Sebastien Pouliot 1c3f56b926
[src] Add a few missing [RequiresSuper] attributes. Fix #3253 (#3429)
Those were missed because xtro did not scan ObjC categories for
`objc_requires_super` attributes.

Fixing the naming mapping (to consider inlined categories) also
uncovered a few API with extraneous [DesignatedInitializer] attributes
Those were deprecated (API) and moved into categories so xtro missed
the designated initializer was removed.

All your `base`, well `super` in ObjC, now belong to us :)

https://github.com/xamarin/xamarin-macios/issues/3253
2018-02-08 08:44:36 -05:00
Sebastien Pouliot dda9019f07
[uikit] Add [Advice] on UIImage.FromBundle to mention it was not thread safe before iOS9 (#3430)
This is related, but not a direct fix, to bug
https://bugzilla.xamarin.com/show_bug.cgi?id=40520

The original fix was made, a long time ago, in
maccore/e39d21e26dd863d019269117d4c110c3ac8ce9f5
2018-02-08 08:39:39 -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
Vincent Dondain 4da8016db4
[xtro] Report missing-protocol-conformance when protocols are defined… (#3187)
- Fixes bug #59272: [xtro] Report !missing-protocol-conformance! when protocols are defined in categories
(https://bugzilla.xamarin.com/show_bug.cgi?id=59272)
- Implemented missing protocol conformances based on tool's new data.
- Remove Internal check from VisitObjCCategoryDecl and VisitObjCInterfaceDecl
- Ignore previewItemTitle failure (normal since it's optional)
- Only skip UIStateRestoring for subclasses of UIViewController
- Ignore UIStateRestoring test on watchOS (UIViewController not available)
- Remove protocol conformances that generated wrong availability attributes (https://github.com/xamarin/xamarin-macios/issues/3213)
- Avoid new virtual or virtual when adding protocol conformance (https://github.com/xamarin/xamarin-macios/issues/3217)
2018-01-18 13:41:09 -05:00
Sebastien Pouliot ec744533b9
[generator] Add support for [RequiresSuper] attribute. Fixes #58350 (#3147)
* Add new attribute;
* Add generator support (re-copy attribute);
* Add xtro rule to detect missing/extra [RequiresSuper] attributes;
* Add attributes to the required API;

The generated code changes (reversed) can be verified with
https://gist.github.com/spouliot/1c91d6ee7c084a06890e5f3f2a475001

Reference:
https://bugzilla.xamarin.com/show_bug.cgi?id=58350
2018-01-04 11:48:00 -05:00
Sebastien Pouliot 39a514602c
[uikit] Remove old selector checks in UIDevice (#3151)
Those were useful, a long time ago, to use the API even on _older_
versions. This is not needed anymore and can be simplified.
2018-01-03 08:49:11 -05:00
Sebastien Pouliot 07c81479e2
[tests][intro] Clean up old and some non-required availability attributes (#3141)
We normally frown on large scale _cosmetic_ changes, mostly because it breaks git's history (very useful) and makes merging branches harder and more error prone (very annoying).

However we require, right now, such changes to remove our old, mcs-based, pre-processor (pmcs) so it's a _good_ time to address the old, unneeded availability attributes - since most of them are re-written for our next milestone.

This won't change the final application size in most cases, as the linker removes them, but it will make the (unlinked) platform assemblies smaller. This means they will load faster (e.g. by mtouch, mmp, IDE, workbooks...) and will reduce the time/memory needed to reflect them.
2018-01-02 11:28:55 -05:00
Sebastien Pouliot a69e161d59
[src] Properly annotate designated initializers in many frameworks (#3142)
Correspond to xtro `!missing-designated-initializer!` errors
2017-12-28 16:37:13 -05:00
Chris Hamons cad99240e7
Hand-process troublesome attributes to fit pmcs conversion tooling (#3101)
There are a number of availability constructs that were uncommon enough / difficult to handle in the generator update or dead simple enough to change.

Some of them include:
   - Multiple platforms |'ed into one Availability attributes.
   - 32-bit arch Availability attributes were really uncommon and hand processing allowed
     them to be skipped completely
   - Convert Since, MavericksAttribute/MountainLionAttribute/LionAttribute, and a bunch of Availability (Introduced) to short forms like [Mac] and [iOS].

I also had to patch PMCS to correctly handle PlatformArchitecture arguments, which is ironic because a PR soon after this will delete all of that code.
2017-12-20 09:19:16 -06:00
Vincent Dondain d7b7a6ea02 Merge branch 'xcode9.2' 2017-12-06 14:41:13 -05:00
Chris Hamons db5a49050a
[macOS] NSGestureRecognizer.State should be get/set like UIKit's (#3074)
- https://bugzilla.xamarin.com/show_bug.cgi?id=60935
- This allows subclassing to work
- Add advice for NSGestureRecognizer/UIGestureRecognizer to match header file note
2017-12-04 09:44:47 -06:00