React-Native bridge to communicate with Star Micronics Bluetooth/LAN Printers
react-native bridge for Star micronics printers.
Ionic/Cordova Version ➜ here
$ npm install react-native-star-prnt --save
$ react-native link react-native-star-prnt
In XCode, go to Build Phases, Link Binary with Libraries and Add the following frameworks:
node_modules
➜ react-native-star-prnt
➜ ios
➜ Frameworks
and add StarIO.framework
and StarIO_Extension.framework
CoreBluetooth.framework
ExternalAccessory.framework
Go to Build Settings ➜ Search Paths and Add
$(PROJECT_DIR)/../node_modules/react-native-star-prnt/ios/Frameworks
to Framework Search Paths
For Bluetooth printers:
Item 0
to jp.star-m.starpro
import { StarPRNT } from 'react-native-star-prnt';
async function portDiscovery() {
try {
let printers = await StarPRNT.portDiscovery('All');
console.log(printers);
} catch (e) {
console.error(e);
}
}