simplejsble 0.0.42 → 0.0.45
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.
- package/apple/SimpleBLE.xcframework/Info.plist +8 -8
- package/apple/SimpleBLE.xcframework/ios-arm64/libsimpleble.a +0 -0
- package/apple/SimpleBLE.xcframework/ios-arm64-simulator/libsimpleble.a +0 -0
- package/apple/SimpleBLE.xcframework/macos-arm64_x86_64/libsimpleble.a +0 -0
- package/cpp/HybridAdapter.cpp +0 -8
- package/cpp/HybridAdapter.hpp +0 -1
- package/lib/index.d.ts +0 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +0 -1
- package/lib/specs/Adapter.nitro.d.ts +0 -6
- package/lib/specs/Adapter.nitro.d.ts.map +1 -1
- package/nitrogen/generated/shared/c++/HybridAdapterSpec.cpp +0 -1
- package/nitrogen/generated/shared/c++/HybridAdapterSpec.hpp +0 -1
- package/package.json +1 -1
- package/src/index.ts +1 -2
- package/src/specs/Adapter.nitro.ts +0 -7
- package/apple/CMAKE_INSTALL_OPTIONS.md +0 -50
|
@@ -10,16 +10,17 @@
|
|
|
10
10
|
<key>HeadersPath</key>
|
|
11
11
|
<string>Headers</string>
|
|
12
12
|
<key>LibraryIdentifier</key>
|
|
13
|
-
<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>
|
|
21
|
+
<string>ios</string>
|
|
22
|
+
<key>SupportedPlatformVariant</key>
|
|
23
|
+
<string>simulator</string>
|
|
23
24
|
</dict>
|
|
24
25
|
<dict>
|
|
25
26
|
<key>BinaryPath</key>
|
|
@@ -27,15 +28,16 @@
|
|
|
27
28
|
<key>HeadersPath</key>
|
|
28
29
|
<string>Headers</string>
|
|
29
30
|
<key>LibraryIdentifier</key>
|
|
30
|
-
<string>
|
|
31
|
+
<string>macos-arm64_x86_64</string>
|
|
31
32
|
<key>LibraryPath</key>
|
|
32
33
|
<string>libsimpleble.a</string>
|
|
33
34
|
<key>SupportedArchitectures</key>
|
|
34
35
|
<array>
|
|
35
36
|
<string>arm64</string>
|
|
37
|
+
<string>x86_64</string>
|
|
36
38
|
</array>
|
|
37
39
|
<key>SupportedPlatform</key>
|
|
38
|
-
<string>
|
|
40
|
+
<string>macos</string>
|
|
39
41
|
</dict>
|
|
40
42
|
<dict>
|
|
41
43
|
<key>BinaryPath</key>
|
|
@@ -43,7 +45,7 @@
|
|
|
43
45
|
<key>HeadersPath</key>
|
|
44
46
|
<string>Headers</string>
|
|
45
47
|
<key>LibraryIdentifier</key>
|
|
46
|
-
<string>ios-arm64
|
|
48
|
+
<string>ios-arm64</string>
|
|
47
49
|
<key>LibraryPath</key>
|
|
48
50
|
<string>libsimpleble.a</string>
|
|
49
51
|
<key>SupportedArchitectures</key>
|
|
@@ -52,8 +54,6 @@
|
|
|
52
54
|
</array>
|
|
53
55
|
<key>SupportedPlatform</key>
|
|
54
56
|
<string>ios</string>
|
|
55
|
-
<key>SupportedPlatformVariant</key>
|
|
56
|
-
<string>simulator</string>
|
|
57
57
|
</dict>
|
|
58
58
|
</array>
|
|
59
59
|
<key>CFBundlePackageType</key>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/cpp/HybridAdapter.cpp
CHANGED
|
@@ -102,12 +102,4 @@ std::vector<std::shared_ptr<HybridPeripheralSpec>> HybridAdapter::get_paired_per
|
|
|
102
102
|
return result;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
std::vector<std::shared_ptr<HybridPeripheralSpec>> HybridAdapter::get_connected_peripherals() {
|
|
106
|
-
std::vector<std::shared_ptr<HybridPeripheralSpec>> result;
|
|
107
|
-
for (auto& peripheral : _adapter.get_connected_peripherals()) {
|
|
108
|
-
result.push_back(std::make_shared<HybridPeripheral>(std::move(peripheral)));
|
|
109
|
-
}
|
|
110
|
-
return result;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
105
|
} // namespace margelo::nitro::simplejsble
|
package/cpp/HybridAdapter.hpp
CHANGED
|
@@ -38,7 +38,6 @@ class HybridAdapter : public HybridAdapterSpec {
|
|
|
38
38
|
const std::function<void(const std::shared_ptr<HybridPeripheralSpec>&)>& callback) override;
|
|
39
39
|
|
|
40
40
|
std::vector<std::shared_ptr<HybridPeripheralSpec>> get_paired_peripherals() override;
|
|
41
|
-
std::vector<std::shared_ptr<HybridPeripheralSpec>> get_connected_peripherals() override;
|
|
42
41
|
|
|
43
42
|
private:
|
|
44
43
|
SimpleBLE::Adapter _adapter;
|
package/lib/index.d.ts
CHANGED
|
@@ -2,5 +2,4 @@ import type { Adapter } from "./specs/Adapter.nitro";
|
|
|
2
2
|
import type { Peripheral, BluetoothAddressType } from "./specs/Peripheral.nitro";
|
|
3
3
|
export type { Adapter, Peripheral, BluetoothAddressType };
|
|
4
4
|
export declare const HybridAdapter: Adapter;
|
|
5
|
-
export declare const HybridPeripheral: Peripheral;
|
|
6
5
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEjF,YAAY,EAAE,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,CAAC;AAE1D,eAAO,MAAM,aAAa,SAAsD,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEjF,YAAY,EAAE,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,CAAC;AAE1D,eAAO,MAAM,aAAa,SAAsD,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -76,11 +76,5 @@ export interface Adapter extends HybridObject<{
|
|
|
76
76
|
* or those you've connected to.
|
|
77
77
|
*/
|
|
78
78
|
get_paired_peripherals(): Peripheral[];
|
|
79
|
-
/**
|
|
80
|
-
* Retrieve a list of all connected peripherals.
|
|
81
|
-
* Currently only implemented on Windows.
|
|
82
|
-
* Note: This could potentially be implemented on Android/iOS but is not yet available.
|
|
83
|
-
*/
|
|
84
|
-
get_connected_peripherals(): Peripheral[];
|
|
85
79
|
}
|
|
86
80
|
//# sourceMappingURL=Adapter.nitro.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Adapter.nitro.d.ts","sourceRoot":"","sources":["../../src/specs/Adapter.nitro.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAEpD;;GAEG;AACH,MAAM,WAAW,OACf,SAAQ,YAAY,CAAC;IACnB,GAAG,EAAE,KAAK,CAAA;IACV,OAAO,EAAE,KAAK,CAAA;CACf,CAAC;IACF;;OAEG;IACH,iBAAiB,IAAI,OAAO,CAAA;IAE5B;;OAEG;IACH,YAAY,IAAI,OAAO,EAAE,CAAA;IAEzB;;OAEG;IACH,WAAW,IAAI,OAAO,CAAA;IAEtB;;OAEG;IACH,UAAU,IAAI,MAAM,CAAA;IAEpB;;OAEG;IACH,OAAO,IAAI,MAAM,CAAA;IAEjB;;OAEG;IACH,UAAU,IAAI,OAAO,CAAA;IAErB;;OAEG;IACH,UAAU,IAAI,IAAI,CAAA;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ACH,UAAU,IAAI,IAAI,CAAA;IAElB;;OAEG;IACH,SAAS,IAAI,IAAI,CAAA;IAEjB;;;OAGG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IAElC;;OAEG;IACH,cAAc,IAAI,OAAO,CAAA;IAEzB;;OAEG;IACH,gBAAgB,IAAI,UAAU,EAAE,CAAA;IAEhC;;OAEG;IACH,0BAA0B,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI,CAAA;IAEtD;;OAEG;IACH,yBAAyB,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI,CAAA;IAErD;;OAEG;IACH,4BAA4B,CAAC,QAAQ,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,GAAG,IAAI,CAAA;IAE9E;;OAEG;IACH,0BAA0B,CAAC,QAAQ,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,GAAG,IAAI,CAAA;IAE5E;;;;;;OAMG;IACH,sBAAsB,IAAI,UAAU,EAAE,CAAA;CACvC"}
|
|
@@ -30,7 +30,6 @@ namespace margelo::nitro::simplejsble {
|
|
|
30
30
|
prototype.registerHybridMethod("set_callback_on_scan_updated", &HybridAdapterSpec::set_callback_on_scan_updated);
|
|
31
31
|
prototype.registerHybridMethod("set_callback_on_scan_found", &HybridAdapterSpec::set_callback_on_scan_found);
|
|
32
32
|
prototype.registerHybridMethod("get_paired_peripherals", &HybridAdapterSpec::get_paired_peripherals);
|
|
33
|
-
prototype.registerHybridMethod("get_connected_peripherals", &HybridAdapterSpec::get_connected_peripherals);
|
|
34
33
|
});
|
|
35
34
|
}
|
|
36
35
|
|
|
@@ -72,7 +72,6 @@ namespace margelo::nitro::simplejsble {
|
|
|
72
72
|
virtual void set_callback_on_scan_updated(const std::function<void(const std::shared_ptr<HybridPeripheralSpec>& /* peripheral */)>& callback) = 0;
|
|
73
73
|
virtual void set_callback_on_scan_found(const std::function<void(const std::shared_ptr<HybridPeripheralSpec>& /* peripheral */)>& callback) = 0;
|
|
74
74
|
virtual std::vector<std::shared_ptr<HybridPeripheralSpec>> get_paired_peripherals() = 0;
|
|
75
|
-
virtual std::vector<std::shared_ptr<HybridPeripheralSpec>> get_connected_peripherals() = 0;
|
|
76
75
|
|
|
77
76
|
protected:
|
|
78
77
|
// Hybrid Setup
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -4,5 +4,4 @@ import type { Peripheral, BluetoothAddressType } from "./specs/Peripheral.nitro"
|
|
|
4
4
|
|
|
5
5
|
export type { Adapter, Peripheral, BluetoothAddressType };
|
|
6
6
|
|
|
7
|
-
export const HybridAdapter = NitroModules.createHybridObject<Adapter>("Adapter");
|
|
8
|
-
export const HybridPeripheral = NitroModules.createHybridObject<Peripheral>("Peripheral");
|
|
7
|
+
export const HybridAdapter = NitroModules.createHybridObject<Adapter>("Adapter");
|
|
@@ -93,11 +93,4 @@ export interface Adapter
|
|
|
93
93
|
* or those you've connected to.
|
|
94
94
|
*/
|
|
95
95
|
get_paired_peripherals(): Peripheral[]
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* Retrieve a list of all connected peripherals.
|
|
99
|
-
* Currently only implemented on Windows.
|
|
100
|
-
* Note: This could potentially be implemented on Android/iOS but is not yet available.
|
|
101
|
-
*/
|
|
102
|
-
get_connected_peripherals(): Peripheral[]
|
|
103
96
|
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
# CMake Install Options Reference
|
|
2
|
-
|
|
3
|
-
## Install Target Destinations
|
|
4
|
-
|
|
5
|
-
| Destination | Purpose | File Types |
|
|
6
|
-
|-------------|---------|------------|
|
|
7
|
-
| `ARCHIVE` | Static libraries and import libraries | `.a`, `.lib` (Windows import libs) |
|
|
8
|
-
| `LIBRARY` | Shared libraries | `.so`, `.dylib` |
|
|
9
|
-
| `RUNTIME` | Executables and DLLs | `.exe`, `.dll` |
|
|
10
|
-
|
|
11
|
-
## Recommended Variables (via `GNUInstallDirs`)
|
|
12
|
-
|
|
13
|
-
```cmake
|
|
14
|
-
include(GNUInstallDirs)
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
| Variable | Default Value | Purpose |
|
|
18
|
-
|----------|---------------|---------|
|
|
19
|
-
| `CMAKE_INSTALL_LIBDIR` | `lib` | Library installation directory |
|
|
20
|
-
| `CMAKE_INSTALL_INCLUDEDIR` | `include` | Header installation directory |
|
|
21
|
-
| `CMAKE_INSTALL_BINDIR` | `bin` | Binary/executable installation directory |
|
|
22
|
-
|
|
23
|
-
## Current iOS CMakeLists.txt
|
|
24
|
-
|
|
25
|
-
```cmake
|
|
26
|
-
install(TARGETS simpleble ARCHIVE DESTINATION lib)
|
|
27
|
-
|
|
28
|
-
install(DIRECTORY ${PROJECT_ROOT_DIR}/simpleble/include/simpleble/ DESTINATION include/simpleble)
|
|
29
|
-
install(DIRECTORY ${CMAKE_BINARY_DIR}/simpleble/export/simpleble/ DESTINATION include/simpleble)
|
|
30
|
-
install(FILES ${PROJECT_ROOT_DIR}/dependencies/external/kvn/kvn_bytearray.h DESTINATION include/simpleble/kvn)
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
## Recommended Update (matching main simpleble pattern)
|
|
34
|
-
|
|
35
|
-
```cmake
|
|
36
|
-
include(GNUInstallDirs)
|
|
37
|
-
|
|
38
|
-
install(TARGETS simpleble ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
|
39
|
-
|
|
40
|
-
install(DIRECTORY ${PROJECT_ROOT_DIR}/simpleble/include/simpleble/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/simpleble)
|
|
41
|
-
install(DIRECTORY ${CMAKE_BINARY_DIR}/simpleble/export/simpleble/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/simpleble)
|
|
42
|
-
install(FILES ${PROJECT_ROOT_DIR}/dependencies/external/kvn/kvn_bytearray.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/simpleble/kvn)
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
## Notes
|
|
46
|
-
|
|
47
|
-
- For iOS static builds (`BUILD_SHARED_LIBS OFF`), only `ARCHIVE` is needed
|
|
48
|
-
- `LIBRARY` is unnecessary since we're not building shared libraries
|
|
49
|
-
- Using CMake variables instead of hardcoded paths improves portability
|
|
50
|
-
- Header installation is required separately from library installation for XCFramework builds
|