问题
Note:
I wanted to develop IOS and Android application with QR code scanning feature.
I do not own Mac machine, I'm using
Netbean
/Eclipse
in WIndows OS.
Question:
- Is it possible to have single codebase written with Eclipse Windows OS + android BarcodeScanner Plugin, and get built into IOS application via Adobe Cloud Build service
Deeply appreciated if someone could give me an advice.
回答1:
If you're using the online compiler of phonegap (Phonegap Build) then it's possible to use a plugin for all supported devices.
Plugins : https://build.phonegap.com/docs/config-xml
In the Config.xml
< gap:plugin >: specifies a PhoneGap plugin for PhoneGap Build to include in your generated apps. At present, to include a plugin, you will to ensure:
the plugin is supported by PhoneGap Build; and any JavaScript script tags are present in your index.html file. More details, including a list of available plugins, are in our plugins documentation.
Goto https://build.phonegap.com/docs/plugins and scroll down to the BarcodeScanner plugin.
回答2:
You can use Barcode scanner plugin. You can reuse the hybrid part on ios. But some basic settings need to be done on ios as well. Try Phonegap build if you want to build for multiple platforms easily.
回答3:
In case this helps anyone: https://github.com/zeroasterisk/PhoneGap-BarcodeScanner-Example-iOS
And specific to your question.
- All devices can share the same
www
(html/js/css) directory & sub-dirs - All devices need their own unique PhoneGap application and codebase for device code
PhoneGap does the work of bridging the two, the shared WWW codebase, and the device-specific native code.
来源:https://stackoverflow.com/questions/15384252/phonegap-barcodescanner-sharing-plugin