alexkendall / react-native-bluetooth-cross-platform

Cross-Platform Bluetooth & WiFi React Native Module. Powered by underdark http://underdark.io/.
179 stars 35 forks source link

⚠️ [Meta] React Autolinking, Types (TypeScript) and deprecated code #59

Open mrousavy opened 4 years ago

mrousavy commented 4 years ago
  1. Since react native modules have evolved pretty quickly, it is very bad practice to let the library consumer manually move files, link frameworks and set other things up. Instead, autolinking should be used for this process.

  2. Also, plain old JavaScript libraries are pretty hard to use, that's why there should be a TypeScript type declaration file - I'd gladly write that one and create a PR.

  3. The iOS and Android source code is pretty old, for instance Swift's string.characters property is deprecated, substring(with:) is deprecated and more. Very little effort for that, but it should be mentioned.

  4. One last thing (not sure if I shouldn't create a separate issue for this) but I'm getting the following warning:

Simulator Screen Shot - iPhone 11 - 2020-05-25 at 15 24 54

Sounds to me like something is deprecated here aswell.

I'm not sure if you're still interested in working on this project @alexkendall , but it would be quite awesome since you know your way around the project. Also, I haven't seen any other React-Native Bluetooth libraries that support connecting from phone to phone (cross platform!).