Skip to content

React-Native bridge to communicate with Star Micronics Bluetooth/LAN Printers - Expo ready

License

Notifications You must be signed in to change notification settings

cursedforever/react-native-star-prnt-cursed

 
 

Repository files navigation

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

  1. In XCode, go to Build Phases, Link Binary with Libraries and Add the following frameworks:

    • Go to node_modulesreact-native-star-prntiosFrameworks and add StarIO.framework and StarIO_Extension.framework
    • Add the CoreBluetooth.framework
    • Add the ExternalAccessory.framework
  2. 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:

  1. Click on the information property list file (default : “Info.plist”).
  2. Add the “Supported external accessory protocols” Key.
  3. Click the triangle of this key and set the value for the Item 0 to jp.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);
  }
}

Take a look at the Documentation

About

React-Native bridge to communicate with Star Micronics Bluetooth/LAN Printers - Expo ready

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Objective-C 63.3%
  • Java 22.0%
  • C 10.5%
  • JavaScript 3.8%
  • Ruby 0.4%