[xcode11] Remove the WatchKit framework from iOS while keeping API stability. Fixes #6492. (#6503)

* [WatchKit] Remove this framework for iOS while keeping backwards compatibility. Fixes #6492.

* Copy all generated sources and modify them to throw PlatformNotSupported exceptions.
* Adjust some existing source code to also throw PlatformNotSupported exceptions.
* Sprinkle Obsolete attributes generously.
* Stop generating code for the WatchKit framework for iOS.

Fixes https://github.com/xamarin/xamarin-macios/issues/6492.

* [introspection] Adjust test.

* [mtouch] Don't link with WatchKit, and show a warning if we detect code that want to use WatchKit.

* [xtro] Remove WatchKit for iOS.

* [introspection] Don't check obsoleted NSString fields for null.

There's probably a reason the field was obsoleted.

* [introspection] Add exception for the WatchKit framework.

* [xtro] Ignore obsolete enums.

There's probably a reason they're obsoleted.

In particular it solves a confusion between WKWebKit.WKErrorCode and
WatchKit.WKErrorCode: for iOS, the latter is obsoleted, and this way we always
process the former instead.

* [mtouch] Adjust wording for MT4178 to be more accurate.

* [WatchKit] Make more API obsolete/hidden.

Two classes managed to slip past the first time.

* [tests] Adjust test after WatchKit removal.
This commit is contained in:
Rolf Bjarne Kvinge 2019-08-14 17:46:55 +02:00 коммит произвёл GitHub
Родитель 6daac2c687
Коммит d4192a59f0
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
47 изменённых файлов: 2032 добавлений и 85 удалений

Просмотреть файл

