simplernble 1.2.1-dev106 → 1.2.1-dev115
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/native/VERSION +1 -1
- package/native/simpleble/src/backends/android/PeripheralAndroid.h +3 -2
- package/native/simpleble/src/backends/simulator/LocalPeripheralSimulator.cpp +8 -1
- package/package.json +1 -1
- package/prebuilt/release/SimpleBLE.xcframework/Info.plist +5 -5
- package/prebuilt/release/SimpleBLE.xcframework/ios-arm64/libsimpleble.a +0 -0
- package/prebuilt/release/SimpleBLE.xcframework/ios-arm64_x86_64-simulator/libsimpleble.a +0 -0
package/native/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.2.1-
|
|
1
|
+
1.2.1-dev115
|
|
@@ -66,8 +66,9 @@ class PeripheralAndroid : public PeripheralBase {
|
|
|
66
66
|
|
|
67
67
|
int16_t rssi_ = INT16_MIN;
|
|
68
68
|
int16_t tx_power_ = INT16_MIN;
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
|
|
70
|
+
// NOTE: A bonded device has no advertisement until it is scanned. Like Windows, assume it is connectable.
|
|
71
|
+
bool connectable_ = true;
|
|
71
72
|
|
|
72
73
|
std::vector<std::string> advertised_services_;
|
|
73
74
|
std::map<uint16_t, kvn::bytearray> manufacturer_data_;
|
|
@@ -473,7 +473,14 @@ class PeripheralSimulator final : public PeripheralBase {
|
|
|
473
473
|
return device_->started && environment && environment->is_active();
|
|
474
474
|
}
|
|
475
475
|
|
|
476
|
-
bool is_advertising() override {
|
|
476
|
+
bool is_advertising() override {
|
|
477
|
+
if (!is_started()) return false;
|
|
478
|
+
|
|
479
|
+
// Same rule as the environment: the device stops advertising once it has as many connections as it accepts.
|
|
480
|
+
auto core = device_->internal();
|
|
481
|
+
std::lock_guard<std::mutex> lock(core->mutex);
|
|
482
|
+
return core->connections.size() < core->settings.max_connections;
|
|
483
|
+
}
|
|
477
484
|
|
|
478
485
|
void set_callback_on_client_connected(std::function<void(BluetoothAddress)> callback) override {
|
|
479
486
|
if (callback) {
|
package/package.json
CHANGED
|
@@ -8,32 +8,32 @@
|
|
|
8
8
|
<key>BinaryPath</key>
|
|
9
9
|
<string>libsimpleble.a</string>
|
|
10
10
|
<key>LibraryIdentifier</key>
|
|
11
|
-
<string>ios-
|
|
11
|
+
<string>ios-arm64_x86_64-simulator</string>
|
|
12
12
|
<key>LibraryPath</key>
|
|
13
13
|
<string>libsimpleble.a</string>
|
|
14
14
|
<key>SupportedArchitectures</key>
|
|
15
15
|
<array>
|
|
16
16
|
<string>arm64</string>
|
|
17
|
+
<string>x86_64</string>
|
|
17
18
|
</array>
|
|
18
19
|
<key>SupportedPlatform</key>
|
|
19
20
|
<string>ios</string>
|
|
21
|
+
<key>SupportedPlatformVariant</key>
|
|
22
|
+
<string>simulator</string>
|
|
20
23
|
</dict>
|
|
21
24
|
<dict>
|
|
22
25
|
<key>BinaryPath</key>
|
|
23
26
|
<string>libsimpleble.a</string>
|
|
24
27
|
<key>LibraryIdentifier</key>
|
|
25
|
-
<string>ios-
|
|
28
|
+
<string>ios-arm64</string>
|
|
26
29
|
<key>LibraryPath</key>
|
|
27
30
|
<string>libsimpleble.a</string>
|
|
28
31
|
<key>SupportedArchitectures</key>
|
|
29
32
|
<array>
|
|
30
33
|
<string>arm64</string>
|
|
31
|
-
<string>x86_64</string>
|
|
32
34
|
</array>
|
|
33
35
|
<key>SupportedPlatform</key>
|
|
34
36
|
<string>ios</string>
|
|
35
|
-
<key>SupportedPlatformVariant</key>
|
|
36
|
-
<string>simulator</string>
|
|
37
37
|
</dict>
|
|
38
38
|
</array>
|
|
39
39
|
<key>CFBundlePackageType</key>
|
|
Binary file
|