I have to implement a barcode scanner in both android and ios where I need to scan the barcode and retrieve data and bind it in the text field.
There is one official barcode module you can look into that is fully open source. This means you can use it directly in your app on both platforms, AND you can check the source code to see how it is build, and if needed hook into that logic, expand it with your own functionality or add support for barcode types etc.
It is called ti.barcode and can be found on GitHub. It uses zxing under the hood as well.