fechanique / cordova-plugin-fcm

Google FCM Push Notifications Cordova Plugin
623 stars 997 forks source link

iOS permission dialog #220

Open gassaki opened 7 years ago

gassaki commented 7 years ago

The permission dialog in iOS opens right when the app is launched. Is there a way to ask for permission just when I set it to?

fechanique commented 7 years ago

is not possible by the moment

El 20/1/2017 17:32, "Gabriel Kindermann" notifications@github.com escribió:

The permission dialog in iOS opens right when the app is launched. Is there a way to ask for permission just when I set it to?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/fechanique/cordova-plugin-fcm/issues/220, or mute the thread https://github.com/notifications/unsubscribe-auth/ANXY-wzPyvt_w2_5xYVRST7oLU8oqTsuks5rUOGogaJpZM4Lpfnm .

shi11 commented 7 years ago

Hmm, that's no good from a UX standpoint. I need a solution to suppress it as I control it using the cordova-dialogs plugin

Llermy commented 7 years ago

@shi11 i agree with you, i don't think any user would accept any authorization without an explanation or some info before. So I've added a new function FCMPlugin.ready() that wraps all the code to register for notifications and show the pop-up in iOS. It should be called before setting the notifications with FCMPlugin.onNotification().

I've just done a pull request to add that functionality ;) #254 It would be great if someone with experience in c obj / iOS could review the code, it's my first time writing for iOS. :sweat_smile:

shi11 commented 7 years ago

@Llermy Great work. I reviewed the code and it makes sense but I won't be able to test it at the moment. I ended up implementing the cordova-plugin-firebase plugin

nivaBurleigh commented 6 years ago

Is it possible now to have this functionality without manually changing the ios fcm plugin?