I was wondering if anyone could help me with my build of a appx application. Now I have done some research and I've figured out that if I add certain lines of code to my config.xml document, I can make phonegap produce a appx file instead of a xap file. I might be completely wrong.
Now I added some lines of codes like:
preference name="phonegap-version" value="cli-6.0.0"
but when I uploaded the file it gave a build error. Now I saw other people with similar problems, but I'm too tech unsavy to understand what exactly I am doing wrong. If anyone would be willing to help me out. I would be eternally grateful... Have been researching on this topic for this entire day now... I feel like I'm getting closer (maybe?)
Now I added some lines of codes like:
preference name="phonegap-version" value="cli-6.0.0"
but when I uploaded the file it gave a build error. Now I saw other people with similar problems, but I'm too tech unsavy to understand what exactly I am doing wrong. If anyone would be willing to help me out. I would be eternally grateful... Have been researching on this topic for this entire day now... I feel like I'm getting closer (maybe?)
- 27 Posts
- 1 Reply Like
Posted 4 years ago
- 27 Posts
- 1 Reply Like
Here is my config.xml file.
<?xml version="1.0" encoding="UTF-8"?>
-<widget version="1.0.0" versionCode="10" id="com.phonegap.HotelInferno" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:gap="http://phonegap.com/ns/1.0" xmlns="http://www.w3.org/ns/widgets">
<!-- versionCode is optional and Android only -->
<name>Hotel Inferno</name>
<description> The Animated Graphic Novel. </description>
<author email="bertverwaest@gmail.com" href="https://build.phonegap.com"> Bert Verwaest </author>
<preference value="cli-6.0.0" name="phonegap-version"/>
<preference value="landscape" name="orientation"/>
<preference value="true" name="fullscreen"/>
<preference value="true" name="HideKeyboardFormAccessoryBar"/>
<preference value="false" name="KeepRunning"/>
<preference value="10000" name="LoadUrlTimeoutValue"/>
<preference value="HotelInferno.HotelInferno" name="windows-identity-name"/>
<preference value="universal" name="target-device"/>
<preference value="false" name="prerendered-icon"/>
<preference value="default" name="ios-statusbarstyle"/>
<preference value="true" name="detect-data-types"/>
<preference value="false" name="exit-on-suspend"/>
<preference value="7.0" name="deployment-target"/>
<preference value="8.1" name="windows-target-version"/>
<preference value="8.1" name="windows-phone-target-version"/>
<icon src="icon.png"/>
<script src="hammer.js"/>
<plugin name="cordova-plugin-battery-status" spec="1.1.0" source="npm"/>
<plugin name="cordova-plugin-camera" spec="1.2.0" source="npm"/>
<plugin name="cordova-plugin-console" spec="1.0.1" source="npm"/>
<plugin name="cordova-plugin-contacts" spec="1.1.0" source="npm"/>
<plugin name="cordova-plugin-device" spec="1.0.1" source="npm"/>
<plugin name="cordova-plugin-device-motion" spec="1.1.1" source="npm"/>
<plugin name="cordova-plugin-device-orientation" spec="1.0.1" source="npm"/>
<plugin name="cordova-plugin-dialogs" spec="1.1.1" source="npm"/>
<plugin name="cordova-plugin-file" spec="2.1.0" source="npm"/>
<plugin name="cordova-plugin-file-transfer" spec="1.2.0" source="npm"/>
<plugin name="cordova-plugin-geolocation" spec="1.0.1" source="npm"/>
<plugin name="cordova-plugin-globalization" spec="1.0.1" source="npm"/>
<plugin name="cordova-plugin-inappbrowser" spec="1.0.1" source="npm"/>
<plugin name="cordova-plugin-legacy-whitelist" spec="1.1.0" source="npm"/>
<plugin name="cordova-plugin-media" spec="1.0.1" source="npm"/>
<plugin name="cordova-plugin-media-capture" spec="1.0.1" source="npm"/>
<plugin name="cordova-plugin-network-information" spec="1.0.1" source="npm"/>
<plugin name="cordova-plugin-splashscreen" spec="2.1.0" source="npm"/>
<plugin name="cordova-plugin-statusbar" spec="1.0.0" source="npm"/>
<plugin name="cordova-plugin-test-framework" spec="1.0.1" source="npm"/>
<plugin name="cordova-plugin-vibration" spec="1.2.0" source="npm"/>
<plugin name="cordova-plugin-whitelist" spec="1.1.0" source="npm"/>
</widget>
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
I'm a bit puzzled here:
1. Do you really have this in your config?
2. You have included the whitelist plugin, but no whitelist rules.
3. You are pinning many plugins to previius versions. Why?
4. I wonder if your config is used at all. What pgb version is displayed for your build at your pgb app's page?
1. Do you really have this in your config?
<script src="hammer.js"/>
2. You have included the whitelist plugin, but no whitelist rules.
3. You are pinning many plugins to previius versions. Why?
4. I wonder if your config is used at all. What pgb version is displayed for your build at your pgb app's page?
- 27 Posts
- 1 Reply Like
Well Petra,
just like you I am puzzled, but for different reasons :). I don't really know what exactly I am doing, lots of this stuff is a mishmash of help I've received from different sorts of fora. The config file may contain many mistakes, I have no clue. But I do know that it worked at one point, but phonegap build only gave me xap files... I was looking into a way to get the appx file... I don't really have a good idea on how to fix that. So yeah that's really my question....
How can you let phonegap build give you an appx file... I've seen people talk about it, I just don't have a clue how they do it :)
With your advice I have tried a new version of the config file...
I am not to knowledgeable about most of this stuff, so if it's easy to fix, I could use some help. If there is no way you could direct me in the right direction, that is also fine. I just need to know if it's worth the effort to try to find a solution :)
Thanks so far
just like you I am puzzled, but for different reasons :). I don't really know what exactly I am doing, lots of this stuff is a mishmash of help I've received from different sorts of fora. The config file may contain many mistakes, I have no clue. But I do know that it worked at one point, but phonegap build only gave me xap files... I was looking into a way to get the appx file... I don't really have a good idea on how to fix that. So yeah that's really my question....
How can you let phonegap build give you an appx file... I've seen people talk about it, I just don't have a clue how they do it :)
With your advice I have tried a new version of the config file...
I am not to knowledgeable about most of this stuff, so if it's easy to fix, I could use some help. If there is no way you could direct me in the right direction, that is also fine. I just need to know if it's worth the effort to try to find a solution :)
Thanks so far
- 27 Posts
- 1 Reply Like
the phonegapbuild version: cli-5.2.0 (3.9.1 / 4.1.1 / 3.8.1)
When I try to change it to 6.0.0 it crashes.
and if I leave that piece of code out of the config file, the 6.0.0. It doesn't crash but I can only donwload the xap version of the app, not the appx
When I try to change it to 6.0.0 it crashes.
and if I leave that piece of code out of the config file, the 6.0.0. It doesn't crash but I can only donwload the xap version of the app, not the appx
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
How does it 'crash'? Doesn't it install? Doesn't it launch? Doesn't the splashscreen appear? Do you get an error message?
You'll get an appx if you use cli-6.0.0 or above.
You'll get an appx if you use cli-6.0.0 or above.
- 27 Posts
- 1 Reply Like
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
- 27 Posts
- 1 Reply Like
I'm not sure if I'm looking in the wrong place... Where can I find the build log? Because the only log I can find says:
Build Date: 2016-06-17 15:02:18 +0000
Build Date: 2016-06-17 15:02:18 +0000
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
I suppose there are one or more severe errors in your zip file (either in config or in the directory structure) which make PGB not even start the build.
If your zip file is available online somewhere, please post its url and I'll be happy to have a look.
If your zip file is available online somewhere, please post its url and I'll be happy to have a look.
- 27 Posts
- 1 Reply Like
Yes, I guess so. It's just odd that it would build the Android version. You can download the zip file here:
http://www.filedropper.com/hotelinferno
Thanks again btw Petra,
for putting in the effort. I have my deadline on tuesday, so this is a huge help.
Even if it might prove to difficult to fix in the end...
http://www.filedropper.com/hotelinferno
Thanks again btw Petra,
for putting in the effort. I have my deadline on tuesday, so this is a huge help.
Even if it might prove to difficult to fix in the end...
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
Here's some feedback:
1. Your zip file is almost 50MB. It would be wise to first leave out all those mp4 files, in order to see if there's simply a problem with the file size. Rebuilding would be quicker, too.
2. You should use cli-6.1.0 instead of cli-6.0.0 in order to use the latest engines.
3. You have no splashes (required for iOS and Windows, and highly recommended for Android) and only one default icon.. You should add them.
4. Then you will also need the splashscreen plugin from npm and the statusbar plugin (in order to make iPad scale well).
1. Your zip file is almost 50MB. It would be wise to first leave out all those mp4 files, in order to see if there's simply a problem with the file size. Rebuilding would be quicker, too.
2. You should use cli-6.1.0 instead of cli-6.0.0 in order to use the latest engines.
3. You have no splashes (required for iOS and Windows, and highly recommended for Android) and only one default icon.. You should add them.
4. Then you will also need the splashscreen plugin from npm and the statusbar plugin (in order to make iPad scale well).
- 27 Posts
- 1 Reply Like
I'm not developing for apple at this point, because it's too expensive. This is just a prototype that I am building. So in that case is it still necessary to that last step?
I will start with the first steps, I hope I can find a usable solution. I will keep you up to date to know if it works.
I will start with the first steps, I hope I can find a usable solution. I will keep you up to date to know if it works.
- 27 Posts
- 1 Reply Like
Left out all of the large mp4 files, no change yet. Changed the phonegap build to 6.1.0
Those Splashes do I just put them in the main folder with the icon? Put all the other icons there as well?
Those Splashes do I just put them in the main folder with the icon? Put all the other icons there as well?
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
You can place them wherever you want. In the root or elsewhere. Of course, the path in config must be correct.
And if yu don't want to build for iOS, then just add empty platform elements for the other two in your config. See the PGB Docs, Basics section at http://docs.build.phonegap.com/en_US/configuring_basics.md.html
And if yu don't want to build for iOS, then just add empty platform elements for the other two in your config. See the PGB Docs, Basics section at http://docs.build.phonegap.com/en_US/configuring_basics.md.html
- 27 Posts
- 1 Reply Like
- 27 Posts
- 1 Reply Like
I made all the adjustments, but still no changes to the build... Here is what my config file looks like at the moment:
<?xml version="1.0" encoding="UTF-8"?>
-<widget version="1.0.0" versionCode="10" id="com.phonegap.HotelInferno" xmlns:android="http://schemas.android.com/apk/res/android"; xmlns:gap="http://phonegap.com/ns/1.0"; xmlns="http://www.w3.org/ns/widgets">;
<!-- versionCode is optional and Android only -->
<name>Hotel Inferno</name>
<description> The Animated Graphic Novel. </description>
<author email="bertverwaest@gmail.com" href="https://build.phonegap.com">; Bert Verwaest </author>
<platform name="android"/>
<platform name="winphone"/>
<preference name="phonegap-version" value="cli-6.1.0"/>
<preference name="windows-identity-name" value="38651BertVerwaest.HotelInferno"/>
<preference name="orientation" value="landscape"/>
<preference name="fullscreen" value="true"/>
<preference name="HideKeyboardFormAccessoryBar" value="true"/>
<preference name="KeepRunning" value="false"/>
<preference name="LoadUrlTimeoutValue" value="10000"/>
<preference name="target-device" value="universal"/>
<preference name="prerendered-icon" value="false"/>
<preference name="ios-statusbarstyle" value="default"/>
<preference name="detect-data-types" value="true"/>
<preference name="exit-on-suspend" value="false"/>
<preference name="windows-appx-target" value="uap"/>
<icon src="res/Square44x44Logo.scale-100.png" height="44" width="44" platform="winphone"/>
<icon src="res/Square44x44Logo.scale-240.png" height="106" width="106" platform="winphone"/>
<icon src="res/Square150x150Logo.scale-100.png" height="150" width="150" platform="winphone"/>
<icon src="res/Square150x150Logo.scale-240.png" height="360" width="360" platform="winphone"/>
<icon src="res/Square71x71Logo.scale-100.png" height="71" width="71" platform="winphone"/>
<icon src="res/Square71x71Logo.scale-240.png" height="170" width="170" platform="winphone"/>
<icon src="res/Wide310x150Logo.scale-100.png" height="150" width="310" platform="winphone"/>
<icon src="res/Wide310x150Logo.scale-240.png" height="360" width="744" platform="winphone"/>
<splash src="res/SplashScreenPhone.scale-240.png" height="1920" width="1152" platform="winphone"/>
<icon src="icon.png"/>
</widget>
<?xml version="1.0" encoding="UTF-8"?>
-<widget version="1.0.0" versionCode="10" id="com.phonegap.HotelInferno" xmlns:android="http://schemas.android.com/apk/res/android"; xmlns:gap="http://phonegap.com/ns/1.0"; xmlns="http://www.w3.org/ns/widgets">;
<!-- versionCode is optional and Android only -->
<name>Hotel Inferno</name>
<description> The Animated Graphic Novel. </description>
<author email="bertverwaest@gmail.com" href="https://build.phonegap.com">; Bert Verwaest </author>
<platform name="android"/>
<platform name="winphone"/>
<preference name="phonegap-version" value="cli-6.1.0"/>
<preference name="windows-identity-name" value="38651BertVerwaest.HotelInferno"/>
<preference name="orientation" value="landscape"/>
<preference name="fullscreen" value="true"/>
<preference name="HideKeyboardFormAccessoryBar" value="true"/>
<preference name="KeepRunning" value="false"/>
<preference name="LoadUrlTimeoutValue" value="10000"/>
<preference name="target-device" value="universal"/>
<preference name="prerendered-icon" value="false"/>
<preference name="ios-statusbarstyle" value="default"/>
<preference name="detect-data-types" value="true"/>
<preference name="exit-on-suspend" value="false"/>
<preference name="windows-appx-target" value="uap"/>
<icon src="res/Square44x44Logo.scale-100.png" height="44" width="44" platform="winphone"/>
<icon src="res/Square44x44Logo.scale-240.png" height="106" width="106" platform="winphone"/>
<icon src="res/Square150x150Logo.scale-100.png" height="150" width="150" platform="winphone"/>
<icon src="res/Square150x150Logo.scale-240.png" height="360" width="360" platform="winphone"/>
<icon src="res/Square71x71Logo.scale-100.png" height="71" width="71" platform="winphone"/>
<icon src="res/Square71x71Logo.scale-240.png" height="170" width="170" platform="winphone"/>
<icon src="res/Wide310x150Logo.scale-100.png" height="150" width="310" platform="winphone"/>
<icon src="res/Wide310x150Logo.scale-240.png" height="360" width="744" platform="winphone"/>
<splash src="res/SplashScreenPhone.scale-240.png" height="1920" width="1152" platform="winphone"/>
<icon src="icon.png"/>
</widget>
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
- 27 Posts
- 1 Reply Like
No I don't... Have been trying small changes all over the place, but still haven't figured out what is wrong
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
Well, you still don't have a valid splashscreen for winphone (Note: you apparently want landscape, only, but the only splash has portrait dimensions) and the splashscreen plugin is still missing.
- 27 Posts
- 1 Reply Like
Ow that's odd. I was trying to do everything according to the documentation provided by Phonegap Build.. It only mentioned a portrait splashscreen.


- 27 Posts
- 1 Reply Like
What is a splashscreen plugin btw? Didn't find any mention of it on the Phonegap Build... I will look for it in the meanwhile myself, but in case it takes me hours to find. Might as well ask :)
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
That would be https://www.npmjs.com/package/cordova-plugin-splashscreen
But ignore the way it documents specification of stuff like
But ignore the way it documents specification of stuff like
density="land-hdpi" because that's completely wrong.(Edited)
- 27 Posts
- 1 Reply Like
Hey Petra, it looks like this might actually prove to be the answer... But the only problem is, that all of my code was written in Adobe Edge. Now I don't have a clue how to add that plugin?
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
Then this would be a good time to read your way through the Phonegap Build Docs, in this case the Plugins section.
http://docs.build.phonegap.com/en_US/configuring_plugins.md.html#Plugins
http://docs.build.phonegap.com/en_US/configuring_plugins.md.html#Plugins
- 27 Posts
- 1 Reply Like
Haha, thanks Petra. You are the greatest help on the internet ever. You have saved me so much time... My questions might be redundant half of the time, and you keep helping me through this mess. You truly are a champion!
Related Categories
-
PhoneGap Build
- 15111 Conversations
- 275 Followers


