1

I developing a phone gap based app for iPhone and Android. i have my web app files(UI screens developed using CSS, HTML5, JS) in www folder. i want to have a common www for both iPhone and Android so i placed the folder www outside iPhone and Android projects in my file system and configured the Xcode to have a link to that. For iPhone it is working perfectly. IN the case of Android i need to have this folder under assets. If the www folder is copied inside assets it is working fine. But if i try to give a link inside assets to www my project is working. It throws error "File not found /www/index.html". Can someone help me to solve this situation. So that i maintain www in one place and both my iPhone and Android refers to the same folder.

thanks.

Defendore
  • 649
  • 1
  • 8
  • 20
  • You can use this solution http://stackoverflow.com/a/7223531/973036 . It works great if you're using PC and Mac ;) – gergonzalez Apr 27 '12 at 15:23

1 Answers1

2

The best way I've found to work with this is to use a symbolic link to the folder in your projects. This lets you keep one set of files, and you can link them to wherever you want in your project while still working on the same source.

For Unix type systems use:

ln -s source link_name

Since you're working with an iPhone project as well I'm assuming you're on a Mac, but here's the Windows Vista/7 version:

mklink /D link_name source
jprofitt
  • 10,874
  • 4
  • 36
  • 46
  • Thanks profit..it is working for me in mac... But still i have one more query...When i create links like this it does not work in windows xp..Because i will be using windows xp also for android development. Is there any other alternate options other than creating links avlbl so that it works seamlessly in both mac and windows? for example editing any configuration within android project to enable links common to windows and mac? – Defendore Jan 05 '12 at 03:38
  • If you have a networked or shared drive, you might be able to put the files there, and then map the drive in Windows and then do the same thing with `mklink`. You could then update the symbolic link on your Mac. – jprofitt Jan 05 '12 at 13:09