Reputation: 83
I'm starting out with Adobe PhoneGap as a way to develop native mobile apps. I have a solid understanding of jQuery/HTML5/CSS but upon using PhoneGap, there are a few basic areas which leave me baffled.
All of these questions relate to using the PhoneGap Desktop App to test apps on my iOS devices.
No matter what I do, I can't get Splash screens to show on test apps via PhoneGap Desktop App. Even the example "Hello World" project that PhoneGap can create has links/files for a splashscreen but it doesn't show - is this normal?
Related to the above, why are there multiple config.xml files? I have been editing the root config.xml file but there is also a config.xml in "platforms/browser" - having read some other answers, it seems as though there should be a config.xml in the "www" folder too? Any clarification would be much appreciated.
Finally, using the sample code generated by PhoneGap Desktop, I have been able to edit a blank project and trigger notifications, access the camera etc successfully from my jQuery code. However, the "Plugin"s folder is empty and I'm not referencing any of the plugins in my config.xml - Does the PhoneGap Desktop App always include all plugins by default? Do I need to explicitly state which Plug-Ins I use once I get to the point where I want to deploy a native app?
Thank you for any pointers on the above.
Upvotes: 1
Views: 65
Reputation: 2947
I can't give you a complete answer, as I mainly use the CLI and PhoneGap Build service to build my app. But here's some more info that might help:
Missing splash screens can be due to a few things:
<splash>
element for a particular platform, or a relative path that isn't pointing to the right placesplashscreen
plugin with storyboard screens, you might be missing some of the screen images. More info can be found on the Cordova website: https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-splashscreen/index.htmlEither way, if it's throwing some sort of file not found exception, you should be able to catch it by either adding the browser platform (to test) or clicking refresh in the browser. Not sure how the PG desktop app works, or if it has a refresh option somewhere.
[EDIT] I should also mention, it's possible that there is also some security policy nonsense going on as well. See https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-whitelist/ for more info. I think errors related to security also show up in the console.
A lot of the configuration path stuff is tied into the config.xml
file. This has gone through a few iterations over the development of Cordova / PhoneGap, so it's understandable that there would be some confusion. The file should be in the app's top-level directory; it gets copied down to each platform as part of the build script process. Older versions of Cordova / PhoneGap had this file down in the \www
directory. There's some more info on that file here: https://cordova.apache.org/docs/en/latest/config_ref/
No idea what's going on here. Access to the camera, etc. should be controlled by plugins, which would be specified in your config.xml
file (insert meme here: PHONEGAP DESKTOP APP Y U NO BLOCK?). You will definitely need to specify which plugins will be used in the config.xml
file when you deploy to an actual device.
Upvotes: 0