react-native-star-prnt-cursed
v2.0.0
Published
StarPRNT React Native bridge for Star Micronics Bluetooth/LAN printers - With expo supported
Downloads
1
Maintainers
Readme
Fork
A fork from react-native-star-prnt, to make it work properly in at least 2022.
Supposed to work with EXPO
react-native-star-prnt-cursed
react-native bridge for Star micronics printers.
Installation
$ npm install react-native-star-prnt-cursed --save
iOS Configuration
In XCode, go to Build Phases, Link Binary with Libraries and Add the following frameworks:
- Go to
node_modules
➜react-native-star-prnt
➜ios
➜Frameworks
and addStarIO.framework
andStarIO_Extension.framework
- Add the
CoreBluetooth.framework
- Add the
ExternalAccessory.framework
- Go to
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:
- Click on the information property list file (default : “Info.plist”).
- Add the “Supported external accessory protocols” Key.
- Click the triangle of this key and set the value for the
Item 0
tojp.star-m.starpro
Usage
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);
}
}