Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use the same source from PhoneGap Build and PhoneGap Android project in Eclipse

Anyone might be notice there is a diffrence in PhoneGap Build and PhoneGap develop in Eclipse. I want to develop based on PhoneGap Build to support for Android and iPhone. However to do debugging in Android I need to setup Eclipse project which is differ than PhoneGap Build.

For example, the index.html location is in the root in Build while it is in asset/www in Eclipse. There is a config.xml in Build while I need to configure it in AndroidManifest.xml for Eclipse.

How can I use the same source for developing PhoneGap Build while I can debug it in Android and my friend can debug in iPhone? Any useful folder structure? I want to put in the same SVN/GIT repo and I dont want to duplicate the index.html, css, img, js files.

like image 843
CallMeLaNN Avatar asked May 04 '11 02:05

CallMeLaNN


1 Answers

On XCode you can easily change the location of the /www folder:

  • On the left panel go to Targets -> Your App
  • Double click on each shell script and change /www to the new location of your www folder.

This way you can have a folder structure like this:

/myapp/android (android project files)
/myapp/ios (ios project files)
/myapp/www (source)
like image 122
Felipe Brahm Avatar answered Nov 02 '22 10:11

Felipe Brahm