simplejsble 0.0.49 → 0.0.50

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.
@@ -10,16 +10,17 @@
10
10
  <key>HeadersPath</key>
11
11
  <string>Headers</string>
12
12
  <key>LibraryIdentifier</key>
13
- <string>macos-arm64_x86_64</string>
13
+ <string>ios-arm64-simulator</string>
14
14
  <key>LibraryPath</key>
15
15
  <string>libsimpleble.a</string>
16
16
  <key>SupportedArchitectures</key>
17
17
  <array>
18
18
  <string>arm64</string>
19
- <string>x86_64</string>
20
19
  </array>
21
20
  <key>SupportedPlatform</key>
22
- <string>macos</string>
21
+ <string>ios</string>
22
+ <key>SupportedPlatformVariant</key>
23
+ <string>simulator</string>
23
24
  </dict>
24
25
  <dict>
25
26
  <key>BinaryPath</key>
@@ -43,17 +44,16 @@
43
44
  <key>HeadersPath</key>
44
45
  <string>Headers</string>
45
46
  <key>LibraryIdentifier</key>
46
- <string>ios-arm64-simulator</string>
47
+ <string>macos-arm64_x86_64</string>
47
48
  <key>LibraryPath</key>
48
49
  <string>libsimpleble.a</string>
49
50
  <key>SupportedArchitectures</key>
50
51
  <array>
51
52
  <string>arm64</string>
53
+ <string>x86_64</string>
52
54
  </array>
53
55
  <key>SupportedPlatform</key>
54
- <string>ios</string>
55
- <key>SupportedPlatformVariant</key>
56
- <string>simulator</string>
56
+ <string>macos</string>
57
57
  </dict>
58
58
  </array>
59
59
  <key>CFBundlePackageType</key>
@@ -165,7 +165,7 @@ void HybridPeripheral::write_descriptor(const std::string& service, const std::s
165
165
 
166
166
  // Helper methods to cast between SimpleBLE::ByteArray and ArrayBuffer (NitroModules native type)
167
167
  std::shared_ptr<ArrayBuffer> HybridPeripheral::toArrayBuffer(const SimpleBLE::ByteArray& data) {
168
- return std::make_shared<ArrayBuffer>(reinterpret_cast<const uint8_t*>(data.data()), data.size());
168
+ return ArrayBuffer::copy(reinterpret_cast<const uint8_t*>(data.data()), data.size());
169
169
  }
170
170
 
171
171
  SimpleBLE::ByteArray HybridPeripheral::fromArrayBuffer(const std::shared_ptr<ArrayBuffer>& buffer) {
@@ -13,7 +13,7 @@ std::string HybridService::uuid() {
13
13
 
14
14
  std::shared_ptr<ArrayBuffer> HybridService::data() {
15
15
  SimpleBLE::ByteArray bytes = _service.data();
16
- return std::make_shared<ArrayBuffer>(reinterpret_cast<const uint8_t*>(bytes.data()), bytes.size());
16
+ return ArrayBuffer::copy(reinterpret_cast<const uint8_t*>(bytes.data()), bytes.size());
17
17
  }
18
18
 
19
19
  std::vector<std::shared_ptr<HybridCharacteristicSpec>> HybridService::characteristics() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "simplejsble",
3
- "version": "0.0.49",
3
+ "version": "0.0.50",
4
4
  "description": "React Native Bluetooth Low Energy library using SimpleBLE with Nitro Modules",
5
5
  "main": "lib/index",
6
6
  "module": "lib/index",