Error using barcode scanner in iOS PhoneGap - iphone

I am working on barcode scanning App. I have download the sample code from GitHub. When I run that project I get an error. Please help me to solve it.
ERROR: Plugin 'NetworkStatus' not found, or is not a CDVPlugin. Check your plugin mapping in Cordova.plist.
2012-11-28 14:12:36.198 BarCodeScannerCDV[942:40b] FAILED pluginJSON = {"className":"NetworkStatus","methodName":"getConnectionInfo","arguments":["NetworkStatus0"]}
Thanks.

I suggest you to used updated phonegap framework (Cordova 2.2.0), because this was a bug in Cordova 1.6.0.
Please see following comment by Shazron Abdullah in Google Phonegap group:
There is a new Cordova.plist because of the unified JS changes. Check
out the "Cordova Upgrade Guide" in your .dmg (Guides subfolder), or:
"Upgrading Cordova 1.5.0 projects to 1.6.0" step 8 of
https://github.com/apache/incubator-cordova-ios/blob/master/guides/Cordova%20Plugin%20Upgrade%20Guide.md#upgrading-older-cordova-plugins-to-16x
The BarcodeScanner plugin for iOS-Phonegap is stable one, please update your phonegap framework to 2.2.0.
In Phonegap 1.6.0 and below, network connection class name is Network Status but for Phonegap 1.6.1 and above, network connection class name is CDVConnection.

Related

How to Create Custom SplashScreen on Ionic?

I want show custom splash screen with animation. I tried add LottieSplashScreen plugin but i can't do this.
Tried with this code
cordova plugin add cordova-plugin-lottie-splashscreen
But i facing
'sh' is not recognized as an internal or external command,
operable program or batch file.
Failed to install 'cordova-plugin-lottie-splashscreen': Error: Hook failed with error code ENOENT: C:\Users\bbara\Desktop\GuvercinSepetim\plugins\cordova-plugin-lottie-splashscreen\hooks\ios\update_pod_repo.sh
at C:\Users\bbara\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\hooks\HooksRunner.js:224:23
at _rejected (C:\Users\bbara\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:864:24)
at C:\Users\bbara\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:890:30
at Promise.when (C:\Users\bbara\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:1142:31)
at Promise.promise.promiseDispatch (C:\Users\bbara\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:808:41)
at C:\Users\bbara\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:624:44
at runSingle (C:\Users\bbara\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:137:13)
at flush (C:\Users\bbara\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:125:13)
at processTicksAndRejections (internal/process/next_tick.js:74:9)
Hook failed with error code ENOENT: C:\Users\bbara\Desktop\GuvercinSepetim\plugins\cordova-plugin-lottie-splashscreen\hooks\ios\update_pod_repo.sh
You are running a cordova node but not ionic cordova:
cordova plugin add cordova-plugin-lottie-splashscreen
According to ionic documentation:
npm install #ionic-native/lottie-splash-screen
ionic cordova plugin add cordova-plugin-lottie-splashscreen
And here is the referance:
https://ionicframework.com/docs/native/lottie-splash-screen
And here is the github reposatory of the plugin :
https://github.com/timbru31/cordova-plugin-lottie-splashscreen
Try looking into Capacitor instead of Cordova. You can still use all your Cordova libraries, but the Capacitor build is a bit cleaner. I followed this tutorial and found it very useful with good tools. It worked for me first time, which is never the case with some Ionic stuff!
https://enappd.com/blog/icon-splash-in-ionic-react-capacitor-apps/114/
The issue you are describing was fixed in the v0.8.1 release. It originated from preparing/building the iOS platform on a Windows machine - which won't work anyways. Because cordova-ios supports recent Pod installations out of the box, it's no longer required to sync the repo, i.e, the hook is obsolete. However, the lottie plugin won't fail anymore.
Side note: I'm the author of this plugin.

Could not find cordova integration in the default project

following the official getting started tutorial I get the following error when I try to deploy the application in my phone using this command: ionic serve --devapp (it works on browser):
[ERROR] Could not find cordova integration in the default project.
I get this error both on Windows and MacOS.
I'm using Node 6.4.1 and Ionic CLI 4.10.3
Does the official tutorial missing something?
I had the same issue. In fact, with the default project, you have to copy the cordova assets to prepare the native build for mobile.
You can find more info here : Ionic documentation
Try this :
ionic cordova prepare
And then go again with :
ionic serve --devapp
The accepted answer is 100% correct .
But the reason why this occurred for me was that somehow the default was capacitor and not cordova.
so first i ran
ionic integrations disable capacitor
then ran
ionic cordova prepare
which solved my issue

Phonegap Cordova 3.6.3 inappbrowser does not exist

I'm using Phonegap Cordova 3.6.3 and run my project in eclipse i found an error
10-30 11:13:42.463: E/Web Console(2447): Uncaught Error: Module org.apache.cordova.inappbrowser.inappbrowser does not exist. at file:///android_asset/www/cordova.js:1385
To be able to use core plugins like inapp browser, you need first to add the plugin.
I suggest you read the docs : http://plugins.cordova.io/#/package/org.apache.cordova.inappbrowser
Installation :
cordova plugin add org.apache.cordova.inappbrowser
(This is since version 3.x of cordova/phonegap. Before that all core plugins where included)

Phonegap 2.7 iPhone Torch fail

I need a torch on my phonegap project (Cordova 2.7.0, xcode 4.6.2), but I cannot activate it on iPhone. I've tested 2 solutions:
The shazron plugin, but it refuses to compile with a lot of errors, even using it's javacript upgrade (include in next solution)
Tom Schreck's upgrade. It did't throw any error, but it fails too. I've tested it on older versions of phonegap, such 2.2.0 with same results.
Any suggestion??
Thanks!
The Tom's solution has erros in the demo file. At least, to toggle the torch you can use window.plugins.torch.toggle(); but it only works in Cordova 2.2.0. ¿Any update for Cordova 2.7.0?

Facebook plugin in phonegap has some alerts with cordova 1.8.0

It was working fine with Cordova 1.6.1,but trying with cardova 1.8.0 ,
I get these alerts:
1. Cordova Facebook Connect plugin fail on login!
2. Cordova Facebook Connect plugin fail on auth.status!
What can i do?
I have two phones one with android 2.2.1 and the other with android 2.3.3 and I get the error on the 2.2.1 but not on the 2.3.3 not sure why but maybe you should try installing on another phone. I'm wondering if its timing out as this old HTC is slow.