[homekit] Remove export for 'RemoveUser' (iOS prohibited) (#4542)

We want to remove the native API because it's prohibited and Apple could reject apps with it. Therefore we exposed empty stubs to avoid breaking the API.
This commit is contained in:
Vincent Dondain 2018-08-01 08:13:49 -04:00 коммит произвёл Sebastien Pouliot
Родитель 7f30793364
Коммит 52aae1858b
3 изменённых файлов: 19 добавлений и 7 удалений

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

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using ObjCRuntime;
using Foundation;
@ -80,5 +81,21 @@ namespace HomeKit {
return GetServices (arr.ToArray ());
}
[NoTV]
[NoWatch]
[Introduced (PlatformName.iOS, 8,0, PlatformArchitecture.All, message: "This API in now prohibited on iOS. Use 'ManageUsers' instead.")]
[Obsoleted (PlatformName.iOS, 9,0, PlatformArchitecture.All, message: "This API in now prohibited on iOS. Use 'ManageUsers' instead.")]
public virtual void RemoveUser (HMUser user, Action<NSError> completion) {
throw new NotSupportedException ();
}
[NoTV]
[NoWatch]
[Introduced (PlatformName.iOS, 8,0, PlatformArchitecture.All, message: "This API in now prohibited on iOS. Use 'ManageUsers' instead.")]
[Obsoleted (PlatformName.iOS, 9,0, PlatformArchitecture.All, message: "This API in now prohibited on iOS. Use 'ManageUsers' instead.")]
public virtual Task RemoveUserAsync (HMUser user) {
throw new NotSupportedException ();
}
}
}

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

@ -719,13 +719,6 @@ namespace HomeKit {
[Export ("addUserWithCompletionHandler:")]
void AddUser (Action<HMUser,NSError> completion);
[NoTV]
[NoWatch]
[Availability (Introduced = Platform.iOS_8_0, Deprecated = Platform.iOS_9_0, Message = "Use 'ManageUsers' instead.")]
[Async]
[Export ("removeUser:completionHandler:")]
void RemoveUser (HMUser user, Action<NSError> completion);
[iOS (9,0)]
[Export ("currentUser", ArgumentSemantic.Strong)]
HMUser CurrentUser { get; }

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

@ -0,0 +1,2 @@
## API prohibited on iOS since Xcode 10
!missing-selector! HMHome::removeUser:completionHandler: not bound