HeligPfleigh / react-native-thermal-receipt-printer

A RN library for thermal printer
163 stars 103 forks source link

Can you share .a file source code? #55

Closed justafreespirit closed 3 years ago

justafreespirit commented 3 years ago
justafreespirit commented 3 years ago

@HeligPfleigh can help me? please!

HeligPfleigh commented 3 years ago

Sorry, I don't have permission to access that source code for now. It is asynchronous method and emit event PrinterConnectedNotification if printer is connected

In bridge code, it seems that event isn't broadcasted to RN layer yet. https://github.com/HeligPfleigh/react-native-thermal-receipt-printer/blob/994395e7bec27d973dfdf235c79db38859d62cd8/ios/RNNetPrinter.m#L121-L126

justafreespirit commented 3 years ago

@HeligPfleigh I installed CocoaAsyncSocket lib to check the IP address, but I get the error "Duplicate CocoaAsyncSocket lib", have you any solution for this?

HeligPfleigh commented 3 years ago

the reason is .a library is using CocoaAsyncSocket too, did you try this one? https://github.com/HeligPfleigh/react-native-thermal-receipt-printer/blob/dfce0bd2adf1d58aa0077465299a48e7cefa14f0/ios/RNNetPrinter.m#L24-L53

justafreespirit commented 3 years ago

@HeligPfleigh This is not helping me, have you any solution to check an IP and port is a printer address?

justafreespirit commented 3 years ago

@HeligPfleigh Thank you for your support. I have resolved this issue. I have to create a new socket to check the printer address.