{"_id":"@budzworthy/react-native-multi-ble-peripheral","_rev":"2-969517f7ae002ae544882df5f5e715e4","name":"@budzworthy/react-native-multi-ble-peripheral","dist-tags":{"latest":"0.1.7"},"versions":{"0.1.6":{"name":"@budzworthy/react-native-multi-ble-peripheral","version":"0.1.6","keywords":["react-native","ios","android"],"author":{"url":"https://github.com/budzworthy","name":"Danny","email":"budzworthy@gmail.com"},"license":"MIT","_id":"@budzworthy/react-native-multi-ble-peripheral@0.1.6","maintainers":[{"name":"budzworthy","email":"dbudzins@gmail.com"}],"homepage":"https://github.com/budzworthy/react-native-multi-ble-peripheral#readme","bugs":{"url":"https://github.com/budzworthy/react-native-multi-ble-peripheral/issues"},"dist":{"shasum":"11f5bf23d63d516795474662aa647781c47f625f","tarball":"https://registry.npmjs.org/@budzworthy/react-native-multi-ble-peripheral/-/react-native-multi-ble-peripheral-0.1.6.tgz","fileCount":22,"integrity":"sha512-dFm3/pQv+53w/5lK4traigeSYOwsvaNM6w+vw+jt7n5bYgsHBI27e10svFIH1+gBuxJsNv9OpqoUN7slZ+sEYg==","signatures":[{"sig":"MEUCIAlGzxE+PjTmrXAcV4ldxhRvE8cHRposG0qYSdN7tft9AiEAkO3lxyvJvK2H+3HpjHq+kWnA1NSfhWnx4Bdi9/Zb+8Q=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":87913},"jest":{"preset":"react-native","modulePathIgnorePatterns":["<rootDir>/example/node_modules","<rootDir>/lib/"]},"main":"lib/commonjs/index","types":"lib/typescript/index.d.ts","module":"lib/module/index","source":"src/index","engines":{"node":">= 16.0.0"},"gitHead":"fa8354c438cb7e26bfc435ec19385ccb89de3588","private":false,"scripts":{"lint":"eslint \"**/*.{js,ts,tsx}\"","test":"jest","clean":"del-cli android/build example/android/build example/android/app/build example/ios/build","example":"yarn --cwd example","prepack":"bob build","release":"release-it","bootstrap":"yarn example && yarn install && yarn example pods","typecheck":"tsc --noEmit"},"_npmUser":{"name":"budzworthy","email":"dbudzins@gmail.com"},"prettier":{"useTabs":false,"tabWidth":2,"quoteProps":"consistent","singleQuote":true,"trailingComma":"es5"},"commitlint":{"extends":["@commitlint/config-conventional"]},"release-it":{"git":{"tagName":"v${version}","commitMessage":"chore: release ${version}"},"npm":{"publish":true},"github":{"release":true},"plugins":{"@release-it/conventional-changelog":{"preset":"angular"}}},"repository":{"url":"git+https://github.com/budzworthy/react-native-multi-ble-peripheral.git","type":"git"},"_npmVersion":"10.9.3","description":"test","directories":{},"resolutions":{"@types/react":"17.0.21"},"_nodeVersion":"22.18.0","dependencies":{"eventemitter3":"^5.0.0"},"eslintConfig":{"root":true,"rules":{"prettier/prettier":["error",{"useTabs":false,"tabWidth":2,"quoteProps":"consistent","singleQuote":true,"trailingComma":"es5"}]},"extends":["@react-native-community","prettier"]},"eslintIgnore":["node_modules/","lib/"],"react-native":"src/index","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^28.1.1","react":"18.2.0","eslint":"^8.4.1","del-cli":"^5.0.0","prettier":"^2.0.5","commitlint":"^17.0.2","release-it":"^15.0.0","typescript":"^4.5.2","@types/jest":"^28.1.2","pod-install":"^0.1.0","@types/react":"~17.0.21","react-native":"0.71.7","@types/react-native":"0.70.0","@evilmartians/lefthook":"^1.2.2","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.0.0","react-native-builder-bob":"^0.20.4","@commitlint/config-conventional":"^17.0.2","@release-it/conventional-changelog":"^5.0.0","@react-native-community/eslint-config":"^3.0.2"},"peerDependencies":{"react":"*","react-native":"*"},"_npmOperationalInternal":{"tmp":"tmp/react-native-multi-ble-peripheral_0.1.6_1757842120750_0.3471932010896761","host":"s3://npm-registry-packages-npm-production"},"react-native-builder-bob":{"output":"lib","source":"src","targets":["commonjs","module",["typescript",{"project":"tsconfig.build.json"}]]}},"0.1.7":{"name":"@budzworthy/react-native-multi-ble-peripheral","version":"0.1.7","private":false,"description":"test","main":"lib/commonjs/index","module":"lib/module/index","types":"lib/typescript/index.d.ts","react-native":"src/index","source":"src/index","scripts":{"test":"jest","typecheck":"tsc --noEmit","lint":"eslint \"**/*.{js,ts,tsx}\"","prepack":"bob build","release":"release-it","example":"yarn --cwd example","bootstrap":"yarn example && yarn install && yarn example pods","clean":"del-cli android/build example/android/build example/android/app/build example/ios/build"},"keywords":["react-native","ios","android"],"repository":{"type":"git","url":"git+https://github.com/budzworthy/react-native-multi-ble-peripheral.git"},"author":{"name":"Danny","email":"budzworthy@gmail.com","url":"https://github.com/budzworthy"},"license":"MIT","bugs":{"url":"https://github.com/budzworthy/react-native-multi-ble-peripheral/issues"},"homepage":"https://github.com/budzworthy/react-native-multi-ble-peripheral#readme","publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"},"devDependencies":{"@commitlint/config-conventional":"^17.0.2","@evilmartians/lefthook":"^1.2.2","@react-native-community/eslint-config":"^3.0.2","@release-it/conventional-changelog":"^5.0.0","@types/jest":"^28.1.2","@types/react":"~17.0.21","@types/react-native":"0.70.0","commitlint":"^17.0.2","del-cli":"^5.0.0","eslint":"^8.4.1","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.0.0","jest":"^28.1.1","pod-install":"^0.1.0","prettier":"^2.0.5","react":"18.2.0","react-native":"0.71.7","react-native-builder-bob":"^0.20.4","release-it":"^15.0.0","typescript":"^4.5.2"},"resolutions":{"@types/react":"17.0.21"},"peerDependencies":{"react":"*","react-native":"*"},"engines":{"node":">= 16.0.0"},"jest":{"preset":"react-native","modulePathIgnorePatterns":["<rootDir>/example/node_modules","<rootDir>/lib/"]},"commitlint":{"extends":["@commitlint/config-conventional"]},"release-it":{"git":{"commitMessage":"chore: release ${version}","tagName":"v${version}"},"npm":{"publish":true},"github":{"release":true},"plugins":{"@release-it/conventional-changelog":{"preset":"angular"}}},"eslintConfig":{"root":true,"extends":["@react-native-community","prettier"],"rules":{"prettier/prettier":["error",{"quoteProps":"consistent","singleQuote":true,"tabWidth":2,"trailingComma":"es5","useTabs":false}]}},"eslintIgnore":["node_modules/","lib/"],"prettier":{"quoteProps":"consistent","singleQuote":true,"tabWidth":2,"trailingComma":"es5","useTabs":false},"react-native-builder-bob":{"source":"src","output":"lib","targets":["commonjs","module",["typescript",{"project":"tsconfig.build.json"}]]},"dependencies":{"eventemitter3":"^5.0.0"},"_id":"@budzworthy/react-native-multi-ble-peripheral@0.1.7","gitHead":"3d533682391f5eb76c3665945663c8c1af4f4e65","_nodeVersion":"22.18.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-Vnl0fQhlf+tViVfBd50RhI8ox5Th2mMuZJJt+CsvPZaS9l4EE6UzhrhtMhIEOD6DB2xTU2JTdXwyVOzgZXqHLA==","shasum":"68d8936426b013e4292ec84a31594d78df928318","tarball":"https://registry.npmjs.org/@budzworthy/react-native-multi-ble-peripheral/-/react-native-multi-ble-peripheral-0.1.7.tgz","fileCount":22,"unpackedSize":88128,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIF0bqHJcNUfiywmOKcgUcLlRErlrPe//u/Cx4KwJDgOMAiEApXv7MoONKrO0MFCFkhVKuBa7xubDllpwUM3Ciqsc7D0="}]},"_npmUser":{"name":"budzworthy","email":"dbudzins@gmail.com"},"directories":{},"maintainers":[{"name":"budzworthy","email":"dbudzins@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/react-native-multi-ble-peripheral_0.1.7_1757844815969_0.20861570027781662"},"_hasShrinkwrap":false}},"time":{"created":"2025-09-14T09:28:40.683Z","modified":"2025-09-14T10:13:36.342Z","0.1.6":"2025-09-14T09:28:40.943Z","0.1.7":"2025-09-14T10:13:36.163Z"},"bugs":{"url":"https://github.com/budzworthy/react-native-multi-ble-peripheral/issues"},"author":{"name":"Danny","email":"budzworthy@gmail.com","url":"https://github.com/budzworthy"},"license":"MIT","homepage":"https://github.com/budzworthy/react-native-multi-ble-peripheral#readme","keywords":["react-native","ios","android"],"repository":{"type":"git","url":"git+https://github.com/budzworthy/react-native-multi-ble-peripheral.git"},"description":"test","maintainers":[{"name":"budzworthy","email":"dbudzins@gmail.com"}],"readme":"# react-native-multi-ble-peripheral\n\nReact Native Multi BLE Peripheral Manager\n\n## Installation\n\n```sh\nnpm install react-native-multi-ble-peripheral\n```\n\n### iOS\n\nAdd these lines in `Info.plist`\n\n```xml\n<key>NSBluetoothAlwaysUsageDescription</key>\n<string>For advertise as BLE peripheral</string>\n```\n\n### Android\n\n- Add these lines in `AndroidManifest.xml`\n\n```xml\n<uses-permission android:name=\"android.permission.BLUETOOTH\" />\n<uses-permission android:name=\"android.permission.BLUETOOTH_ADVERTISE\" />\n<uses-permission android:name=\"android.permission.BLUETOOTH_CONNECT\" />\n```\n\n- Do this patch if you build on SDK 33+\n\n```diff\ndiff --git a/android/src/main/java/com/fugood/reactnativemultibleperipheral/ReactNativeMultiBlePeripheralModule.kt b/android/src/main/java/com/fugood/reactnativemultibleperipheral/ReactNativeMultiBlePeripheralModule.kt\nindex 2e763af..746c0c7 100644\n--- a/android/src/main/java/com/fugood/reactnativemultibleperipheral/ReactNativeMultiBlePeripheralModule.kt\n+++ b/android/src/main/java/com/fugood/reactnativemultibleperipheral/ReactNativeMultiBlePeripheralModule.kt\n@@ -241,7 +241,8 @@ class ReactNativeMultiBlePeripheralModule(reactContext: ReactApplicationContext)\n       val response = bluetoothGattServer.notifyCharacteristicChanged(\n         device,\n         characteristic,\n-        confirm\n+        confirm,\n+        value\n       )\n       Log.d(NAME, \"Notify ${device.name} (${device.address}) response = $response\")\n     }\n```\n\n#### Request permission\n\n> Should check permission before create peripheral instance\n\n```js\nimport { PermissionsAndroid } from 'react-native';\n\nawait PermissionsAndroid.request(\n  PermissionsAndroid.PERMISSIONS.BLUETOOTH_CONNECT,\n  options,\n);\nawait PermissionsAndroid.request(\n  PermissionsAndroid.PERMISSIONS.BLUETOOTH_ADVERTISE,\n  options,\n);\n```\n\n## Usage\n\n```js\nimport Peripheral, { Permission, Property } from 'react-native-multi-ble-peripheral';\nimport { Buffer } from 'buffer';\n\nPeripheral.setDeviceName('MyDevice');\n\nconst peripheral = new Peripheral();\n\n// We need wait peripheral manager ready before any operation.\nperipheral.on('ready', async () => {\n  await peripheral.addService('1234', true);\n  await peripheral.addCharacteristic(\n    '1234',\n    'ABCD',\n    Property.READ | Property.WRITE,\n    Permission.READABLE | Permission.WRITEABLE\n  );\n  await peripheral.updateValue('1234', 'ABCD', Buffer.from('Hello World!'));\n  await peripheral.startAdvertising();\n});\n```\n\n## Contributing\n\nSee the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.\n\n## License\n\nMIT\n\n---\n\nMade with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)\n\n---\n\n<p align=\"center\">\n  <a href=\"https://bricks.tools\">\n    <img width=\"90px\" src=\"https://avatars.githubusercontent.com/u/17320237?s=200&v=4\">\n  </a>\n  <p align=\"center\">\n    Built and maintained by <a href=\"https://bricks.tools\">BRICKS</a>.\n  </p>\n</p>\n","readmeFilename":"README.md"}