I am using cordova-plugin-firebase with my ionic 2 app. I have configured it for both iOS and Android in the Firebase console. I am using the new .p8 Application Key from Apple. I have enabled push notifications and background notifications in XCode. I have the google info plist in the project. It compiles and runs no problem but I cant send any test notifications to it in the Firebase Console. I believe Firebase itself is working as i show a single active device in the dashboards, but that might be a red herring. really need help on this thanks!
this is first, and primarily, testing using ionic cordova run ios --device. I also tried manually copying the .ipa from the xarchive. as well as just pushing it to prod just because i was going crazy at that point trying to rule things out.
One other thing of note. At least when running ionic cordova run ios --device when i look in settings under notifications, the app doesnt show up in the list as something i can control the notifications on.
I use onesignal for my push notifications, and canāt get those to come through unless Iāve actually packaged through phonegap. Though, Iām at a disadvantage being that I donāt have a Mac and run into cocoa pods issues if I try to package with pro.
But, they also donāt register using Ionic View. so Iām sorry I can offer nothing aside from empathy
Ya i may look at that just again to rule everything out. The only thing is again the firebase plugin itself appears to work. i can see āaā device in the dashboards and i successfully send a token upon app load to my backend. i honestly feel like iām just missing something stupid with configuring things for iOS, but iāve poured through the guides like a million times and cant find what im missing.
I donāt know how it works with plugin-firebase but with phonegap plugin there are 2 types of registration token: FCM and APN, on ios i have to convert apn token to FCM
So i think the plugin-firebase is based on the Firebase SDK which uses method swizzling to convert the tokens. That may be totally off, but that is the impression i got.
Ok yup it was me being an idiot. Apparently there is a method for checking/granting permissions for push notifications for iOS only. I just would have expected that to be in the documents for installing/configuring access rather than having to look at all the individual methods. Oh well. Thanks for the help!
hey guys sorry its been so long. Moved on to a different project. Here is the applicable code in my app.component.ts
platform.ready().then(() => {
// Okay, so the platform is ready and our plugins are available.
// Here you can do any higher level native things you might need.
if(platform.is(āiosā)){
this.firbase.hasPermission().then((data) => {
if(!data.isEnabled){
this.firbase.grantPermission();
}
})
}