Closed kmamtora closed 2 years ago
@kmamtora after the npm install, theres a few steps that must be done in Xcode which are documented here. Can you confirm you've done that?
@gare-bear Yes I have already executed this steps
Any update on this ?
@kmamtora i'm looking into it. Can you tell me which printer you're targeting? iOS has different Bluetooth requirements than Android; mainly products must be paired and MFi certified, so if you're not paired or using a product that is not MFi certified it could it could impede your ability to discover it.
mPop, TSP100 and MCP31C BK US, this are the models which I have and have tried with mPop which is not working
@kmamtora iOS has a strict 1-1 pairing requirement, any chance the printer is paired with another device? I also suggest testing the printer with our mPOP utility and see if its detected.
Seems more like a connectivity issue than a code issue.
@kmamtora were you able to resolve this issue?
Also having a similar issue with an mPop drawer/printer combo. The mPop utility discovers it fine, but not my code. If I connect directly to the printer through bluetooth the code scanning picks it up, otherwise it doesn't show anything
@dillondrobena You have to pair the printer prior to use, this SDK won't be able to discover it otherwise. The mPOP Utility is not a react native app, it is a native Swift app using our StarPRNT SDK for iOS. The APIs are different and the StarPRNT SDK can discover nearby Bluetooth printers, even when not connected.
@gare-bear I suppose there's not a react-native port for the StarPRNT SDK for iOS correct? If I wanted to make use of the Bluetooth scanning the SDK provides I'll have to write my own module?
@dillondrobena That's right. The good thing is, the code is not unique to Star. Its using the EAAccessoryManager to show the BluetoothAccessoryPicker. This isn't in the Xpand SDK, but as you said you could write your own module.
One additional point, from my experience this approach doesn't play nice with with devices that use PIN code based pairing methods. Thankfully most Star printers now use SSP (Secure Simple Pairing) and can work with this approach.
I have scanning bluetooth printers code that works well for android but for ios it doesnt give any error nor it finds bluetooth devices here is my code ` try { await this._manager?.stopDiscovery();
`