DonkeyRepublic / lockkit-ios

Donkey Lock Kit for iOS
0 stars 1 forks source link

React Native module support #2

Open georgibakken opened 2 years ago

georgibakken commented 2 years ago

Hi @donkeyrepublicios,

We would like to use your native SDKs to integrate with the Bluetooth lock, however we are using react-native. There is support to use react native modules to bridge native SDKs to JavaScript. Let's start with iOS for now.

After some digging, we have found a guide on how to setup this and use it in our project, however we might need some assistance/files from you.

In the linked to guide, they use Blueshift as an example which has the native SDKs. Specifically under the section Add the React Native bridge our needs appear.

Blueshift has written (they have actually themselves added a react native plugin after the guide has been written) some instructions on how to bridge to react-native.

There seems to be some files we need (see more details in their instructions):

  1. A .m and a .h file
  2. A .swift file

Perhaps we are able to create these files ourselves, especially the ones under point 1. The .swift file I am not so sure about. I believe it will be easier and quicker for you to provide us with them.

Is this something you would be able to help us with? Please ask any questions, we will try to answer as good as we can. This is also pretty new to us.

georgibakken commented 2 years ago

After trying ourselves to make the different files, it would be highly appreciated to get them from you. However, the best solution would probably to have you create a npm module for your SDKs