1 person found this helpful
Right now PhoneGap Build has a different project structure when compared to CLI/Desktop projects, as you've discovered, so you're not missing anything obvious at the moment.
Regarding the paths:
1) The content tag is relative to "www"; it is read when your app first starts so that PG knows what file to initially render. This parameter is read at runtime, so you can sort of justify the difference in path relativity here.
2) The icon/splash asset paths are relative to config.xml. They are used during the build phase in order to find and copy the appropriate assets into their respective locations in the platform-specific bundle. This is a build step in your project (not at runtime), so it makes sense that the paths are relative to the project's root (the parent directory with config.xml).
1) PhoneGap Desktop/Developer app is useful for rapid iteration and testing. It is not a perfect representation of the environment your app receives when built from either Build or the CLI. There are significant edge cases you can run into, so be sure the developer app isn't your only means of testing.
2) I usually avoid mixing a lot of PGB with the CLI (and vice versa). There are times I've had to mix the two, but I try to keep it to a minimum and choose one or the other when I can (usually depends on the client's needs, in my case).
3) None of this is to say this is the way you must use these tools; it's just the way I do. :-)
Hope that helps? Apologies if any of that is muddy; I've a migraine today, and English is currently not my brain's forte.
Hi Thanks for your reply, definitely cleared up some things.
I'm a little confused when you said "mixing a lot of PGB with CLI". How would that work? Maybe my terminology is off but I thought the CLI means compiling with the command line tool, and PGB means compiling with the website (PhoneGap Builder). Are you just refering to what I said about having to switch back and forth paths and whatnot when you decide to switch between the 2?
For debugging is it assumed the only way is to use the Developer App?
1 person found this helpful
The desktop app also creates a CLI-compatible project structure, so I'd include that in the CLI side of the house. Because of the current issues with having to switch config.xml and project structure between CLI and PGB, I try to minimize the times that I ever have to worry about that. There are times I have to switch (perhaps for a client), but I try to minimize that upfront. At some point, assuming PGB changes to support CLI format, I expect that issue to go away.
As for debugging, you can use CLI / PGB to debug. In fact that's better than the Developer app because you'll be stuck with limited debugging tools on the Developer app (it's signed, and so remote debugging is disabled -- you'll be limited to Weinre or similar tools). With CLI/PGB you can use Chrome to remotely debug Android builds and you can use Safari to remotely debug iOS apps, and in both cases you get a full debugging environment (breakpoints, DOM inspector, profiling, etc.). (Note: that goes away when you sign with a distribution certificate -- we don't want users debugging production apps!)
Hope that helps!