@ -595,6 +595,8 @@ complicated to get it right when doing it manually.
If this is not the case, please file a [bug report](https://github.com/xamarin/xamarin-macios/issues/new) with a test case.
<!-- 4178: used by mtouch -->
## MM5xxx: GCC and toolchain
### MM51xx: compilation
@ -633,6 +635,12 @@ If this is not the case, please file a [bug report](https://github.com/xamarin/x
See the [equivalent mtouch warning](~/ios/troubleshooting/mtouch-errors.md#MT5218).
### MM5219: Not linking with {framework} because it has been removed from {platform}.
The framework in question has been removed, and Xamarin.Mac can't link with it.
Any code that uses the framework must be removed/rewritten.
<!-- 5206 used by mtouch -->
<!-- 5207 used by mtouch -->
<!-- 5208 used by mtouch -->

Просмотреть файл

@ -2546,6 +2546,14 @@ If this is not the case, please file a [bug report](https://github.com/xamarin/x
The name of an Objective-C protocol can't contain certain characters which means that the `Adopts` attribute on the corresponding managed class can't have the `ProtocolType` parameter containing them. Please refer to the provided error message and fix accordingly.
### MT4178: The class '{class}' will not be registered because the WatchKit framework has been removed from the iOS SDK.
Apple removed the WatchKit framework from the iOS SDK, so any code that uses it will not compile anymore.
Any code that uses the WatchKit framework must be removed/rewritten.
Reference: https://github.com/xamarin/xamarin-macios/issues/6492
# MT5xxx: GCC and toolchain error messages
### MT51xx: Compilation
@ -2826,6 +2834,12 @@ There are two main reasons for this:
* The symbol is correct, but it's a symbol that's already preserved by normal
means (some build options causes the exact list of dynamic symbols to vary).
### MT5219: Not linking with {framework} because it has been removed from {platform}.
The framework in question has been removed, and Xamarin.iOS can't link with it.
Any code that uses the framework must be removed/rewritten.
### MT53xx: Other tools
<!--

Просмотреть файл

@ -59,6 +59,15 @@ namespace Foundation {
{
return LocalizedDescription;
}
#if __IOS__
[Obsolete ("The WatchKit framework has been removed from iOS")]
public static NSString WatchKitErrorDomain {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
#endif // __IOS__
#endif
}
}

Просмотреть файл

@ -13,6 +13,7 @@ using ObjCRuntime;
namespace WatchKit {
[iOS (8,2)]
[Unavailable (PlatformName.iOS)]
[Native]
public enum WKInterfaceMapPinColor : long {
Red,
@ -21,6 +22,7 @@ namespace WatchKit {
}
[iOS (8,2)]
[Unavailable (PlatformName.iOS)]
[Native]
public enum WKMenuItemIcon : long {
Accept,
@ -42,6 +44,7 @@ namespace WatchKit {
}
[iOS (8,2)]
[Unavailable (PlatformName.iOS)]
[Native]
public enum WKUserNotificationInterfaceType : long {
Default,
@ -49,6 +52,7 @@ namespace WatchKit {
}
[iOS (8,2)]
[Unavailable (PlatformName.iOS)]
[Native]
public enum WKTextInputMode : long {
Plain,
@ -57,6 +61,7 @@ namespace WatchKit {
}
[iOS (8,2)]
[Unavailable (PlatformName.iOS)]
[Native]
[ErrorDomain ("WatchKitErrorDomain")]
public enum WKErrorCode : long {

Просмотреть файл

@ -1,6 +1,6 @@
// Copyright 2014-2015 Xamarin Inc. All rights reserved.
#if WATCH || IOS
#if WATCH
using System;
using System.Reflection;

Просмотреть файл

@ -1,5 +1,7 @@
// Copyright 2015 Xamarin Inc. All rights reserved.
#if WATCH
using System;
using System.Collections.Generic;
using Foundation;
@ -10,27 +12,6 @@ namespace WatchKit {
public partial class WKInterfaceDevice {
#if !WATCH
public IReadOnlyDictionary<string,long> CachedImages {
get {
// the NSDictionary contains NSString keys with NSNumber values, which are not friendly to use
var wd = WeakCachedImages;
var md = new Dictionary<string,long> ((int) wd.Count);
foreach (var kvp in wd) {
md.Add (kvp.Key.ToString (), (kvp.Value as NSNumber).Int64Value);
}
return md;
}
}
[Obsolete ("Use PreferredContentSizeCategoryString instead.")]
public UIContentSizeCategory PreferredContentSizeCategory {
get {
return UIContentSizeCategoryExtensions.GetValue (_PreferredContentSizeCategory);
}
}
#endif
// This method (preferredContentSizeCategory) is defined as "NSString *"
// in the headers, and the return values are not documented
// (documentation says the return values are the same as for
@ -52,3 +33,5 @@ namespace WatchKit {
}
}
}
#endif // WATCH

Просмотреть файл

@ -0,0 +1,49 @@
#if __IOS__
using System;
using System.ComponentModel;
using ObjCRuntime;
namespace WatchKit {
[Introduced (PlatformName.iOS, 8,2, PlatformArchitecture.All)]
[Unavailable (PlatformName.iOS, PlatformArchitecture.All)]
[Obsolete ("The WatchKit framework has been removed from iOS")]
[EditorBrowsable (EditorBrowsableState.Never)]
public static class WKAccessibility {
public static void SetAccessibilityHint (this WKInterfaceObject This, string accessibilityHint)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public static void SetAccessibilityIdentifier (this WKInterfaceObject This, string accessibilityIdentifier)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public static void SetAccessibilityImageRegions (this WKInterfaceObject This, WKAccessibilityImageRegion[] accessibilityImageRegions)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public static void SetAccessibilityLabel (this WKInterfaceObject This, string accessibilityLabel)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public static void SetAccessibilityTraits (this WKInterfaceObject This, global::UIKit.UIAccessibilityTrait accessibilityTraits)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public static void SetAccessibilityValue (this WKInterfaceObject This, string accessibilityValue)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public static void SetIsAccessibilityElement (this WKInterfaceObject This, bool isAccessibilityElement)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
} /* class WKAccessibility */
}
#endif // __IOS__

Просмотреть файл

@ -0,0 +1,52 @@
#if __IOS__
using System;
using System.ComponentModel;
using CoreGraphics;
using Foundation;
using ObjCRuntime;
namespace WatchKit {
[Register ("WKAccessibilityImageRegion", SkipRegistration = true)]
[Introduced (PlatformName.iOS, 8,2, PlatformArchitecture.All)]
[Unavailable (PlatformName.iOS, PlatformArchitecture.All)]
[Obsolete ("The WatchKit framework has been removed from iOS")]
[EditorBrowsable (EditorBrowsableState.Never)]
public class WKAccessibilityImageRegion : NSObject {
public override IntPtr ClassHandle { get { throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS"); } }
public WKAccessibilityImageRegion () : base (NSObjectFlag.Empty)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
protected WKAccessibilityImageRegion (NSObjectFlag t) : base (t)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
protected internal WKAccessibilityImageRegion (IntPtr handle) : base (handle)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual CGRect Frame {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
set {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public virtual string Label {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
set {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
} /* class WKAccessibilityImageRegion */
}
#endif // __IOS__

Просмотреть файл

@ -0,0 +1,32 @@
#if __IOS__
using System;
using System.ComponentModel;
using Foundation;
using ObjCRuntime;
namespace WatchKit {
[Introduced (PlatformName.iOS, 8,2, PlatformArchitecture.All)]
[Unavailable (PlatformName.iOS, PlatformArchitecture.All)]
[Obsolete ("The WatchKit framework has been removed from iOS")]
[EditorBrowsable (EditorBrowsableState.Never)]
public enum WKErrorCode : long {
None = 0,
UnknownError = 1,
RequestReplyNotCalledError = 2,
InvalidArgumentError = 3,
MediaPlayerError = 4,
DownloadError = 5,
RecordingFailedError = 6,
}
[Obsolete ("The WatchKit framework has been removed from iOS")]
[EditorBrowsable (EditorBrowsableState.Never)]
static public class WKErrorCodeExtensions {
public static NSString GetDomain (this WKErrorCode self)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
}
#endif // __IOS__

Просмотреть файл

@ -0,0 +1,24 @@
#if __IOS__
using System;
using System.ComponentModel;
using Foundation;
using ObjCRuntime;
namespace WatchKit {
[Unavailable (PlatformName.iOS, PlatformArchitecture.All)]
[Obsolete ("The WatchKit framework has been removed from iOS")]
[EditorBrowsable (EditorBrowsableState.Never)]
public interface IWKImageAnimatable : INativeObject, IDisposable
{
[Preserve (Conditional = true)]
void StartAnimating ();
[Preserve (Conditional = true)]
void StartAnimating (NSRange imageRange, double duration, nint repeatCount);
[Preserve (Conditional = true)]
void StopAnimating ();
}
}
#endif // __IOS__

Просмотреть файл

@ -0,0 +1,64 @@
#if __IOS__
using System;
using System.ComponentModel;
using Foundation;
using ObjCRuntime;
namespace WatchKit {
[Register ("WKInterfaceButton", SkipRegistration = true)]
[Introduced (PlatformName.iOS, 8,2, PlatformArchitecture.All)]
[Unavailable (PlatformName.iOS, PlatformArchitecture.All)]
[Obsolete ("The WatchKit framework has been removed from iOS")]
[EditorBrowsable (EditorBrowsableState.Never)]
public class WKInterfaceButton : WKInterfaceObject {
public override IntPtr ClassHandle { get { throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS"); } }
protected WKInterfaceButton (NSObjectFlag t) : base (t)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
protected internal WKInterfaceButton (IntPtr handle) : base (handle)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void SetBackgroundColor (global::UIKit.UIColor color)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void SetBackgroundImage (global::UIKit.UIImage image)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void SetBackgroundImage (NSData imageData)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void SetBackgroundImage (string imageName)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void SetEnabled (bool enabled)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void SetTitle (string title)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void SetTitle (NSAttributedString attributedTitle)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
} /* class WKInterfaceButton */
}
#endif // __IOS__

Просмотреть файл

@ -0,0 +1,258 @@
#if __IOS__
using System;
using System.ComponentModel;
using System.Threading.Tasks;
using CoreGraphics;
using Foundation;
using ObjCRuntime;
using UIKit;
namespace WatchKit {
[Register ("WKInterfaceController", SkipRegistration = true)]
[Introduced (PlatformName.iOS, 8,2, PlatformArchitecture.All)]
[Unavailable (PlatformName.iOS, PlatformArchitecture.All)]
[Obsolete ("The WatchKit framework has been removed from iOS")]
[EditorBrowsable (EditorBrowsableState.Never)]
public abstract class WKInterfaceController : NSObject {
public override IntPtr ClassHandle { get { throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS"); } }
protected WKInterfaceController (NSObjectFlag t) : base (t)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
protected internal WKInterfaceController (IntPtr handle) : base (handle)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public WKInterfaceController ()
: base (NSObjectFlag.Empty)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void AddMenuItem (global::UIKit.UIImage image, string title, Selector action)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void AddMenuItem (string imageName, string title, Selector action)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void AddMenuItem (WKMenuItemIcon itemIcon, string title, Selector action)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void Awake (NSObject context)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void BecomeCurrentPage ()
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void ClearAllMenuItems ()
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void DidDeactivate ()
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void DidSelectRow (WKInterfaceTable table, nint rowIndex)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void DismissController ()
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void DismissTextInputController ()
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual NSObject GetContextForSegue (string segueIdentifier)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual NSObject GetContextForSegue (string segueIdentifier, WKInterfaceTable table, nint rowIndex)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual NSObject[] GetContextsForSegue (string segueIdentifier)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual NSObject[] GetContextsForSegue (string segueIdentifier, WKInterfaceTable table, nint rowIndex)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void HandleAction (string identifier, global::UserNotifications.UNNotification notification)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void HandleLocalNotificationAction (string identifier, global::UIKit.UILocalNotification localNotification)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void HandleRemoteNotificationAction (string identifier, NSDictionary remoteNotification)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void HandleUserActivity (NSDictionary userActivity)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void InvalidateUserActivity ()
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public static bool OpenParentApplication (NSDictionary userInfo, [BlockProxy (typeof (ObjCRuntime.Trampolines.NIDActionArity2V69))]global::System.Action<NSDictionary, NSError> reply)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void PopController ()
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void PopToRootController ()
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void PresentController (string name, NSObject context)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void PresentController (string[] names, NSObject[] contexts)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void PresentTextInputController (string[] suggestions, WKTextInputMode inputMode, global::System.Action<NSArray> completion)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual Task<NSArray> PresentTextInputControllerAsync (string[] suggestions, WKTextInputMode inputMode)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void PresentTextInputController (global::System.Func<NSString, NSArray> suggestionsHandler, WKTextInputMode inputMode, [BlockProxy (typeof (ObjCRuntime.Trampolines.NIDActionArity1V208))]global::System.Action<NSArray> completion)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual Task<NSArray> PresentTextInputControllerAsync (global::System.Func<NSString, NSArray> suggestionsHandler, WKTextInputMode inputMode)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void PushController (string name, NSObject context)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public static void ReloadRootControllers (string[] names, NSObject[] contexts)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void SetTitle (string title)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void UpdateUserActivity (string type, NSDictionary userInfo, NSUrl webpageURL)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void WillActivate ()
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual CGRect ContentFrame {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static NSString ErrorDomain {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public void PushController (string name, string context)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public void PresentController (string name, string context)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public void PresentController (string [] names, string [] contexts)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public void AddMenuItem (UIImage image, string title, Action action)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public void AddMenuItem (string imageName, string title, Action action)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public void AddMenuItem (WKMenuItemIcon itemIcon, string title, Action action)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
} /* class WKInterfaceController */
[Obsolete ("The WatchKit framework has been removed from iOS")]
[EditorBrowsable (EditorBrowsableState.Never)]
public class WKPresentMediaPlayerResult {
public WKPresentMediaPlayerResult (bool didPlayToEnd, double /* NSTimeInterval */ endTime)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public bool DidPlayToEnd { get; set; }
public double EndTime { get; set; }
}
}
#endif // __IOS__

Просмотреть файл

@ -0,0 +1,43 @@
#if __IOS__
using System;
using System.ComponentModel;
using Foundation;
using ObjCRuntime;
namespace WatchKit {
[Register ("WKInterfaceDate", SkipRegistration = true)]
[Introduced (PlatformName.iOS, 8,2, PlatformArchitecture.All)]
[Unavailable (PlatformName.iOS, PlatformArchitecture.All)]
[Obsolete ("The WatchKit framework has been removed from iOS")]
[EditorBrowsable (EditorBrowsableState.Never)]
public class WKInterfaceDate : WKInterfaceObject {
public override IntPtr ClassHandle { get { throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS"); } }
protected WKInterfaceDate (NSObjectFlag t) : base (t)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
protected internal WKInterfaceDate (IntPtr handle) : base (handle)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void SetCalendar (NSCalendar calendar)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void SetTextColor (global::UIKit.UIColor color)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void SetTimeZone (NSTimeZone timeZone)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
} /* class WKInterfaceDate */
}
#endif // __IOS__

Просмотреть файл

@ -0,0 +1,128 @@
#if __IOS__
using System;
using System.Collections.Generic;
using System.ComponentModel;
using CoreGraphics;
using Foundation;
using ObjCRuntime;
using UIKit;
namespace WatchKit {
[Register ("WKInterfaceDevice", SkipRegistration = true)]
[Introduced (PlatformName.iOS, 8,2, PlatformArchitecture.All)]
[Unavailable (PlatformName.iOS, PlatformArchitecture.All)]
[Obsolete ("The WatchKit framework has been removed from iOS")]
[EditorBrowsable (EditorBrowsableState.Never)]
public class WKInterfaceDevice : NSObject {
public override IntPtr ClassHandle { get { throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS"); } }
protected WKInterfaceDevice (NSObjectFlag t) : base (t)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
protected internal WKInterfaceDevice (IntPtr handle) : base (handle)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual bool AddCachedImage (global::UIKit.UIImage image, string name)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual bool AddCachedImage (NSData imageData, string name)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void RemoveAllCachedImages ()
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void RemoveCachedImage (string name)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public static WKInterfaceDevice CurrentDevice {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public virtual string LocalizedModel {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public virtual string Model {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public virtual string Name {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public virtual CGRect ScreenBounds {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public virtual nfloat ScreenScale {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public virtual string SystemName {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public virtual string SystemVersion {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public virtual NSDictionary WeakCachedImages {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public IReadOnlyDictionary<string,long> CachedImages {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public UIContentSizeCategory PreferredContentSizeCategory {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public string PreferredContentSizeCategoryString {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public bool CheckSystemVersion (int major, int minor)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
} /* class WKInterfaceDevice */
}
#endif // __IOS__

Просмотреть файл

@ -0,0 +1,68 @@
#if __IOS__
using System;
using System.ComponentModel;
using Foundation;
using ObjCRuntime;
namespace WatchKit {
[Register ("WKInterfaceGroup", SkipRegistration = true)]
[Introduced (PlatformName.iOS, 8,2, PlatformArchitecture.All)]
[Unavailable (PlatformName.iOS, PlatformArchitecture.All)]
[Obsolete ("The WatchKit framework has been removed from iOS")]
[EditorBrowsable (EditorBrowsableState.Never)]
public class WKInterfaceGroup : WKInterfaceObject, IWKImageAnimatable {
public override IntPtr ClassHandle { get { throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS"); } }
protected WKInterfaceGroup (NSObjectFlag t) : base (t)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
protected internal WKInterfaceGroup (IntPtr handle) : base (handle)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void SetBackgroundColor (global::UIKit.UIColor color)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void SetBackgroundImage (global::UIKit.UIImage image)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void SetBackgroundImage (NSData imageData)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void SetBackgroundImage (string imageName)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void SetCornerRadius (nfloat cornerRadius)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void StartAnimating ()
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void StartAnimating (NSRange imageRange, double duration, nint repeatCount)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void StopAnimating ()
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
} /* class WKInterfaceGroup */
}
#endif // __IOS__

Просмотреть файл

@ -0,0 +1,63 @@
#if __IOS__
using System;
using System.ComponentModel;
using Foundation;
using ObjCRuntime;
namespace WatchKit {
[Register ("WKInterfaceImage", SkipRegistration = true)]
[Introduced (PlatformName.iOS, 8,2, PlatformArchitecture.All)]
[Unavailable (PlatformName.iOS, PlatformArchitecture.All)]
[Obsolete ("The WatchKit framework has been removed from iOS")]
[EditorBrowsable (EditorBrowsableState.Never)]
public class WKInterfaceImage : WKInterfaceObject, IWKImageAnimatable {
public override IntPtr ClassHandle { get { throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS"); } }
protected WKInterfaceImage (NSObjectFlag t) : base (t)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
protected internal WKInterfaceImage (IntPtr handle) : base (handle)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void SetImage (global::UIKit.UIImage image)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void SetImage (NSData imageData)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void SetImage (string imageName)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void SetTintColor (global::UIKit.UIColor color)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void StartAnimating ()
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void StartAnimating (NSRange imageRange, double duration, nint repeatCount)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void StopAnimating ()
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
} /* class WKInterfaceImage */
}
#endif // __IOS__

Просмотреть файл

@ -0,0 +1,43 @@
#if __IOS__
using System;
using System.ComponentModel;
using Foundation;
using ObjCRuntime;
namespace WatchKit {
[Register ("WKInterfaceLabel", SkipRegistration = true)]
[Introduced (PlatformName.iOS, 8,2, PlatformArchitecture.All)]
[Unavailable (PlatformName.iOS, PlatformArchitecture.All)]
[Obsolete ("The WatchKit framework has been removed from iOS")]
[EditorBrowsable (EditorBrowsableState.Never)]
public class WKInterfaceLabel : WKInterfaceObject {
public override IntPtr ClassHandle { get { throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS"); } }
protected WKInterfaceLabel (NSObjectFlag t) : base (t)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
protected internal WKInterfaceLabel (IntPtr handle) : base (handle)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void SetText (string text)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void SetText (NSAttributedString attributedText)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void SetTextColor (global::UIKit.UIColor color)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
} /* class WKInterfaceLabel */
}
#endif // __IOS__

Просмотреть файл

@ -0,0 +1,60 @@
#if __IOS__
using System;
using System.ComponentModel;
using CoreGraphics;
using Foundation;
using ObjCRuntime;
namespace WatchKit {
[Register ("WKInterfaceMap", SkipRegistration = true)]
[Introduced (PlatformName.iOS, 8,2, PlatformArchitecture.All)]
[Unavailable (PlatformName.iOS, PlatformArchitecture.All)]
[Obsolete ("The WatchKit framework has been removed from iOS")]
[EditorBrowsable (EditorBrowsableState.Never)]
public class WKInterfaceMap : WKInterfaceObject {
public override IntPtr ClassHandle { get { throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS"); } }
protected WKInterfaceMap (NSObjectFlag t) : base (t)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
protected internal WKInterfaceMap (IntPtr handle) : base (handle)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void AddAnnotation (global::CoreLocation.CLLocationCoordinate2D location, global::UIKit.UIImage image, CGPoint offset)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void AddAnnotation (global::CoreLocation.CLLocationCoordinate2D location, string name, CGPoint offset)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void AddAnnotation (global::CoreLocation.CLLocationCoordinate2D location, WKInterfaceMapPinColor pinColor)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void RemoveAllAnnotations ()
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void SetRegion (global::MapKit.MKCoordinateRegion coordinateRegion)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void SetVisible (global::MapKit.MKMapRect mapRect)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
} /* class WKInterfaceMap */
}
#endif // __IOS__

Просмотреть файл

@ -0,0 +1,17 @@
#if __IOS__
using System;
using System.ComponentModel;
using ObjCRuntime;
namespace WatchKit {
[Unavailable (PlatformName.iOS, PlatformArchitecture.All)]
[Obsolete ("The WatchKit framework has been removed from iOS")]
[EditorBrowsable (EditorBrowsableState.Never)]
public enum WKInterfaceMapPinColor : long {
Red = 0,
Green = 1,
Purple = 2,
}
}
#endif // __IOS__

Просмотреть файл

@ -0,0 +1,657 @@
#if __IOS__
using System;
using System.ComponentModel;
using CoreGraphics;
using Foundation;
using ObjCRuntime;
using UIKit;
namespace WatchKit {
[Register ("WKInterfaceObject", SkipRegistration = true)]
[Introduced (PlatformName.iOS, 8,2, PlatformArchitecture.All)]
[Unavailable (PlatformName.iOS, PlatformArchitecture.All)]
[Obsolete ("The WatchKit framework has been removed from iOS")]
[EditorBrowsable (EditorBrowsableState.Never)]
public class WKInterfaceObject : NSObject {
public override IntPtr ClassHandle { get { throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS"); } }
protected WKInterfaceObject (NSObjectFlag t) : base (t)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
protected internal WKInterfaceObject (IntPtr handle) : base (handle)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual bool AccessibilityActivate ()
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void SetAlpha (nfloat alpha)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void SetHeight (nfloat height)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void SetHidden (bool hidden)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void SetWidth (nfloat width)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual CGPoint AccessibilityActivationPoint {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
set {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public virtual NSAttributedString AccessibilityAttributedHint {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
set {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public virtual NSAttributedString AccessibilityAttributedLabel {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
set {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public virtual NSAttributedString AccessibilityAttributedValue {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
set {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public virtual bool AccessibilityElementsHidden {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
set {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public virtual CGRect AccessibilityFrame {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
set {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public virtual string AccessibilityHint {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
set {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public virtual string AccessibilityLabel {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
set {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public virtual string AccessibilityLanguage {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
set {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public virtual UIAccessibilityNavigationStyle AccessibilityNavigationStyle {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
set {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public virtual UIBezierPath AccessibilityPath {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
set {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public virtual UIAccessibilityTrait AccessibilityTraits {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
set {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public virtual string AccessibilityValue {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
set {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public virtual bool AccessibilityViewIsModal {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
set {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public virtual string InterfaceProperty {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public virtual bool IsAccessibilityElement {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
set {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public virtual bool ShouldGroupAccessibilityChildren {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
set {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static NSString AnnouncementDidFinishNotification {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static int AnnouncementNotification {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static NSString AssistiveTechnologyKey {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static NSString AssistiveTouchStatusDidChangeNotification {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static NSString BoldTextStatusDidChangeNotification {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static NSString ClosedCaptioningStatusDidChangeNotification {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static NSString DarkerSystemColorsStatusDidChangeNotification {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static NSString ElementFocusedNotification {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static NSString FocusedElementKey {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static NSString GrayscaleStatusDidChangeNotification {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static NSString GuidedAccessStatusDidChangeNotification {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static NSString HearingDevicePairedEarDidChangeNotification {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static NSString InvertColorsStatusDidChangeNotification {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static int LayoutChangedNotification {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static NSString MonoAudioStatusDidChangeNotification {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static NSString NotificationSwitchControlIdentifier {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static NSString NotificationVoiceOverIdentifier {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static int PageScrolledNotification {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static int PauseAssistiveTechnologyNotification {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static NSString ReduceMotionStatusDidChangeNotification {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static NSString ReduceTransparencyStatusDidChangeNotification {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static int ResumeAssistiveTechnologyNotification {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static int ScreenChangedNotification {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static NSString ShakeToUndoDidChangeNotification {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static NSString SpeakScreenStatusDidChangeNotification {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static NSString SpeakSelectionStatusDidChangeNotification {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static NSString SpeechAttributeIpaNotation {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static NSString SpeechAttributeLanguage {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static NSString SpeechAttributePitch {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static NSString SpeechAttributePunctuation {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static NSString SpeechAttributeQueueAnnouncement {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static NSString SwitchControlStatusDidChangeNotification {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static NSString TextAttributeCustom {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static NSString TextAttributeHeadingLevel {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static long TraitAdjustable {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static long TraitAllowsDirectInteraction {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static long TraitButton {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static long TraitCausesPageTurn {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static long TraitHeader {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static long TraitImage {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static long TraitKeyboardKey {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static long TraitLink {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static long TraitNone {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static long TraitNotEnabled {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static long TraitPlaysSound {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static long TraitSearchField {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static long TraitSelected {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static long TraitStartsMediaSession {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static long TraitStaticText {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static long TraitSummaryElement {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static long TraitTabBar {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static long TraitUpdatesFrequently {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static NSString UnfocusedElementKey {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static NSString VoiceOverStatusChanged {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
public static NSString VoiceOverStatusDidChangeNotification {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
//
// Notifications
//
public static class Notifications {
public static NSObject ObserveAnnouncementDidFinish (EventHandler<UIKit.UIAccessibilityAnnouncementFinishedEventArgs> handler)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public static NSObject ObserveAnnouncementDidFinish (NSObject objectToObserve, EventHandler<UIKit.UIAccessibilityAnnouncementFinishedEventArgs> handler)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public static NSObject ObserveAssistiveTechnologyKey (EventHandler<NSNotificationEventArgs> handler)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public static NSObject ObserveAssistiveTechnologyKey (NSObject objectToObserve, EventHandler<NSNotificationEventArgs> handler)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public static NSObject ObserveAssistiveTouchStatusDidChange (EventHandler<NSNotificationEventArgs> handler)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public static NSObject ObserveAssistiveTouchStatusDidChange (NSObject objectToObserve, EventHandler<NSNotificationEventArgs> handler)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public static NSObject ObserveBoldTextStatusDidChange (EventHandler<NSNotificationEventArgs> handler)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public static NSObject ObserveBoldTextStatusDidChange (NSObject objectToObserve, EventHandler<NSNotificationEventArgs> handler)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public static NSObject ObserveClosedCaptioningStatusDidChange (EventHandler<NSNotificationEventArgs> handler)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public static NSObject ObserveClosedCaptioningStatusDidChange (NSObject objectToObserve, EventHandler<NSNotificationEventArgs> handler)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public static NSObject ObserveDarkerSystemColorsStatusDidChange (EventHandler<NSNotificationEventArgs> handler)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public static NSObject ObserveDarkerSystemColorsStatusDidChange (NSObject objectToObserve, EventHandler<NSNotificationEventArgs> handler)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public static NSObject ObserveElementFocused (EventHandler<NSNotificationEventArgs> handler)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public static NSObject ObserveElementFocused (NSObject objectToObserve, EventHandler<NSNotificationEventArgs> handler)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public static NSObject ObserveFocusedElementKey (EventHandler<NSNotificationEventArgs> handler)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public static NSObject ObserveFocusedElementKey (NSObject objectToObserve, EventHandler<NSNotificationEventArgs> handler)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public static NSObject ObserveGrayscaleStatusDidChange (EventHandler<NSNotificationEventArgs> handler)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public static NSObject ObserveGrayscaleStatusDidChange (NSObject objectToObserve, EventHandler<NSNotificationEventArgs> handler)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public static NSObject ObserveGuidedAccessStatusDidChange (EventHandler<NSNotificationEventArgs> handler)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public static NSObject ObserveGuidedAccessStatusDidChange (NSObject objectToObserve, EventHandler<NSNotificationEventArgs> handler)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public static NSObject ObserveHearingDevicePairedEarDidChange (EventHandler<NSNotificationEventArgs> handler)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public static NSObject ObserveHearingDevicePairedEarDidChange (NSObject objectToObserve, EventHandler<NSNotificationEventArgs> handler)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public static NSObject ObserveInvertColorsStatusDidChange (EventHandler<NSNotificationEventArgs> handler)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public static NSObject ObserveInvertColorsStatusDidChange (NSObject objectToObserve, EventHandler<NSNotificationEventArgs> handler)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public static NSObject ObserveMonoAudioStatusDidChange (EventHandler<NSNotificationEventArgs> handler)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public static NSObject ObserveMonoAudioStatusDidChange (NSObject objectToObserve, EventHandler<NSNotificationEventArgs> handler)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public static NSObject ObserveReduceMotionStatusDidChange (EventHandler<NSNotificationEventArgs> handler)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public static NSObject ObserveReduceMotionStatusDidChange (NSObject objectToObserve, EventHandler<NSNotificationEventArgs> handler)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public static NSObject ObserveReduceTransparencyStatusDidChange (EventHandler<NSNotificationEventArgs> handler)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public static NSObject ObserveReduceTransparencyStatusDidChange (NSObject objectToObserve, EventHandler<NSNotificationEventArgs> handler)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public static NSObject ObserveShakeToUndoDidChange (EventHandler<NSNotificationEventArgs> handler)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public static NSObject ObserveShakeToUndoDidChange (NSObject objectToObserve, EventHandler<NSNotificationEventArgs> handler)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public static NSObject ObserveSpeakScreenStatusDidChange (EventHandler<NSNotificationEventArgs> handler)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public static NSObject ObserveSpeakScreenStatusDidChange (NSObject objectToObserve, EventHandler<NSNotificationEventArgs> handler)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public static NSObject ObserveSpeakSelectionStatusDidChange (EventHandler<NSNotificationEventArgs> handler)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public static NSObject ObserveSpeakSelectionStatusDidChange (NSObject objectToObserve, EventHandler<NSNotificationEventArgs> handler)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public static NSObject ObserveSwitchControlStatusDidChange (EventHandler<NSNotificationEventArgs> handler)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public static NSObject ObserveSwitchControlStatusDidChange (NSObject objectToObserve, EventHandler<NSNotificationEventArgs> handler)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public static NSObject ObserveUnfocusedElementKey (EventHandler<NSNotificationEventArgs> handler)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public static NSObject ObserveUnfocusedElementKey (NSObject objectToObserve, EventHandler<NSNotificationEventArgs> handler)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public static NSObject ObserveVoiceOverStatusDidChange (EventHandler<NSNotificationEventArgs> handler)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public static NSObject ObserveVoiceOverStatusDidChange (NSObject objectToObserve, EventHandler<NSNotificationEventArgs> handler)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
} /* class WKInterfaceObject */
}
#endif // __IOS__

Просмотреть файл

@ -0,0 +1,33 @@
#if __IOS__
using System;
using System.ComponentModel;
using Foundation;
using ObjCRuntime;
namespace WatchKit {
[Register ("WKInterfaceSeparator", SkipRegistration = true)]
[Introduced (PlatformName.iOS, 8,2, PlatformArchitecture.All)]
[Unavailable (PlatformName.iOS, PlatformArchitecture.All)]
[Obsolete ("The WatchKit framework has been removed from iOS")]
[EditorBrowsable (EditorBrowsableState.Never)]
public class WKInterfaceSeparator : WKInterfaceObject {
public override IntPtr ClassHandle { get { throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS"); } }
protected WKInterfaceSeparator (NSObjectFlag t) : base (t)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
protected internal WKInterfaceSeparator (IntPtr handle) : base (handle)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void SetColor (global::UIKit.UIColor color)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
} /* class WKInterfaceSeparator */
}
#endif // __IOS__

Просмотреть файл

@ -0,0 +1,48 @@
#if __IOS__
using System;
using System.ComponentModel;
using Foundation;
using ObjCRuntime;
namespace WatchKit {
[Register ("WKInterfaceSlider", SkipRegistration = true)]
[Introduced (PlatformName.iOS, 8,2, PlatformArchitecture.All)]
[Unavailable (PlatformName.iOS, PlatformArchitecture.All)]
[Obsolete ("The WatchKit framework has been removed from iOS")]
[EditorBrowsable (EditorBrowsableState.Never)]
public class WKInterfaceSlider : WKInterfaceObject {
public override IntPtr ClassHandle { get { throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS"); } }
protected WKInterfaceSlider (NSObjectFlag t) : base (t)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
protected internal WKInterfaceSlider (IntPtr handle) : base (handle)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void SetColor (global::UIKit.UIColor color)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void SetEnabled (bool enabled)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void SetNumberOfSteps (nint numberOfSteps)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void SetValue (float value)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
} /* class WKInterfaceSlider */
}
#endif // __IOS__

Просмотреть файл

@ -0,0 +1,53 @@
#if __IOS__
using System;
using System.ComponentModel;
using Foundation;
using ObjCRuntime;
namespace WatchKit {
[Register ("WKInterfaceSwitch", SkipRegistration = true)]
[Introduced (PlatformName.iOS, 8,2, PlatformArchitecture.All)]
[Unavailable (PlatformName.iOS, PlatformArchitecture.All)]
[Obsolete ("The WatchKit framework has been removed from iOS")]
[EditorBrowsable (EditorBrowsableState.Never)]
public class WKInterfaceSwitch : WKInterfaceObject {
public override IntPtr ClassHandle { get { throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS"); } }
protected WKInterfaceSwitch (NSObjectFlag t) : base (t)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
protected internal WKInterfaceSwitch (IntPtr handle) : base (handle)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void SetColor (global::UIKit.UIColor color)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void SetEnabled (bool enabled)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void SetOn (bool on)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void SetTitle (string title)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void SetTitle (NSAttributedString attributedTitle)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
} /* class WKInterfaceSwitch */
}
#endif // __IOS__

Просмотреть файл

@ -0,0 +1,64 @@
#if __IOS__
using System;
using System.ComponentModel;
using Foundation;
using ObjCRuntime;
namespace WatchKit {
[Register ("WKInterfaceTable", SkipRegistration = true)]
[Introduced (PlatformName.iOS, 8,2, PlatformArchitecture.All)]
[Unavailable (PlatformName.iOS, PlatformArchitecture.All)]
[Obsolete ("The WatchKit framework has been removed from iOS")]
[EditorBrowsable (EditorBrowsableState.Never)]
public class WKInterfaceTable : WKInterfaceObject {
public override IntPtr ClassHandle { get { throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS"); } }
protected WKInterfaceTable (NSObjectFlag t) : base (t)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
protected internal WKInterfaceTable (IntPtr handle) : base (handle)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual NSObject GetRowController (nint index)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void InsertRows (NSIndexSet rowIndexes, string rowType)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void RemoveRows (NSIndexSet rowIndexes)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void ScrollToRow (nint index)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void SetNumberOfRows (nint numberOfRows, string rowType)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void SetRowTypes (string[] rowTypes)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual nint NumberOfRows {
get {
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
}
} /* class WKInterfaceTable */
}
#endif // __IOS__

Просмотреть файл

@ -0,0 +1,48 @@
#if __IOS__
using System;
using System.ComponentModel;
using Foundation;
using ObjCRuntime;
namespace WatchKit {
[Register ("WKInterfaceTimer", SkipRegistration = true)]
[Introduced (PlatformName.iOS, 8,2, PlatformArchitecture.All)]
[Unavailable (PlatformName.iOS, PlatformArchitecture.All)]
[Obsolete ("The WatchKit framework has been removed from iOS")]
[EditorBrowsable (EditorBrowsableState.Never)]
public class WKInterfaceTimer : WKInterfaceObject {
public override IntPtr ClassHandle { get { throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS"); } }
protected WKInterfaceTimer (NSObjectFlag t) : base (t)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
protected internal WKInterfaceTimer (IntPtr handle) : base (handle)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void SetDate (NSDate date)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void SetTextColor (global::UIKit.UIColor color)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void Start ()
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void Stop ()
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
} /* class WKInterfaceTimer */
}
#endif // __IOS__

Просмотреть файл

@ -0,0 +1,31 @@
#if __IOS__
using System;
using System.ComponentModel;
using ObjCRuntime;
namespace WatchKit {
[Introduced (PlatformName.iOS, 8,2, PlatformArchitecture.All)]
[Unavailable (PlatformName.iOS, PlatformArchitecture.All)]
[Obsolete ("The WatchKit framework has been removed from iOS")]
[EditorBrowsable (EditorBrowsableState.Never)]
public enum WKMenuItemIcon : long {
Accept = 0,
Add = 1,
Block = 2,
Decline = 3,
Info = 4,
Maybe = 5,
More = 6,
Mute = 7,
Pause = 8,
Play = 9,
Repeat = 10,
Resume = 11,
Share = 12,
Shuffle = 13,
Speaker = 14,
Trash = 15,
}
}
#endif // __IOS__

Просмотреть файл

@ -0,0 +1,18 @@
#if __IOS__
using System;
using System.ComponentModel;
using ObjCRuntime;
namespace WatchKit {
[Introduced (PlatformName.iOS, 8,2, PlatformArchitecture.All)]
[Unavailable (PlatformName.iOS, PlatformArchitecture.All)]
[Obsolete ("The WatchKit framework has been removed from iOS")]
[EditorBrowsable (EditorBrowsableState.Never)]
public enum WKTextInputMode : long {
Plain = 0,
AllowEmoji = 1,
AllowAnimatedEmoji = 2,
}
}
#endif // __IOS__

Просмотреть файл

@ -0,0 +1,54 @@
#if __IOS__
using System;
using System.ComponentModel;
using Foundation;
using ObjCRuntime;
namespace WatchKit {
[Register ("WKUserNotificationInterfaceController", SkipRegistration = true)]
[Introduced (PlatformName.iOS, 8,2, PlatformArchitecture.All)]
[Unavailable (PlatformName.iOS, PlatformArchitecture.All)]
[Obsolete ("The WatchKit framework has been removed from iOS")]
[EditorBrowsable (EditorBrowsableState.Never)]
public class WKUserNotificationInterfaceController : WKInterfaceController {
public override IntPtr ClassHandle { get { throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS"); } }
protected WKUserNotificationInterfaceController (NSObjectFlag t) : base (t)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
protected internal WKUserNotificationInterfaceController (IntPtr handle) : base (handle)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public WKUserNotificationInterfaceController ()
: base (NSObjectFlag.Empty)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void DidReceiveLocalNotification (global::UIKit.UILocalNotification localNotification, [BlockProxy (typeof (ObjCRuntime.Trampolines.NIDActionArity1V209))]global::System.Action<WKUserNotificationInterfaceType> completionHandler)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void DidReceiveNotification (global::UserNotifications.UNNotification notification, [BlockProxy (typeof (ObjCRuntime.Trampolines.NIDActionArity1V209))]global::System.Action<WKUserNotificationInterfaceType> completionHandler)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void DidReceiveRemoteNotification (NSDictionary remoteNotification, [BlockProxy (typeof (ObjCRuntime.Trampolines.NIDActionArity1V209))]global::System.Action<WKUserNotificationInterfaceType> completionHandler)
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
public virtual void DismissController ()
{
throw new PlatformNotSupportedException ("The WatchKit framework has been removed from iOS");
}
} /* class WKUserNotificationInterfaceController */
}
#endif // __IOS__

Просмотреть файл

@ -0,0 +1,17 @@
#if __IOS__
using System;
using System.ComponentModel;
using ObjCRuntime;
namespace WatchKit {
[Introduced (PlatformName.iOS, 8,2, PlatformArchitecture.All)]
[Unavailable (PlatformName.iOS, PlatformArchitecture.All)]
[Obsolete ("The WatchKit framework has been removed from iOS")]
[EditorBrowsable (EditorBrowsableState.Never)]
public enum WKUserNotificationInterfaceType : long {
Default = 0,
Custom = 1,
}
}
#endif // __IOS__

Просмотреть файл

@ -4079,6 +4079,7 @@ namespace Foundation
// now exposed with the corresponding WKErrorCode enum
[NoMac, NoTV]
[iOS (8,2)]
[Unavailable (PlatformName.iOS)]
[Field ("WatchKitErrorDomain", "WatchKit")]
NSString WatchKitErrorDomain { get; }
#endif

Просмотреть файл

@ -1615,6 +1615,29 @@ WATCHKIT_CORE_SOURCES = \
WATCHKIT_SOURCES = \
WatchKit/WKAccessibility.cs \
WatchKit/WKInterfaceDevice.cs \
WatchKit/iOS/WKAccessibility.cs \
WatchKit/iOS/WKAccessibilityImageRegion.cs \
WatchKit/iOS/WKErrorCode.cs \
WatchKit/iOS/WKImageAnimatable.cs \
WatchKit/iOS/WKInterfaceButton.cs \
WatchKit/iOS/WKInterfaceController.cs \
WatchKit/iOS/WKInterfaceDate.cs \
WatchKit/iOS/WKInterfaceDevice.cs \
WatchKit/iOS/WKInterfaceGroup.cs \
WatchKit/iOS/WKInterfaceImage.cs \
WatchKit/iOS/WKInterfaceLabel.cs \
WatchKit/iOS/WKInterfaceMap.cs \
WatchKit/iOS/WKInterfaceMapPinColor.cs \
WatchKit/iOS/WKInterfaceObject.cs \
WatchKit/iOS/WKInterfaceSeparator.cs \
WatchKit/iOS/WKInterfaceSlider.cs \
WatchKit/iOS/WKInterfaceSwitch.cs \
WatchKit/iOS/WKInterfaceTable.cs \
WatchKit/iOS/WKInterfaceTimer.cs \
WatchKit/iOS/WKMenuItemIcon.cs \
WatchKit/iOS/WKTextInputMode.cs \
WatchKit/iOS/WKUserNotificationInterfaceController.cs \
WatchKit/iOS/WKUserNotificationInterfaceType.cs \
# WebKit (Mac version)

Просмотреть файл

@ -25,6 +25,7 @@ using System.ComponentModel;
namespace WatchKit {
[iOS (8,2)]
[Unavailable (PlatformName.iOS)]
[BaseType (typeof (NSObject))]
[Abstract] // <quote>To use this class, subclass it</quote>
[DisableDefaultCtor] // DesignatedInitializer below
@ -223,11 +224,12 @@ namespace WatchKit {
[Export ("pickerDidSettle:")]
void PickerDidSettle (WKInterfacePicker picker);
#endif
[NoiOS]
[Export ("presentMediaPlayerControllerWithURL:options:completion:")]
[Async (ResultType = typeof (WKPresentMediaPlayerResult))]
void PresentMediaPlayerController (NSUrl url, [NullAllowed] NSDictionary options, Action<bool, double, NSError> completion);
#endif
[Watch (3,0)][NoiOS]
[Export ("crownSequencer", ArgumentSemantic.Strong)]
@ -263,6 +265,7 @@ namespace WatchKit {
}
[iOS (8,2)]
[Unavailable (PlatformName.iOS)]
[BaseType (typeof (WKInterfaceController))]
[DisableDefaultCtor] // DesignatedInitializer below
interface WKUserNotificationInterfaceController {
@ -324,6 +327,7 @@ namespace WatchKit {
}
[iOS (8,2)]
[Unavailable (PlatformName.iOS)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
// just like we inlined UIAccessibility into UIViewm UIImage and UIBarItem instead of stuffing it all into NSObject
@ -375,6 +379,7 @@ namespace WatchKit {
}
[iOS (8,2)]
[Unavailable (PlatformName.iOS)]
[Category]
[BaseType (typeof (WKInterfaceObject))]
interface WKAccessibility {
@ -411,6 +416,7 @@ namespace WatchKit {
}
[iOS (8,2)]
[Unavailable (PlatformName.iOS)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor] // does not make sense to create, it should only be used thru the singleton
interface WKInterfaceDevice {
@ -507,6 +513,7 @@ namespace WatchKit {
}
[iOS (8,2)]
[Unavailable (PlatformName.iOS)]
[DisableDefaultCtor] // Do not subclass or create instances of this class yourself. -> Handle is nil if init is called
[BaseType (typeof (WKInterfaceObject))]
interface WKInterfaceButton {
@ -533,6 +540,7 @@ namespace WatchKit {
}
[iOS (8,2)]
[Unavailable (PlatformName.iOS)]
[BaseType (typeof (WKInterfaceObject))]
[DisableDefaultCtor] // Do not subclass or create instances of this class yourself. -> Handle is nil if init is called
interface WKInterfaceGroup : WKImageAnimatable {
@ -557,6 +565,7 @@ namespace WatchKit {
}
[iOS (8,2)]
[Unavailable (PlatformName.iOS)]
[BaseType (typeof (WKInterfaceObject))]
[DisableDefaultCtor] // Do not subclass or create instances of this class yourself. -> Handle is nil if init is called
interface WKInterfaceImage : WKImageAnimatable {
@ -574,6 +583,7 @@ namespace WatchKit {
}
[iOS (8,2)]
[Unavailable (PlatformName.iOS)]
[DisableDefaultCtor] // Do not subclass or create instances of this class yourself. -> Handle is nil if init is called
[BaseType (typeof (WKInterfaceObject))]
interface WKInterfaceLabel {
@ -589,6 +599,7 @@ namespace WatchKit {
}
[iOS (8,2)]
[Unavailable (PlatformName.iOS)]
[DisableDefaultCtor] // Do not subclass or create instances of this class yourself. -> Handle is nil if init is called
[BaseType (typeof (WKInterfaceObject))]
interface WKInterfaceDate {
@ -603,6 +614,7 @@ namespace WatchKit {
}
[iOS (8,2)]
[Unavailable (PlatformName.iOS)]
[DisableDefaultCtor] // Do not subclass or create instances of this class yourself. -> Handle is nil if init is called
[BaseType (typeof (WKInterfaceObject))]
interface WKInterfaceTimer {
@ -621,6 +633,7 @@ namespace WatchKit {
}
[iOS (8,2)]
[Unavailable (PlatformName.iOS)]
[DisableDefaultCtor] // Do not subclass or create instances of this class yourself. -> Handle is nil if init is called
[BaseType (typeof (WKInterfaceObject))]
interface WKInterfaceTable {
@ -659,6 +672,7 @@ namespace WatchKit {
}
[iOS (8,2)]
[Unavailable (PlatformName.iOS)]
[DisableDefaultCtor] // Do not subclass or create instances of this class yourself. -> Handle is nil if init is called
[BaseType (typeof (WKInterfaceObject))]
interface WKInterfaceMap {
@ -683,6 +697,7 @@ namespace WatchKit {
}
[iOS (8,2)]
[Unavailable (PlatformName.iOS)]
[DisableDefaultCtor] // Do not subclass or create instances of this class yourself. -> Handle is nil if init is called
[BaseType (typeof (WKInterfaceObject))]
interface WKInterfaceSeparator {
@ -691,6 +706,7 @@ namespace WatchKit {
}
[iOS (8,2)]
[Unavailable (PlatformName.iOS)]
[DisableDefaultCtor] // Do not subclass or create instances of this class yourself. -> Handle is nil if init is called
[BaseType (typeof (WKInterfaceObject))]
interface WKInterfaceSlider {
@ -708,6 +724,7 @@ namespace WatchKit {
}
[iOS (8,2)]
[Unavailable (PlatformName.iOS)]
[DisableDefaultCtor] // Do not subclass or create instances of this class yourself. -> Handle is nil if init is called
[BaseType (typeof (WKInterfaceObject))]
interface WKInterfaceSwitch {
@ -729,6 +746,7 @@ namespace WatchKit {
}
[iOS (8,2)]
[Unavailable (PlatformName.iOS)]
[BaseType (typeof (NSObject))]
interface WKAccessibilityImageRegion {
@ -743,6 +761,7 @@ namespace WatchKit {
interface IWKImageAnimatable {}
[iOS (9,0)]
[Unavailable (PlatformName.iOS)]
[Protocol]
interface WKImageAnimatable {
[iOS (8,2)]

Просмотреть файл

@ -140,12 +140,6 @@ namespace Xamarin.Tests
var msg = new ToolMessage ();
var origin = string.Empty;
// FIXME: remove this warning check once WatchKit is back with us again.
if (l.Contains ("warning MT0099: Not linking with WatchKit because Xcode 11 beta 1 does not ship with the WatchKit framework")) {
// Ignore this line since it's confusing all our tests that asserts the exact number of warnings we get.
continue;
}
if (IndexOfAny (line, out var idxError, out var endError, ": error ", ": error ")) {
msg.IsError = true;
origin = line.Substring (0, idxError);

Просмотреть файл

@ -803,7 +803,6 @@ namespace Test {
[Protocol] [BaseType (typeof (NSObject))] interface M349 : IUNNotificationContentExtension {}
[Protocol] [BaseType (typeof (NSObject))] interface M350 : IWKUIDelegate {}
[Protocol] [BaseType (typeof (NSObject))] interface M351 : IUINavigationControllerDelegate {}
[Protocol] [BaseType (typeof (NSObject))] interface M352 : IWKImageAnimatable {}
[Protocol] [BaseType (typeof (NSObject))] interface M353 : IUIObjectRestoration {}
[Protocol] [BaseType (typeof (NSObject))] interface M354 : IUIPickerViewDataSource {}
[Protocol] [BaseType (typeof (NSObject))] interface M355 : IVSAccountManagerDelegate {}

Просмотреть файл

@ -134,6 +134,13 @@ namespace Introspection {
return TestRuntime.CheckSystemVersion (PlatformName.MacOSX, 10, 14, 4); // Broke in macOS 10.14.4.
}
#if __IOS__
switch (type.Namespace) {
case "WatchKit":
return true; // WatchKit has been removed from iOS.
}
#endif
return SkipDueToAttribute (type);
}

Просмотреть файл

@ -203,6 +203,9 @@ namespace Introspection {
if (p.PropertyType.FullName != NSStringType)
continue;
if (p.GetCustomAttribute<ObsoleteAttribute> () != null)
continue;
string name;
bool result = CheckAgainstNull (p, out name);
if (!result) {

Просмотреть файл

@ -58,6 +58,7 @@ namespace Introspection {
// Some CF* types that requires CFNetwork which we always link with
// ref: tools/common/CompilerFlags.cs
case "CoreServices":
case "WatchKit": // Apple removed WatchKit from iOS
return true;
#elif __TVOS__ && !XAMCORE_4_0
// mistakes (can't be fixed without breaking binary compatibility)

Просмотреть файл

@ -17,6 +17,10 @@ namespace Extrospection {
if (!type.IsEnum || type.IsNested)
return;
// exclude obsolete enums, presumably we already know there's something wrong with them if they've been obsoleted.
if (type.IsObsolete ())
return;
var name = type.Name;
// e.g. WatchKit.WKErrorCode and WebKit.WKErrorCode :-(
if (!enums.TryGetValue (name, out var td))

Просмотреть файл

@ -1,8 +0,0 @@
## the returned type WKCrownSequencer is not available on iOS (watchOS only)
### not reported due to lack of WatchKit headers in xcode 11 beta 1
###!missing-selector! WKInterfaceController::crownSequencer not bound
## deprecated (and likely never supported from iOS, but in the headers)
### not reported due to lack of WatchKit headers in xcode 11 beta 1
###!missing-selector! WKInterfaceController::beginGlanceUpdates not bound
###!missing-selector! WKInterfaceController::endGlanceUpdates not bound

Просмотреть файл

@ -1,22 +0,0 @@
!unknown-field! WatchKitErrorDomain bound
!unknown-native-enum! WKInterfaceMapPinColor bound
!unknown-native-enum! WKMenuItemIcon bound
!unknown-native-enum! WKTextInputMode bound
!unknown-native-enum! WKUserNotificationInterfaceType bound
!unknown-protocol! WKImageAnimatable bound
!unknown-type! WKAccessibilityImageRegion bound
!unknown-type! WKInterfaceButton bound
!unknown-type! WKInterfaceController bound
!unknown-type! WKInterfaceDate bound
!unknown-type! WKInterfaceDevice bound
!unknown-type! WKInterfaceGroup bound
!unknown-type! WKInterfaceImage bound
!unknown-type! WKInterfaceLabel bound
!unknown-type! WKInterfaceMap bound
!unknown-type! WKInterfaceObject bound
!unknown-type! WKInterfaceSeparator bound
!unknown-type! WKInterfaceSlider bound
!unknown-type! WKInterfaceSwitch bound
!unknown-type! WKInterfaceTable bound
!unknown-type! WKInterfaceTimer bound
!unknown-type! WKUserNotificationInterfaceController bound

Просмотреть файл

@ -1,9 +1,3 @@
## unfortunate (but required for API compatibility) the name exists in both WatchKit and WebKit namespaces
## it's reported as missing here because it's removed from the list when processing WatchKit
### not reported due to lack of WatchKit headers in xcode 11 beta 1
!duplicate-type-name! WKErrorCode enum exists as both WebKit.WKErrorCode and WatchKit.WKErrorCode
###!missing-enum! WKErrorCode not bound
# Moved into a *deprecated* category that is now visible from iOS (but were only on macOS before)
!missing-selector! WKPreferences::javaEnabled not bound
!missing-selector! WKPreferences::plugInsEnabled not bound

Просмотреть файл

@ -9,8 +9,6 @@
## unsorted
!duplicate-type-name! NSFileWrapperReadingOptions enum exists as both Foundation.NSFileWrapperReadingOptions and AppKit.NSFileWrapperReadingOptions
!duplicate-type-name! NSWritingDirection enum exists as both Foundation.NSWritingDirection and AppKit.NSWritingDirection
!extra-designated-initializer! NSScriptCommand::initWithCoder: is incorrectly decorated with an [DesignatedInitializer] attribute
!extra-protocol-member! unexpected selector NSURLSessionDelegate::URLSessionDidFinishEventsForBackgroundURLSession: found
!missing-enum! NSBackgroundActivityResult not bound

Просмотреть файл

@ -76,6 +76,3 @@
!missing-selector! GKVoiceChatService::stopVoiceChatWithParticipantID: not bound
!missing-selector! +GKVoiceChatService::defaultVoiceChatService not bound
!missing-selector! +GKVoiceChatService::isVoIPAllowed not bound
## enum removed in Xcode 10 - but it's a breaking change for us
!unknown-native-enum! GKGameSessionErrorCode bound

Просмотреть файл

@ -268,7 +268,7 @@ public class Frameworks : Dictionary <string, Framework>
{ "WebKit", "WebKit", 8 },
{ "NetworkExtension", "NetworkExtension", 8 },
{ "VideoToolbox", "VideoToolbox", 8 },
{ "WatchKit", "WatchKit", 8,2 },
// { "WatchKit", "WatchKit", 8,2 }, // Removed in Xcode 11
{ "ReplayKit", "ReplayKit", 9 },
{ "Contacts", "Contacts", 9 },

Просмотреть файл

@ -2183,15 +2183,6 @@ namespace Registrar {
}
goto default;
#endif
case "WatchKit":
// There's a bug in Xcode 7 beta 2 headers where the build fails with
// ObjC++ files if WatchKit.h is included before UIKit.h (radar 21651022).
// Workaround this by manually include UIKit.h before WatchKit.h.
if (!namespaces.Contains ("UIKit"))
header.WriteLine ("#import <UIKit/UIKit.h>");
header.WriteLine ("#import <WatchKit/WatchKit.h>");
namespaces.Add ("UIKit");
return;
case "QTKit":
#if MONOMAC
if (App.SdkVersion >= MacOSTenTwelveVersion)
@ -2692,9 +2683,11 @@ namespace Registrar {
if (IsTypeCore (@class, "Photos") || IsTypeCore (@class, "PhotosUI"))
continue;
// Xcode 11 beta 1 shipped without WatchKit for iOS!
if (IsTypeCore (@class, "WatchKit") && App.Platform == Xamarin.Utils.ApplePlatform.iOS)
// Xcode 11 removed WatchKit for iOS!
if (IsTypeCore (@class, "WatchKit") && App.Platform == Xamarin.Utils.ApplePlatform.iOS) {
exceptions.Add (ErrorHelper.CreateWarning (4178, $"The class '{@class.Type.FullName}' will not be registered because the WatchKit framework has been removed from the iOS SDK."));
continue;
}
if (@class.IsFakeProtocol)
continue;

Просмотреть файл

@ -197,9 +197,9 @@ namespace Xamarin.Bundler {
}
break;
case "WatchKit":
// Xcode 11 beta 1 doesn't ship WatchKit for iOS
// Xcode 11 doesn't ship WatchKit for iOS
if (Driver.XcodeVersion.Major == 11 && App.Platform == ApplePlatform.iOS) {
ErrorHelper.Warning (99, "Not linking with WatchKit because Xcode 11 beta 1 does not ship with the WatchKit framework.");
ErrorHelper.Warning (5219, "Not linking with WatchKit because it has been removed from iOS.");
continue;
}
break;

Просмотреть файл

@ -154,6 +154,7 @@ SIMLAUNCHER_FRAMEWORKS = \
# note 4: GameCenter was removed in Xcode 7 beta 5, and GameKit is back.
# note 5: Metal* seems to be supported as of some Xcode 7 beta (b2 didn't, but the final release does)
# note 6: Xcode 11 beta 1 shipped without WatchKit.
# note 7: Xcode 11 beta 3 documented that shipping without WatchKit was done on purpose (in the release notes).
# keep the above list of weak_framework in sync with mtouch.cs
# except it is no a mistake that GameController and MediaAccessibility (#13636) are not built into simlauncher