Closed abnersouza closed 2 years ago
You can specify the preferences in your capacitor.config.json under a cordova
key, and they will be added to config.xml by Capacitor during sync.
Example:
{
"cordova": {
"preferences": {
"SirenAlertType": "critical",
"AndroidUpdateAlertType": "Immediate"
}
}
}
You can specify the preferences in your capacitor.config.json under a
cordova
key, and they will be added to config.xml by Capacitor during sync.Example:
{ "cordova": { "preferences": { "SirenAlertType": "critical", "AndroidUpdateAlertType": "Immediate" } } }
Thanks so much @dpogue one of my colleagues here sent that option to be added to the capacitor.config.ts, and is very much similar to your
cordova: {
preferences: {
SirenAlertType: "critical",
AndroidUpdateAlertType: "Immediate"
}
},
Thanks, maybe as a suggestion to add that info to the reame.md file.
Hi guys,
I'm using capacitor with Angular and I have added
<preference name="SirenAlertType" value="critical" />
to the config.xml file inside the ios folder, but the issue I have is every time I run: npx cap sync, that config.xml file is rewritten, and the preference tag is removed.Is there anyway to keep the preference tag after a sync or copy?
Here my config.xml file:
Wait to hear from you, Abner