Open ggiordan opened 3 years ago
I got it to work, the Entitlements-Release.plist and Entitlements-Debug.plist filed need to have the following entry:
<key>com.apple.developer.usernotifications.critical-alerts</key> <true/>
The next problem is getting that entry added to the file. I cannot seem to get the config-file section to work correctly in the config.xml Ideally the we could set a flag and the plugin installer would make the change.
Any one else able to get this to work?
I'm using Pushwoosh and I'm encountering the same issue. I can't find how Cordova can trigger a Critical Alert dialog for the user to receive critical alerts.
Bug Report
I cannot get the critical alerts confirmation to trigger. My app does have critical alerts in the provisioning profile. I am getting a build warning about the entitlements file not matching the provisioning profile.
Expected Behaviour
When .init is called for the first time, Critical alerts dialog is presented to user
Actual Behaviour
User gets normal allow push notifications dialog
Reproduce Scenario / Build Warning
Provisioning profile "XXXX-CriticalAlerts" for "XXXX" contains entitlements that aren't in the entitlements file: com.apple.developer.usernotifications.critical-alerts. To use these entitlements, add them to your entitlements file. Otherwise, remove unused entitlements from your provisioning profile.
Platform and Version
IOS / XCODE 12.4
cordova info
PrintoutCordova Packages:
Project Installed Platforms:
Project Installed Plugins:
Environment:
ios Environment:
Xcode 12.4 Build version 12D4e
Project Setting Files:
<?xml version='1.0' encoding='utf-8'?> <widget id="XXXXXXX" version="0.0.0.0" defaultlocale="en-US" android-packageName="XXXXXXX" android-versionCode="000000000" ios-CFBundleIdentifier="XXXXXX" windows-packageVersion="000000" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0" xmlns:vs="http://schemas.microsoft.com/appx/2014/htmlapps">
--- Start of Cordova JSON Snippet --- { "platforms": [ "android", "windows", "ios" ], "plugins": { "cordova-plugin-appavailability": {}, "cordova-plugin-file": {}, "cordova-plugin-globalization": {}, "cordova-plugin-insomnia": {}, "cordova-plugin-ios-non-exempt-encryption": {}, "cordova-plugin-sim": {}, "cordova-plugin-dialogs": {}, "cordova-plugin-device": {}, "cordova-plugin-inappbrowser": {}, "cordova-plugin-media": { "KEEP_AVAUDIOSESSION_ALWAYS_ACTIVE": "NO" }, "cordova-plugin-network-information": {}, "cordova-plugin-splashscreen": {}, "cordova-plugin-statusbar": {}, "cordova-plugin-geolocation": { "GPS_REQUIRED": "true", "LOCATION_ALWAYS_USAGE_DESCRIPTION": "This app wants to get your location always, even when this app runs in background." }, "cordova-plugin-googlemaps": { "PLAY_SERVICES_VERSION": "16.0.1", "ANDROID_SUPPORT_V4_VERSION": "27.+", "GPS_REQUIRED": "true", "LOCATION_WHEN_IN_USE_DESCRIPTION": "This app wants to get your location while this app runs only.", "LOCATION_ALWAYS_USAGE_DESCRIPTION": "This app wants to get your location always, even this app runs in background." }, "cordova-plugin-wkwebview-file-xhr": {}, "cordova-plugin-whitelist": {}, "@havesource/cordova-plugin-push": { "IOS_FIREBASE_MESSAGING_VERSION": "~> 6.32.2" } } } --- End of Cordova JSON Snippet ---