Is phonegap build compatible with Ionic Framework?


#1

Hi, made a sample app and I tried to build it using the online phonegap builder. I copied the config.xml file to the www folder and pushed the www folder to a github repo.

Then I used the repo and made the sample app using the phonegap builder online. However the app I get when run on chrome (ionic serve) and what I get after I installed the apk is different.

This is the app shown in Chrome (ionic serve)

This is the app after installed on the device

As you can see some parts of the CSS is not showing up in the app. The image has been setup to a height of 60vh but here it looks small. The shaded area on top of the image and the text doesn’t showup either.

I’m new to cordova/phonegap/ionic so can’t I build the app using phonegap builder?

Why the two outputs look different? Does cordova apps/webkit support all css functions that chrome supports? (Chrome is a webkit browser too as far as I know)

Please help me on this as I’m still learning phonegap/ionic/cordova. Thanks


#2

Hey there.

So Phonegap is the adobe distribution of Cordova, so underneath, they are the same thing.
Do you have the device plugin added in for phonegap?
It could be a case where the device doesn’t support viewport units.
Are you abel to run the app on device from the ionic cli without any issues?


#3

Hi, No I’ve not installed enought plugins in the app, this is my first big app I made with Ionic.

I’ve only tried ionic serve which shows the app on chrome browser. Not in a real devide until I built the app using the online builder.

Is there a way to live preview the app on a real device using the cli?


#4

You can download the Phonegap Developer app and use phonegap serve in the Phonegap CLI to allow your device to stream the files in real time from your machine. This also does live updating so if you change a file it will update instantly on the device


#5

Can’t I do the same thing using ionic run? I’ve not tried it but does ionic run allow me to run it on my device? I’m new to ionic so this would be a great help if anyone can explain. I’m currently googling on ionic run command


#6

From what I can tell, if you are using iOS then Ionic run means you must have an Apple Developer license, be using XCode and have your device/provisions set up correctly. With Android it is less strict but you must enable USB debugging and have the device plugged in

With the Phonegap Developer app, you dont need any of this. http://app.phonegap.com/

Just download the app on whichever devices you want to test on, install the Phonegap CLI, point to the working app directory and away you go. You just have to open up the app and use the same network connection as your computer, then connect to the specified port that it tells you (:3000)

Live code updates are so handy! As soon as you save a file on your computer, the app is instantly updated on the device. And since it is using phonegap, it gives you access to some of the native plugins too.


#7

You can run the app on your device if you have your android environment setup and your device is in developer mode.

Just run ionic run android and it will run on the connect device.