Giter Site home page Giter Site logo

Comments (13)

szotp avatar szotp commented on September 6, 2024 1

Implemented in 1.4.1

from flutter-apns.

aytunch avatar aytunch commented on September 6, 2024 1

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.

cemozerr avatar cemozerr commented on September 6, 2024

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.

cemozerr avatar cemozerr commented on September 6, 2024

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.

szotp avatar szotp commented on September 6, 2024

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.

cakkiraz avatar cakkiraz commented on September 6, 2024

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.

szotp avatar szotp commented on September 6, 2024

Sure I will implement something. But I'm curious - why not just use firebase_messaging?

from flutter-apns.

cemozerr avatar cemozerr commented on September 6, 2024

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.

cemozerr avatar cemozerr commented on September 6, 2024

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.

cakkiraz avatar cakkiraz commented on September 6, 2024

Thank you so much @szotp and @cemozerr. :)

I will send you mail @cemozerr ๐Ÿ™๐Ÿป

from flutter-apns.

ujnamss avatar ujnamss commented on September 6, 2024

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.

shashikantdurge avatar shashikantdurge commented on September 6, 2024

Had to switch to other plugin apns_flutter due to this issue. Please resolve it asap

from flutter-apns.

szotp avatar szotp commented on September 6, 2024

Implemented:
https://github.com/mwaylabs/flutter-apns#enabling-firebasecore

I'll release new version soon.

from flutter-apns.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.