0

I want to convert my app into a hybrid app using phonegap build.

How do I do that?

I see different setups in basically every tutorial.

In this one, there is not a single platform folder, just the usual img/css folders, plus the config.xml

In many other tutorials I see a folder structure like www, platforms, etc. with the andorid and ios platform code.

How do I setup my phonegap project??? Do I need the platform, do I not need the platform, do I need the cordova.js, do I not need it??

It seems information about this is somewhat contradictory and often outdated.

E. g. I created my app using these steps.

Which does create all those folders like www and platform, however, the app doesnt install correctly after I built it with phonegap build. So something must be configured wrongly... I mean, it's there OWN site and it fails!

What is the correct folder structure that I need to convert my app into a hybrid app that will run on iOS, android and windows phone, using phonegap build?

1 Answer 1

1

It depends on whether you plan to use PhoneGap to develop or only to compile (Phonegap Build).

I will show how I used until a little time ago.

I used to develop an Ionic project and made all the development with it. When I needed to test something on the phone, I was using the Phonegap Build.

Both projects have the folder "www". To use Phonegap Build site, I was replacing the folder "www" of Phonegap project with the "www" folder of Ionic project. Then just send the Phonegap project ZIP to Phonegap Build site. This always worked for me.

After creating the project (phonegap create my-app), basically you do the project at "www" folder and configures preferences in config.xml (fullscreen, plashScreen, android-minSdkVersion, etc).

If you use Phonegap Build site you don´t need to add platforms (platform phonegap add) and not need to run "phonegap run android"

PhoneGap Build's only requirement for your application structure is that the config.xml and index.html is in the top level of your application.

Make test: - phonegap create my-app - configure config.xml (If necessary, not required) - config.xml and index.html in the same folder (preferably in www) - ZIP - Upload ZIP on Phonegap Build

Sign up to request clarification or add additional context in comments.

1 Comment

aaah okay, this here "PhoneGap Build's only requirement for your application structure is that the config.xml and index.html is in the top level of your application." was the key sentence for me understanding it (and also the one about the platforms :) )! Thanks a lot!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.