Got an iPhone and an Android app with notifications using the firebase plugin. It all works fine on android but I don’t get any notifications on ios. I’ve made sure to tick “Push Notifications” on xcode, but that doesn’t do the trick. What could this be due to? In my ionic root folder I have the GoogleService-Info.plist but it doesn’t automatically copy to the ios folder. Instead I do that manually. I don’t know if this could be the cause of the problem?
Thanks in advance.
EDIT:
I found the solution. For iOs you need to manually ask for permission. I thought this was the default behaviour. Thanks for the help!
if(platform.is('ios')) {
window['FirebasePlugin'].grantPermission();
}
Do you have the GoogleService-Info.plist
file in the your project’s root directory?
Did you also check if you were somehow receiving in the background via Debug Logging?
Yes I do but it doesnt appear in the project when I open it with xcode. I always have to manually copy it to the project. I will try some debugging now.
Have you enabled PushNotification in capabilities ?
Yes I have. It’s easy to forget that one though
I found the solution. For iOs you need to manually ask for permission. I thought this was the default behaviour. Thanks for the help!
if(platform.is('ios')) {
window['FirebasePlugin'].grantPermission();
}
Hello! Could you tell me where did you added this permission grants? Also do you have a documentation on how you’re managing ios push notifications with Firebase? Everything I’ve read is guiding me to ionic cloud services which I think will no longer provide push services. Thanks in advance!
1 Like