PhoneGap Build Repo & App Icon Questions

  • 1
  • Question
  • Updated 9 years ago
Just used Build to post my first Android app - fantastic. Question: When providing Build with a link to a PhoneGap project in a repo, what happens if its, for example an iPhone PG project? Does this stil work for Android, BB, etc.? Also, is config.xml designed to handle all the various image sizes required for different platforms? For example, the Android Market allowed me to upload multiple images after my app was uploaded, but I was reading in a Sitepoint book that iPhone apps require 4 icons, different size splash screens (for iPhone 3, 4, and iPad), and BlackBerry requires even more. Can all these images be specified in config.xml?
Photo of Jeff

Jeff

  • 23 Posts
  • 0 Reply Likes

Posted 9 years ago

  • 1
Photo of Hardeep Shoker

Hardeep Shoker

  • 1941 Posts
  • 89 Reply Likes
Hello Jeff,

The point of Build is to provide you with a single gateway to develop application for all platforms. Your repository should only contain your assets such as html,css, and javascript; Build will automatically package everything up according to which platforms you wish to target (by default all).

As far as the config.xml it provides a normalized way to configure projects for platforms. It for example does allow you to specify the icons and images.

https://build.phonegap.com/docs/confi...

There have been some more features added that will need to be documented but it's the reference guide for what config.xml provides.

Hardeep Shoker
Photo of Jeff

Jeff

  • 23 Posts
  • 0 Reply Likes
Hardeep -

Thanks for the tips re:Build's intent, that definitely clarifies everything for me.

Regarding images & config.xml, I see there are basic icon and splash elements detailed in the config.xml guide, but I believe the ability to describe the images more specifically in confix.xml would be valuable.

For example, just for iPhone apps, the following are required for splash screens:

Default.png, 320×480px, for the standard iPhone display
Default@2x.png, 640×960, for the iPhone 4’s Retina display
Default-Portrait.png, 768×1004, for the iPad in portrait orientation
Default-Landscape.png, 1024×748, for the iPad in landscape orientation

and again for iPhone, the following are required as icons:

icon.png, 57x57px
icon-72.png, 72x72.png
icon@2x.png, 114x114px

Would then the following be understood by Build and packaged appropriately for iPhone apps?

- Jeff
Photo of Jeff

Jeff

  • 23 Posts
  • 0 Reply Likes
Aww, it removed my example. What if I try without the HTML brackets:

gap:splash src="Default.png" width="320" height="480"
gap:splash src="Default@2x.png" width="640" height="960"
gap:splash src="Default-Portrait.png" width="768" height="1004"
gap:splash src="Default-Landscape.png" width="1024" height="748"
icon src="icon.png" width="57" height="57" />
icon src="icon-72.png" width="72" height="72"
icon src="icon@2x.png" width="114" height="114"
Photo of Hardeep Shoker

Hardeep Shoker

  • 1941 Posts
  • 89 Reply Likes
yes, the last post is correct.

Also next time you may use without the * to produce something such as


<gap:splash src="Default.png" width="320" height="480" />
<gap:splash src="Default@2x.png" width="640" height="960" />
<gap:splash src="Default-Portrait.png" width="768" height="1004" />
<gap:splash src="Default-Landscape.png" width="1024" height="748" />
<icon src="icon.png" width="57" height="57" />
<icon src="icon-72.png" width="72" height="72" />
<icon src="icon@2x.png" width="114" height="114" />
Photo of Jeff

Jeff

  • 23 Posts
  • 0 Reply Likes
Hardeep -

Is it possible to specify images hosted on a remote web server, rather than include them in the zip? Reason being, including images with dashes (required for iPhone) breaks the BlackBerry build. I'm trying to put together a uniform config.xml that will work for all platforms. So for example:


<gap:splash src="http://www.mysite.com/myapp/images/Default.png" width="320" height="480" />


- Jeff
Photo of Hardeep Shoker

Hardeep Shoker

  • 1941 Posts
  • 89 Reply Likes
As long as the correct sizes are given build will use the appropriate files for IOS splash and icons.

For example:


<gap:splash src="landscape1.png" width="1024" height="748" />

Instead of:

<gap:splash src="Default-Landscape.png" width="1024" height="748" />


Hardeep Shoker
Photo of Jeff

Jeff

  • 23 Posts
  • 0 Reply Likes
Ah, I see. So as an example, if both iPhone and Android apps can use a 72x72 icon, a file included in the zip titled "icon57.png" would be automatically assigned to each build. Thanks for the help!
Photo of Hardeep Shoker

Hardeep Shoker

  • 1941 Posts
  • 89 Reply Likes
It would be best to use just icon.png as a default for all builds.

Hardeep Shoker
Photo of Antonio Baldini

Antonio Baldini

  • 19 Posts
  • 0 Reply Likes
How put duration for the splash?
Photo of Hardeep Shoker

Hardeep Shoker

  • 1941 Posts
  • 89 Reply Likes
Hey Antonio,

There is currently no way to specify this through config.xml. I will talk with the team to see if this will be implemented.

Hardeep Shoker