brianarpie
brianarpie

Reputation: 364

Request Push Notification Permissions for Cordova iOS and Android?

I'm stuck and would greatly appreciate your help.

Details

I need to request permission from the user to allow push notifications.

How do I do that for Android and iOS, respectively?

I've tried cordova-plugin-firebase, cordova-plugin-firebasex, and phonegap-plugin-push but they aren't working with [email protected] and are overkill for my purposes. I just want to ask for push notification permission, not send notifications directly from the device.

Is there an easy or simple way to do this for iOS and Android with Cordova?

Upvotes: 3

Views: 4868

Answers (1)

Eric
Eric

Reputation: 10626

You could try cordova-plugin-permission

This plugin provides the ability to verify and request grants for Android app permissions.

For iOS, I believe you need to merge your plist to add the permission you request

 <edit-config file="*-Info.plist" mode="merge" target="[THE PERMISSION]">
        <string>[string explaining why you need it]</string>
  </edit-config>

Upvotes: -1

Related Questions