I have connected my android phone to the same wifi as my laptop is connected.
and i execute ionic serve --devapp
the expectation is to be able to run my ionic PWA on my android device.
Very simple :
ionic cordova run android
Note :
This command will automatically integrate cordova in ionic project.
Manually integrate cordova :
ionic integrations enable cordova
Related
I have a cordova plugin which supports Android, iOS and browser platforms. But when adding the plugin in an ionic app that is being developed/built using ionic serve or ionic devApp, the error comes as 'plugin is not defined'. Is there a way to add the ionic devApp support to a cordova plugin ? If it means only using the browser code for all the platforms(Not using any native platform code), then it works for me. Thanks in advance.
I have added the browser platform to my plugin but it does not work with ionic serve even when the app is running on browser. Note that the plugin works fine on browser when the app is run using ionic cordova run browser command.
I want the cordova plugin to be compatible with all platforms - Android, iOS , browser and devApp. My expectation are that when the app is run using ionic cordova run android/ios/browser command, it should use the native code of my cordova plugin. And when the app is run using ionic serve or ionic devApp, then it should use the web code.
I have a mobile application in ionic and have uploaded it in playstore. Now I want to host it in a website. How do i do that with ionic 4 and mysql?
I have tried visiting the ionic documentation about PWA but they are using firebase.
ng add #angular/pwa
ionic build --prod --service-worker
ionic build --prod
if you not need Cordova use:
npm run ionic:build --prod
and copy all from the www folder to your Web Server
or if you need Cordova
then Use Browser Platform for websites.
ionic cordova platform add browser
ionic cordova build browser --prod --release
and copy all from the /platforms/browser/www folder to your Web Server
I am testing my ionic application using the ionic Dev app in android. After updating ionic to the newest version, ionic dev app is not detecting the application though it detected earlier. Is it a problem with the ionic cli version? How can I solve this?
This question is related to ionic 3 and I want to know how to run an ionic app using a real device.
I have developed an hybrid application and I was not able to connect my app with server. It works fine in my laptop browser. But it does not work in devApp and android apk.
I have tried many solutions but was not able to get the perfect solution. I have made a proxy server to access the api by ionic devApp but it doesn't even show a single error.
I think this problem is related about CORS.
Use the additional parameter of --devapp when running your ionic serve.
ionic serve --devapp
Should work now.
For me allowing port 8100 in my firewall was needed. Then everythig works.
CORS is not a problem when you build your app on a real device.
To run your app on android device :
ionic cordova platform add android
ionic cordova build android
ionic cordova run android (Connect your device before executing this)
Try Reinstalling cordova-plugin-whitelist plugin.
I'd the same problem. But I just uninstalled and installed again the ionic DevApp and it solved it.
Try using the command ionic serve -c this for view the app into Ionic devApp
I am not sure if this helps now - In your DevAPp you have settings where you can manually enter IP address and port. This will be the private IP (192.x.x.x) and 8100 that is displayed when you start the ionic serve --devapp from the terminal.
I have created my ionic App via Commmand Prompt by using the following command,
mfp cordova create AppName
After that mfp plugin was installed automatically inside my project.Then
I created mfp project using,
mfp create projectname
App created successfully..Then using
mfp push
i pushed my app inside the server 7.1 version.
After i have started to run my ionic app using,
ionic run android --livereload
In there i am getting error as,
TypeError: platforms[platformId].parser is not a function
My configuration:
cordova : 5.4.1 version android : 3.6.4 version
Anyone help will be Appreciated!!!!
You did not create an Ionic app. You created a Cordova app.
You wrote: mfp cordova create AppName. That's not how you create an Ionic app... that's how you do it: ionic start todo blank.
Please read the Ionic docs.
http://ionicframework.com/docs/guide/installation.html
To create an Ionic app and then integrate it with MobileFirst , you can follow this guide: https://www.raymondcamden.com/2015/03/23/working-with-ibm-mobilefirst-and-the-ionic-framework/