Comments (13)
Implemented in 1.4.1
from flutter-apns.
Just like @cakkiraz I need to use Firebase Messaging and also I need to use a 3rd party Chat service(ConnectyCube) which will be relying on the APNS token instead of the FCM token. I asked over at Firebase Messaging if they plan on supporting APNS tokens to trigger onMessage but no satisfactory answer yet: [FIREBASE_MESSAGING] iOS: message callbacks do not fire when push notification is sent via APNS token
I, for example, use a chat provider called get-stream for chat, and firebase auth for authentication in my app.
Get-stream delivers chat notification through apns for iOS and through firebase-messaging for android. Thus, to easily integrate with my chat-provider's push notifications, I need both apns and firebase-messaging.
Version 1.4.1 states that;
If you want to use firebase, but not firebase messaging, add this configuration entry in your Info.plist:
flutter_apns.disable_firebase_core
Does this mean we can use Firebase services except Firebase Messaging? As @cemozerr, @ujnamss and @shashikantdurge stated, we need Flutter_Apns working together with Firebase_messaging. Please clarify if the documentation above is misleading, or if I misunderstood version 1.4.1.
+ (void)load {
[self disablePluginNamed:@"FLTFirebaseCorePlugin"];
if ([self shouldDisableFirebaseCore]) {
[self disablePluginNamed:@"FLTFirebaseCorePlugin"];
}
[self disablePluginNamed:@"FLTFirebaseMessagingPlugin"];
[self disablePluginNamed:@"FLTFirebaseMessagingPlugin"];
}
}
What happens if we remove [self disablePluginNamed:@"FLTFirebaseMessagingPlugin"];
from [FlutterApnsSwizzler.m]( [self disablePluginNamed:@"FLTFirebaseMessagingPlugin"];)?
Thanks people.
from flutter-apns.
I believe the issue here is due to the line of code in https://github.com/mwaylabs/flutter-apns/blob/master/ios/Classes/FlutterApnsSwizzler.m#L42:
[self disablePluginNamed:@"FLTFirebaseCorePlugin"];
Not sure why you need to disable the FirebaseCorePlugin, but my app definitely does not load the FirebaseCore plugin afterward (which it needs for firebase auth) and thus simply fails when it needs to call a method from it.
Is this APNS plugin simply not supposed to work on an app that utilizes Firebase Core?
from flutter-apns.
I was able to get notifications in my app working by commenting out the "disable Firebase core plugin line" I mentioned in the comment above and also by commenting out the fatalError
being thrown when the didSwizzle
method returns false here:
https://github.com/mwaylabs/flutter-apns/blob/master/ios/Classes/FlutterApnsPlugin.swift#L22
And yes this is a hack, but I'm running out of ideas. Hopefully, this information will be helpful if there is a bug in flutter_apns
.
from flutter-apns.
Hi, I did not expect people already using firebase on iOS to be interested in this plugin, that's why it disables the core. Your hacks should work though, I may add support for them in the plugin.
For running on device, have you seen https://github.com/mwaylabs/flutter-apns#troubleshooting ?
from flutter-apns.
I am suffering from the same problem :( I was using firebase packages. I need also this package. How can I modify this package to use with firebase?
Thank you...
from flutter-apns.
Sure I will implement something. But I'm curious - why not just use firebase_messaging?
from flutter-apns.
I, for example, use a chat provider called get-stream for chat, and firebase auth for authentication in my app.
Get-stream delivers chat notification through apns for iOS and through firebase-messaging for android. Thus, to easily integrate with my chat-provider's push notifications, I need both apns and firebase-messaging.
from flutter-apns.
I am suffering from the same problem :( I was using firebase packages. I need also this package. How can I modify this package to use with firebase?
Thank you...
Shoot me an email @cakkiraz and I can try to help. ๐ [email protected]
from flutter-apns.
Thank you so much @szotp and @cemozerr. :)
I will send you mail @cemozerr ๐๐ป
from flutter-apns.
Hi @cemozerr & @szotp - I am also encountering the same issue. My use case is almost exactly same as that of @cemozerr. I use the core firebase_messaging for android and want to use flutter_apns to handle iOS. A fix would be super helpful.
@cemozerr - in the mean time am happy to send a note to you directly, if you could help that will be awesome!
from flutter-apns.
Had to switch to other plugin apns_flutter due to this issue. Please resolve it asap
from flutter-apns.
Implemented:
https://github.com/mwaylabs/flutter-apns#enabling-firebasecore
I'll release new version soon.
from flutter-apns.
Related Issues (20)
- onMessage does not get called on iOS HOT 1
- firebase_messaging update to version 13.0.2 HOT 2
- [iOS] onResume callback get called when the app receiving the remote notification in background mode HOT 2
- onBackgroundMessage Is monitoring acceptable๏ผ HOT 4
- how to sv it
- Update dependencies
- firebase_messaging version HOT 2
- Support for Critical Alerts? HOT 1
- Please keep maintaining the apns-only package
- Taking over the package. HOT 7
- "No onBackgroundMessage handler has been registered" after upgrade to 1.5.1 HOT 1
- Can not get result of notification permission prompt on iOS HOT 1
- Gather this is dead now? HOT 1
- Version 1.5.2 on pub.dev seems to have a breaking change HOT 2
- InvalidToken and InvalidRegistration on iOS, token valid on Android HOT 4
- It's not triggered if app is terminated.. HOT 1
- reinstall there is cache HOT 2
- Are VOIP push notifications possible with this library? HOT 1
- firebase_messaging update to version 12.0.0 HOT 3
- flutter_apns will casue error when initializing Firebase HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter-apns.