@magicred-1/react-native-lxmf 0.2.35 → 0.2.36

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.
Files changed (2) hide show
  1. package/app.plugin.js +8 -1
  2. package/package.json +1 -1
package/app.plugin.js CHANGED
@@ -23,7 +23,7 @@ function withLxmfPermissions(config) {
23
23
  return c;
24
24
  });
25
25
 
26
- // iOS BLE usage descriptions
26
+ // iOS BLE usage descriptions + background modes required for background scanning/advertising
27
27
  config = withInfoPlist(config, (c) => {
28
28
  c.modResults.NSBluetoothAlwaysUsageDescription =
29
29
  c.modResults.NSBluetoothAlwaysUsageDescription ||
@@ -31,6 +31,13 @@ function withLxmfPermissions(config) {
31
31
  c.modResults.NSBluetoothPeripheralUsageDescription =
32
32
  c.modResults.NSBluetoothPeripheralUsageDescription ||
33
33
  'Used for LXMF mesh networking via BLE';
34
+ // Required for CoreBluetooth state restoration and background BLE operation.
35
+ // Without these entries the OS terminates BLE scanning/advertising when the
36
+ // app goes to background, breaking the Reticulum mesh.
37
+ const bg = c.modResults.UIBackgroundModes || [];
38
+ if (!bg.includes('bluetooth-central')) bg.push('bluetooth-central');
39
+ if (!bg.includes('bluetooth-peripheral')) bg.push('bluetooth-peripheral');
40
+ c.modResults.UIBackgroundModes = bg;
34
41
  return c;
35
42
  });
36
43
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magicred-1/react-native-lxmf",
3
- "version": "0.2.35",
3
+ "version": "0.2.36",
4
4
  "description": "LXMF Reticulum mesh networking for React Native + Expo",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",