I set up a basic Cordova project, and whenever I run cordova build, the config.xml file in Windows gets re-written to defaults, I added the following lines to change the icon of my project. When I run the project I can see that my icon have been changed but when I go to the bld/Debug/platforms/windows/config.xml it is in the default format and I cannot see the lines that I have added. So i get the default cordova icon instead. So I cannot deploy the app to the windows store. Very strange. Is anyone got any idea about this.
<platform name="windows">
<icon src="res/icons/windows/logo.png" width="150" height="150" />
<icon src="res/icons/windows/smalllogo.png" width="30" height="30" />
<icon src="res/icons/windows/storelogo.png" width="50" height="50" />
</platform>
Thank you
Do not surround it with platform and try it like this. It should work.
<icon src="res/icons/windows/logo.png" platform="windows8" width="150" height="150" />
<icon src="res/icons/windows/smalllogo.png" platform="windows8" width="30" height="30" />
<icon src="res/icons/windows/storelogo.png" platform="windows8" width="50" height="50" />
Related
I am trying to add a font icon using the following code:
<Image>
<Image.Source>
<FontImageSource
FontFamily="{OnPlatform iOS=Ionicons,
Android=ionicons.ttf#}"
Glyph=""
Size="44"
Color="Red" />
</Image.Source>
</Image>
which I found on the official Microsoft Docs. However, the icon doesn't show up on my Android phone, instead I get this (symbol not found placeholder):
You miss a "#" after Android=ionicons.ttf :
<Image>
<Image.Source>
<FontImageSource
FontFamily="{OnPlatform iOS=Ionicons,Android=ionicons.ttf#}"
Glyph=""
Size="44"
Color="Red" />
</Image.Source>
</Image>
I don't think there is a icon font named f37f in the ionicons
I created an msi using wix installer but for this software to work we need to install another software. SO I want user to show a message as a dialog so that they will be aware of dependency package installation.
Once user click ok in this dialog background installation should progress
For this I created a custom dialog and called form my Produt.wxs, but it is not acting as information radiator but takes control of installation.
How can I spawn a information radiator after showing the welcome screen so once user click ok the dialog should go and next page of licence agreement should show.
Product.wxs
<Product Id="*" Name="Mentor PC" Language="1033" Version="1.0.0.0" Manufacturer="Waygate Technologies" UpgradeCode="303D1BF2-E4C1-44A3-9BBC-85D61CE0F7B7">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" Manufacturer="Waygate Technologies" Description="Version 1.0" Comments="(C) 2020 Technologies" Platform="x64"/>
<MajorUpgrade AllowDowngrades="yes" Schedule="afterInstallValidate" />
<MediaTemplate EmbedCab="yes" />
<UIRef Id="SetupDialogUI" />
<Binary Id="bgPic" SourceFile="$(env.installer_icons_dir)/Technologies-dialog.png"/>
SetupDialog.wxs
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<UI Id="SetupDialogUI">
<Property Id="Ok">OKbtn</Property>
<Binary Id="OKbtn" SourceFile="$(env.installer_icons_dir)/OKbtn.bmp"/>
<Dialog Id="SetupDialog" Width="400" Height="300" Title="Waygate Technologies">
<Control Id="background" Type="Bitmap" Text="bgPic" Height="300" Width="400" X="0" Y="0" TabSkip="no" />
<Control Id="introText" Type="Text" X="130" Y="50" Width="350" Height="22" Transparent="yes" Text="{\TahomaHeader}Welcome to Metro App setup." />
<Control Id="explanationText" X="130" Y="100" NoWrap="no" RightAligned="no" Transparent="yes" Type="Text" Width="250" Height="100" Text="{\TahomaNormal}To continue with the setup click on the Install button. If you choose not to install this application, click on the Cancel button to exit." />
<Control Id="installButton" Type="PushButton" Text="[Ok]" Height="40" Width="100" X="170" Y="250" Bitmap="yes">
<Publish Event="EndDialog" Value="Return">1</Publish>
</Control>
</Dialog>
</UI>
<InstallUISequence>
<Show Dialog="SetupDialog" Before="ExecuteAction" />
</InstallUISequence>
Otherthan than "SetupDialog.wxs" I donty have any dialog files, its use default WIX provided
If you have a dependent install requirement then you'll need to chain your installs instead of embedding them. One of the limits of Windows installer is that only one install can be running at any given time in the ExecuteSequence. Also, have you considered your end user running your install silently? How would that be handled with dialogs?
To chain your installs you'll need to build a bootstrapper (setup.exe). Take a look at WiX Burn. Focus on the Chaining part.
I have an app that uses the user's location to find landmarks they are near. After submitting my Phonegap app to the iOS store, it is getting rejected for the following reason:
"We noticed that your app requests the user’s consent to access their location but does not clarify the use of the location in the applicable purpose string. Please revise the relevant purpose string in your app’s Info.plist file to specify why the app is requesting access to the user's location. You can modify your app's Info.plist file using the property list editor in Xcode."
I thought I had addressed this issue by adding the following to my config.xml file:
<edit-config target="NSLocationWhenInUseUsageDescription" file="*-Info.plist" mode="merge">
<string>The user's location is used to find the distance they are from certain landmarks.</string>
</edit-config>
config.xml:
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.phonegap.myapp" version="1.0.10" xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0">
<name>MyApp</name>
<preference name="android-targetSdkVersion" value="26"/>
<description>
A blank PhoneGap app.
</description>
<plugin name="cordova-plugin-whitelist" source="npm" spec="~1.2.1" />
<plugin name="cordova-plugin-geolocation" spec="2.4.3" />
<plugin name="cordova-plugin-x-socialsharing" spec="5.4.0" />
<edit-config target="NSLocationWhenInUseUsageDescription" file="*-Info.plist" mode="merge">
<string>The user's location is used to find the distance they are from landmarks.</string>
</edit-config>
<icon src="images/icon.png" />
<icon height="40" platform="ios" src="images/icon40.png" width="40" />
<icon height="76" platform="ios" src="images/icon76.png" width="76" />
<icon height="120" platform="ios" src="images/icon120.png" width="120" />
<icon height="152" platform="ios" src="images/icon152.png" width="152" />
<icon height="1024" platform="ios" src="images/icon1024.png" width="1024" />
<author email="support#phonegap.com" href="http://phonegap.com">
PhoneGap Team
</author>
<content src="index.html" />
<access origin="*" />
</widget>
However, it is still getting rejected for this reason. How could I modify the config.xml or anything else to not get rejected for this reason on the iOS store?
I removed this part:
<edit-config target="NSLocationWhenInUseUsageDescription" file="*-Info.plist" mode="merge">
<string>The user's location is used to find the distance they are from certain landmarks.</string>
</edit-config>
and added this part:
<plugin name="cordova-custom-config" version="*"/>
<config-file overwrite="true" parent="NSLocationAlwaysUsageDescription" platform="ios" target="*-Info.plist"> <string>Your location is used to find how far you are from landmarks.</string> </config-file>
<config-file overwrite="true" parent="NSLocationWhenInUseUsageDescription" platform="ios" target="*-Info.plist"> <string>Your location is used to find how far you are from landmarks.</string> </config-file>
Now it's working as expected.
I am having issues configuring the windows 10 task bar during the osd stage in sccm. I want to remove whats there and add chrome and file explorer.
I have also got a custom start menu config. The start menu config works, its applied during the task sequence. using this command:
powershell.exe Import-StartLayout -LayoutPath .\StartMenu.xml -MountPath C:\
According to the MS docs you can add the taskbar config to the same file, when I do this is get an error sating its not a valid layout file.
Here is the file:
<?xml version="1.0" encoding="utf-8"?>
<LayoutModificationTemplate
xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification"
xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout"
xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout"
xmlns:taskbar="http://schemas.microsoft.com/Start/2014/TaskbarLayout"
Version="1">
<LayoutOptions StartTileGroupCellWidth="6" />
<DefaultLayoutOverride>
<StartLayoutCollection>
<defaultlayout:StartLayout GroupCellWidth="6">
<start:Group Name="Apps">
<start:DesktopApplicationTile Size="2x2" Column="0" Row="0" DesktopApplicationLinkPath="%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Google Chrome.lnk" />
<start:DesktopApplicationTile Size="2x2" Column="2" Row="0" DesktopApplicationLinkPath="%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\VIP Access.lnk" />
<start:DesktopApplicationTile Size="2x2" Column="4" Row="0" DesktopApplicationLinkPath="%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Citrix Receiver.lnk" />
</start:Group>
<start:Group Name="Office">
<start:DesktopApplicationTile Size="2x2" Column="4" Row="0" DesktopApplicationLinkPath="%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\PowerPoint 2016.lnk" />
<start:DesktopApplicationTile Size="2x2" Column="2" Row="0" DesktopApplicationLinkPath="%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Excel 2016.lnk" />
<start:DesktopApplicationTile Size="2x2" Column="0" Row="0" DesktopApplicationLinkPath="%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Word 2016.lnk" />
</start:Group>
</defaultlayout:StartLayout>
</StartLayoutCollection>
</DefaultLayoutOverride>
<CustomTaskbarLayoutCollection>
<defaultlayout:TaskbarLayout>
<taskbar:TaskbarPinList PinListPlacement="Replace">
<taskbar:DesktopApp DesktopApplicationLinkPath="%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Google Chrome.lnk" />
</taskbar:TaskbarPinList>
</defaultlayout:TaskbarLayout>
</CustomTaskbarLayoutCollection>
</LayoutModificationTemplate>
I just cant see whats wrong with it, does anyone see anything?
Quick comparison with our LayoutModification.xml shows that we have it like this
<CustomTaskbarLayoutCollection PinListPlacement="Replace">
<defaultlayout:TaskbarLayout>
<taskbar:TaskbarPinList>
<taskbar:DesktopApp DesktopApplicationLinkPath="%APPDATA%\Microsoft\Windows\Start Menu\Programs\System Tools\File Explorer.lnk" />
</taskbar:TaskbarPinList>
</defaultlayout:TaskbarLayout>
</CustomTaskbarLayoutCollection>
So we got the PinListPlacement in a different place. Maybe that is what puts the cmdlet off.
However I also noticed that we do not use the Import-StartLayout but copy the xml directly to "C:\Users\Default\AppData\Local\Microsoft\Windows\Shell\LayoutModification.xml". Unfortunately I do not recall why we decided for this method. Seeing as Microsoft constantly changed stuff about those xmls, made it possible that exported menus do not work when imported again unchanged and introduced new features with every new release it could be that we just did it because the cmdlets do not work as intended, so maybe try that as well if the change does not work out.
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0" id="com.fornextit.southplus" version="1.0.0">
<name>South Plus</name>
<description>South Plus application that responds to the deviceready event.</description>
<author href="http://phonegap.com" email="support#phonegap.com">PhoneGap Team</author>
<content src="index.html"/>
<feature name="Notification">
<param name="android-package" value="org.apache.cordova.dialogs.Notification" />
</feature>
<feature name="Vibration">
<param name="android-package" value="org.apache.cordova.vibration.Vibration" />
</feature>
<preference name="phonegap-version" value="cli-5.2.0" />
<preference name="permissions" value="none"/>
<preference name="orientation" value="default"/>
<preference name="target-device" value="universal"/>
<preference name="fullscreen" value="true"/>
<preference name="webviewbounce" value="true"/>
<preference name="prerendered-icon" value="true"/>
<preference name="stay-in-webview" value="false"/>
<preference name="ios-statusbarstyle" value="black-opaque"/>
<preference name="detect-data-types" value="true"/>
<preference name="exit-on-suspend" value="false"/>
<preference name="show-splash-screen-spinner" value="true"/>
<preference name="auto-hide-splash-screen" value="true"/>
<preference name="disable-cursor" value="false"/>
<preference name="android-minSdkVersion" value="7"/>
<preference name="android-installLocation" value="auto"/>
<gap:plugin name="org.apache.cordova.battery-status"/>
<gap:plugin name="org.apache.cordova.camera"/>
<gap:plugin name="org.apache.cordova.media-capture"/>
<gap:plugin name="org.apache.cordova.console"/>
<gap:plugin name="org.apache.cordova.contacts"/>
<gap:plugin name="org.apache.cordova.device"/>
<gap:plugin name="org.apache.cordova.device-motion"/>
<gap:plugin name="org.apache.cordova.device-orientation"/>
<gap:plugin name="org.apache.cordova.dialogs"/>
<gap:plugin name="org.apache.cordova.file"/>
<gap:plugin name="org.apache.cordova.file-transfer"/>
<gap:plugin name="org.apache.cordova.geolocation"/>
<gap:plugin name="org.apache.cordova.globalization"/>
<gap:plugin name="org.apache.cordova.inappbrowser"/>
<gap:plugin name="org.apache.cordova.media"/>
<gap:plugin name="org.apache.cordova.network-information"/>
<gap:plugin name="org.apache.cordova.splashscreen"/>
<gap:plugin name="org.apache.cordova.vibration"/>
<plugin name="Notification" value="org.apache.cordova.Notification"/>
<icon src="icon.png"/>
<icon src="www/res/icon/android/icon-36-ldpi.png" gap:platform="android" gap:qualifier="ldpi"/>
<icon src="www/res/icon/android/icon-48-mdpi.png" gap:platform="android" gap:qualifier="mdpi"/>
<icon src="www/res/icon/android/icon-72-hdpi.png" gap:platform="android" gap:qualifier="hdpi"/>
<icon src="www/res/icon/android/icon-96-xhdpi.png" gap:platform="android" gap:qualifier="xhdpi"/>
<icon src="www/res/icon/blackberry/icon-80.png" gap:platform="blackberry"/>
<icon src="www/res/icon/blackberry/icon-80.png" gap:platform="blackberry" gap:state="hover"/>
<icon src="www/res/icon/ios/icon-57.png" gap:platform="ios" width="57" height="57"/>
<icon src="www/res/icon/ios/icon-72.png" gap:platform="ios" width="72" height="72"/>
<icon src="www/res/icon/ios/icon-57-2x.png" gap:platform="ios" width="114" height="114"/>
<icon src="www/res/icon/ios/icon-72-2x.png" gap:platform="ios" width="144" height="144"/>
<icon src="www/res/icon/webos/icon-64.png" gap:platform="webos"/>
<icon src="www/res/icon/windows-phone/icon-48.png" gap:platform="winphone"/>
<icon src="www/res/icon/windows-phone/icon-173-tile.png" gap:platform="winphone" gap:role="background"/>
<gap:splash src="www/res/screen/android/screen-ldpi-portrait.png" gap:platform="android" gap:qualifier="port-ldpi"/>
<gap:splash src="www/res/screen/android/screen-mdpi-portrait.png" gap:platform="android" gap:qualifier="port-mdpi"/>
<gap:splash src="www/res/screen/android/screen-hdpi-portrait.png" gap:platform="android" gap:qualifier="port-hdpi"/>
<gap:splash src="www/res/screen/android/screen-xhdpi-portrait.png" gap:platform="android" gap:qualifier="port-xhdpi"/>
<gap:splash src="www/res/screen/blackberry/screen-225.png" gap:platform="blackberry"/>
<gap:splash src="www/res/screen/ios/screen-iphone-portrait.png" gap:platform="ios" width="320" height="480"/>
<gap:splash src="www/res/screen/ios/screen-iphone-portrait-2x.png" gap:platform="ios" width="640" height="960"/>
<gap:splash src="www/res/screen/ios/screen-iphone-portrait-568h-2x.png" gap:platform="ios" width="640" height="1136"/>
<gap:splash src="www/res/screen/ios/screen-ipad-portrait.png" gap:platform="ios" width="768" height="1024"/>
<gap:splash src="www/res/screen/ios/screen-ipad-landscape.png" gap:platform="ios" width="1024" height="768"/>
<gap:splash src="www/res/screen/windows-phone/screen-portrait.jpg" gap:platform="winphone"/>
<access origin="*"/>
<access origin="127.0.0.1*"/>
<plugin name="cordova-plugin-whitelist" version="1"/>
<allow-intent href="http://*/*"/>
<allow-intent href="https://*/*"/>
<allow-intent href="tel:*"/>
<allow-intent href="sms:*"/>
<allow-intent href="mailto:*"/>
<allow-intent href="geo:*"/>
<platform name="android">
<allow-intent href="market:*"/>
</platform>
<platform name="ios">
<allow-intent href="itms:*"/>
<allow-intent href="itms-apps:*"/>
</platform>
</widget>
this is my config.xml
phonegap build isnt accepting simplest of simple single index file. it worked before. dont know what change they bought over. now its not working. please somebody suggest.
i am getting this error: Error - Some official plugins have to be updated if using PhoneGap >= 4.0.0. Please upgrade the version of any plugins that may include the following file: FileTransfer.java - You can fix this here
#amar,
last weekend an unannounced change was made to Phonegap Build, if you do not set the version of your compiler, you now get cli-5.2.0. This has broken many, many programs. Input your error string in the search, and you will see it.
Here is what you need to know:
From the Phonegap Build Forum, Petra Adds:
I would add: without announcement, PGB changed the default PGB-version from 3.7.0 to cli-5.2.0. This causes all those who have not set 'phonegap-version' in config.xml to be confronted with the sudden need of splashscreen and whitelist plugins and additional whitelisting specifications in config and html.
Also, several plugins seem not to build correctly with cli-5.2.0, causing log file error messages about "Class ***.java".
FWIW: Phonegap Build admitted to as much in this tweet
QUICK FIX Add this to your config.xml
<preference name="phonegap-version" value="3.7.0" />
From Top Mistakes by Developers new to Cordova/Phonegap you have hit:
#6 Not setting the "phonegap version" for your compiler
#7 Not setting "version" for you plugins
#10 Not adding the new "white-list" and "white-list plugin" parameters in config.xml.
For #6 & #7
With the CLI version, if you do not assign a version for your platform OR in ''Phonegap Build'' if you do not set the phonegap-version in config.xml, YOU WILL GET THE LATEST VERSION. If you are lucky, your program just works as expected. If you are not lucky, you'll get a set of cascading errors.
Luckily for all of us, Holly Schinsky has written a nice blog post to explain it all:
Cordova/PhoneGap Version Confusion
http://devgirl.org/2014/11/07/cordovaphonegap-version-confusion/
For #10
This relatively * NEW * requirement means – to access ANY website or resources on the web, you MUST use the whitelist and the whitelist plugin. This requirement goes into affect, if you are using cordova-android#4.0.0 or better; including cli-5.1.1. If however, your version is before 4.0.0, let's say 3.5.0 or 3.7.0, then you will not have to add the white-list requirement.
To be clear, the "whitelist" has been around for a bit, but the plugin and requirement is very new. As you would expect, when the "whitelist" was added, the defacto open-access feature was deprecated. Or said another way, the defacto open-access feature was planned and scheduled to be eliminated. This change marks a step in removal of the open-access feature.
In addition, the Content Security Policy (CSP) has caught numerous developers - because it was soooo poorly publicized. Depending on your use and the version of Phonegap you are using, the CSP needs to go in every single HTML page you used, just like you have to wait for 'deviceready'. However, there are cases where it is not needed at all. The documentation is confusing for some, please read it carefully. The documentation is buried in the bottom of many of the latest documentation pages.
Related Links
Phonegap Build Forum: Notes for upgrading to cli-5.1.1 on PGB and now required Whitelist
Cordova Whitelist Guide
Phonegap Whitelist Guide
Phonegap Build Whitelist Guide