Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HomeKit] Updates for Xcode13 Beta 1-2 #12092

Merged
merged 13 commits into from
Aug 3, 2021
2 changes: 2 additions & 0 deletions src/HomeKit/HMEnums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ public enum HMError : long {
TimedOutWaitingForAccessory = 100,
AccessoryCommunicationFailure = 101,
FailedToJoinNetwork = 102,
// iOS 15
AccessoryIsSuspended = 103,
}


Expand Down
73 changes: 73 additions & 0 deletions src/homekit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1874,5 +1874,78 @@ interface HMAccessControl {

}

delegate void HMErrorHandler ([NullAllowed] NSError error);

[iOS (15,0), Watch (8,0), TV (15,0), MacCatalyst (15,0)]
[BaseType (typeof (NSObject))]
interface HMAccessorySetupManager
{
[Async]
[Export ("addAndSetUpAccessoriesForTopology:completionHandler:")]
void AddAndSetUpAccessories (HMChipServiceTopology topology, HMErrorHandler completion);
}

[iOS (15,0), Watch (8,0), TV (15,0), MacCatalyst (15,0)]
[BaseType (typeof (NSObject), Name = "HMCHIPServiceHome")]
[DisableDefaultCtor]
interface HMChipServiceHome : NSCopying, NSSecureCoding
{
[Export ("uuid", ArgumentSemantic.Strong)]
NSUuid Uuid { get; }

[Export ("name", ArgumentSemantic.Strong)]
string Name { get; }

[Export ("initWithUUID:name:")]
[DesignatedInitializer]
IntPtr Constructor (NSUuid uuid, string name);
}

delegate void FetchRoomHandler (NSArray<HMChipServiceRoom> rooms, NSError error);

[iOS (15,0), Watch (8,0), TV (15,0), MacCatalyst (15,0)]
[BaseType (typeof (NSObject), Name = "HMCHIPServiceRequestHandler")]
interface HMChipServiceRequestHandler : NSExtensionRequestHandling
{
[Async]
[Export ("fetchRoomsInHome:completion:")]
void FetchRooms (HMChipServiceHome home, FetchRoomHandler completion);

[Async]
[Export ("pairAccessoryInHome:onboardingPayload:completion:")]
void PairAccessory (HMChipServiceHome home, string onboardingPayload, Action<NSError> completion);

[Async]
[Export ("configureAccessoryWithName:room:completion:")]
void ConfigureAccessory (string accessoryName, HMChipServiceRoom accessoryRoom, Action<NSError> completion);
}

[iOS (15,0), Watch (8,0), TV (15,0), MacCatalyst (15,0)]
[BaseType (typeof (NSObject), Name = "HMCHIPServiceRoom")]
[DisableDefaultCtor]
interface HMChipServiceRoom : NSCopying, NSSecureCoding
{
[Export ("uuid", ArgumentSemantic.Strong)]
NSUuid Uuid { get; }

[Export ("name", ArgumentSemantic.Strong)]
string Name { get; }

[Export ("initWithUUID:name:")]
[DesignatedInitializer]
IntPtr Constructor (NSUuid uuid, string name);
}

[iOS (15,0), Watch (8,0), TV (15,0), MacCatalyst (15,0)]
[BaseType (typeof (NSObject), Name = "HMCHIPServiceTopology")]
[DisableDefaultCtor]
interface HMChipServiceTopology : NSCopying, NSSecureCoding
{
[Export ("initWithHomes:")]
IntPtr Constructor (HMChipServiceHome[] homes);

[Export ("homes", ArgumentSemantic.Copy)]
HMChipServiceHome[] Homes { get; }
}

}
18 changes: 0 additions & 18 deletions tests/xtro-sharpie/iOS-HomeKit.todo

This file was deleted.

18 changes: 0 additions & 18 deletions tests/xtro-sharpie/tvOS-HomeKit.todo

This file was deleted.

18 changes: 0 additions & 18 deletions tests/xtro-sharpie/watchOS-HomeKit.todo

This file was deleted.

1 change: 0 additions & 1 deletion tools/common/Frameworks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,6 @@ public static Frameworks GetMacCatalystFrameworks ()
case "HealthKitUI":
case "iAd":
case "IdentityLookupUI":
case "HomeKit":
rolfbjarne marked this conversation as resolved.
Show resolved Hide resolved
case "Messages":
case "MessageUI":
case "VisionKit":
Expand Down