I have added a Cordova file transfer plugin from Ionic native and imported transfer from ionic native to my application page
I am not getting any syntax error as well as command prompt errors
But when I run my application using Ionic serve it is showing me
{Cannot find module "ionic-native"}
Can anyone please help me on this
Did u check it properly, weather u have installed ionic-native ?
Plus which version of ionic are you using, in ionic 3 (launched recently) they removed ionic-native and kept it seperately in #ionic-native. And u'll have to indivisually install every plugin u r using.
http://blog.ionic.io/ionic-native-3-x/
Related
I created one application using Ionic2 and when i run the command ionic cordova run android --prod --release I am getting an error
Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES: Package /data/app/vmdl
971492117.tmp/base.apk has no certificates at entry AndroidManifest.xml]
Do anyone know how to fix this error?
NB: I have seen similar questions all of them are for native application development.
You cannot install a package build with --release without signing it. See this question on Ionic Forum
Try ionic cordova run android --prod to install an unsigned app to your phone.
Probably you have another app installed with the same name, signed with another type of key. Ie in your device you the app singed with a release key. Other possibility is there is an app in your device with a newer version.
I am new on Ionic Mobile application development, so I am trying to POST data from Ionic app. Whenever I have run the app in browser using
ionic cordova run browser
It display below issue in console,
Native: tried calling HTTP.post, but the HTTP plugin is not installed.
Install the HTTP plugin: 'ionic cordova plugin add cordova-plugin-advanced-http'.
I have installed same plugin using terminal but terminal give warnings as its already installed.
Please Suggest.
Based on this https://ionicframework.com/docs/native/http/ you also need to run
npm install --save #ionic-native/http
and referencing it correctly in your app, please take a look at above link
Also for running app in browser try below command
Ionic serve
See https://github.com/ionic-team/ionic-native/issues/1975
The issue appears to have been fixed but there might be a lag in updating npm
I hade the same problem and I solve it with uninstall and reinstall the plugin
Uninstall plugin completely
ionic cordova plugin remove cordova-plugin-advanced-http
npm uninstall #ionic-native/http
and reinstall it
ionic cordova plugin add cordova-plugin-advanced-http
npm install #ionic-native/http
The Native Http plugin is the only way to handle the CORS from the client-side.
The way I see your problem, there might two possible fixes
Check whether the plugin is called after the platform.ready().
Even after it, if doesn't work or show the same error then follow this method.
// Declare cordova as a global constant
declare const cordova;
// directly call the cordova pulgin using "cordova.pulgin.http"
cordova.plugin.http.post(apiUrl, {}, {},
response => {},
response => {})
Ionic CLI 3.8 has come up with a --livereload option to live reload the changes from your app. Can someone tell the proper command for using it?
I tried with only --livereload and also ionic cordova --livreload but neither seems to work!
Just like #Duannx mentioned in the comments, the proper CLI command is
ionic cordova run android --livereload / ionic cordova run ios --livereload
or
ionic cordova run android --l / ionic cordova run ios --l
(Or just ionic run android/ios --l if you're using an older version of the CLI).
Please notice that in order to make the livereload feature to work, both the device and the computer running the command must be in the same WIFI network.
Otherwise you'll see errors like:
The connection to the server was unsuccessful
(http://XX.XX.XX.XX:XXXX)
I started working on this project on my home PC on Windows 10 using the latest version of Ionic CLI and Typescript and ionic serve works perfectly there.
However after cloning the exact same project to my work PC with Ubuntu which is also running the latest version of Ionic, I get this error when I try to use ionic serve:
"www" directory cannot be found. Please make sure the working directory is an Ionic project.
So obviously now on this PC it's not compiling the Typescript before running it. Somehow on my work PC it thinks this is a plain JS project?
I created a sample ionic 2 App which works perfectly on Chrome and Android Browser, but when I tried it on Internet Explorer It giving me below error.
>EXCEPTION: Error: Uncaught (in promise): SyntaxError
>EXCEPTION: Error: Uncaught (in promise): SyntaxError
>STACKTRACE:
>Error: Uncaught (in promise): SyntaxError
>at resolvePromise (http://localhost/build/js/angular2-polyfills.js:602:26)
>at Anonymous function (http://localhost/build/js/angular2-polyfills.js:638:18)
>at ZoneDelegate.prototype.invokeTask
While Angular 2 sample project is working fine on Internet Explore why there is a difference in IONIC 2 build , UI issue is fine but at least it should run the App without breaking.
I just found this official post on the Ionic forum saying that Ionic 2 doesn't support Internet Explorer, only Edge: https://forum.ionicframework.com/t/ionic-2-sample-app-not-working-on-internet-explore/50283/2
No idea though if this will change for future releases, but I wouldn't count on it... Time to say goodbye to IE, finally ;)
I was able to render IONIC 2 on Internet Explolrer 10.
In order to install the proper polyfills do this:
npm install core-js --save
Then in your app class import it
import 'core-js';
It worked for me with core-js version 2.4.1 on Ionic 2 beta 10, Angular 2.0.0-rc.3 .
On my computer it looks like IE opens the ionic application in Compatibility Mode by default.
After you disable Compatibility Mode the pages will work fine.