Bluetooth support, with the discovery crash resolved
Bluetooth is now an officially supported connection option for compatible printers on iOS and Android. This release resolves the discovery crash that previously blocked iOS Bluetooth setup, corrects Android Bluetooth permission handling, and documents the verified QL-820NWBc support path.
The iOS crash (-[__NSCFString count]: unrecognized selector) came from an incorrect Info.plist type in our examples: UISupportedExternalAccessoryProtocols was a string instead of an array. The examples are now corrected, and iOS discovery can open the system accessory-pairing flow when no connected printer is found. The Bluetooth usage-description keys remain strings; those keys were not the cause. (#34)
Action required for existing iOS apps
If your app copied the old configuration, update your app's Info.plist; upgrading the plugin alone does not change it:
<key>UISupportedExternalAccessoryProtocols</key>
<array>
<string>com.brother.ptcbp</string>
</array>On Android, pair your Bluetooth Classic printer in system settings before searching. See the installation guide for permissions and SDK setup, and the support matrix for model-specific coverage. Bluetooth Classic and BLE are distinct: this release does not add BLE capability to QL-820NWB/QL-820NWBc or claim every model/transport has been hardware-tested.
Optional printer-only Bluetooth discovery on Android
Enable bluetoothPrintersOnly to hide paired devices that do not report the Bluetooth Imaging/Printer class:
import { BrotherPrint, BRLMPrinterPort } from '@rdlabo/capacitor-brotherprint';
await BrotherPrint.search({
port: BRLMPrinterPort.bluetooth,
searchDuration: 15,
bluetoothPrintersOnly: true,
});The option defaults to false, preserving existing results. It is independent of device names, applies only to Android Bluetooth Classic, and is ignored for other ports and on iOS. It identifies printer classes, not Brother products: other manufacturers' printers may remain, while devices with unknown classes are excluded when enabled. (#39)
Reliability fixes
- Android USB permission requests no longer overwrite pending calls; permission results settle the corresponding call once. (#35)
- Android Wi-Fi and USB searches finish their promises after discovery and report SDK search errors instead of resolving immediately. Callers awaiting
search()now wait for completion. (#36) - iOS Wi-Fi search cancellation now completes its promise; Bluetooth/BLE discovery error handling has also been corrected. (#34)
- Invalid Base64 and non-image input are rejected before opening a printer rather than crashing during image decoding. (#37)
- Existing print validation failures now emit
onPrintErroras well as reject the call. iOS print-settings creation failures are no longer classified as connection failures. Plugin validation events usecode: 0; channel-open failures continue to emitonPrintFailedCommunication. (#38)
Regression coverage and documentation
- Added SDK-free CI tests for Android Bluetooth filtering and iOS image decoding, exercising production logic without distributing the Brother SDK. These are not hardware or full SDK integration tests. (#40)
- Expanded installation, search, printing, and event guides, with generated API references and clearer compatibility notes.
Upgrade
npm install @rdlabo/capacitor-brotherprint@8.2.0
npx cap syncThe optional search flag is backward-compatible. Review the corrected search-completion timing and additional error events if your app depends on the previous behavior. The Brother SDK remains a separately installed dependency; existing platform and model limitations still apply.
Full changelog: v8.1.1...v8.2.0