zoontek / zoontek/react-native-permissions

Homekit Feature

Open
#800 0 comments 0 reactions 1 assignee View on GitHub

@zoontek is already working on this.

Since Aug 25, 2023.

feature request
Dominant language
Objective-C++
Stars
4.4k
Forks
844
Avg merge
11d 18h
Merged PRs (30d)
1

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
    }

}

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.