react-native-bluebreeze 0.0.10 → 0.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -101,7 +101,7 @@ dependencies {
101
101
  implementation "com.facebook.react:react-android"
102
102
  implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
103
103
 
104
- implementation "dev.likemagic:bluebreeze:0.0.9"
104
+ implementation "dev.likemagic:bluebreeze:0.0.14"
105
105
  }
106
106
 
107
107
  if (isNewArchitectureEnabled()) {
@@ -398,7 +398,7 @@ class BlueBreezeModule(reactContext: ReactApplicationContext) : NativeBlueBreeze
398
398
 
399
399
  val writeValue = ByteArray(data?.size() ?: 0)
400
400
  data?.toArrayList()?.forEachIndexed { index, v ->
401
- writeValue[index] = (v as Int).toByte()
401
+ writeValue[index] = (v as Number).toInt().toByte()
402
402
  }
403
403
 
404
404
  async {
@@ -569,7 +569,7 @@ val BBService.toJs: WritableMap
569
569
  val ByteArray.toJs: WritableArray
570
570
  get() {
571
571
  val result = Arguments.createArray()
572
- forEach { result.pushInt(it.toInt()) }
572
+ forEach { result.pushInt(it.toInt() and 0xFF) }
573
573
  return result
574
574
  }
575
575
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-bluebreeze",
3
- "version": "0.0.10",
3
+ "version": "0.0.12",
4
4
  "description": "BlueBreeze bindings for React Native. A modern Bluetooth LE library.",
5
5
  "source": "./src/index.tsx",
6
6
  "main": "./lib/commonjs/index.js",
@@ -17,7 +17,7 @@ Pod::Spec.new do |s|
17
17
  s.source_files = "ios/**/*.{h,m,mm,cpp,swift}"
18
18
  s.private_header_files = "ios/**/*.h"
19
19
 
20
- s.dependency "BlueBreeze", "~> 0.0.14"
20
+ s.dependency "BlueBreeze", "0.0.16"
21
21
 
22
22
  # Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
23
23
  # See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.