-
-
Notifications
You must be signed in to change notification settings - Fork 847
Open
Labels
feature requestNew feature or requestNew feature or request
Description
Why it is needed?
For react native, specifically for IOS, we do not see permission enablement for Homekit. In order to implement this there is a native implementation required.
Can anyone help in this
Possible implementation
Add Homekit module for IOS
Code sample
@objc(MyHomeKitModule)
class MyHomeKitModule: RCTBridgeModule {
@objc func requestHomeKitPermission() {
HMHomeManager.shared().requestHomeKitPermission { (success, error) in
if success {
// HomeKit permission has been granted.
} else if let error = error {
// HomeKit permission has been denied or an error occurred.
}
}
}
@objc func isHomeKitEnabled() -> Bool {
return HMHomeManager.shared().isHomeKitEnabled
}
}Metadata
Metadata
Assignees
Labels
feature requestNew feature or requestNew feature or request