Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to iOS APNS only? #61

Open
sonjz opened this issue May 30, 2024 · 4 comments
Open

How to iOS APNS only? #61

sonjz opened this issue May 30, 2024 · 4 comments

Comments

@sonjz
Copy link

sonjz commented May 30, 2024

Hi @ben-xD,

Thank you for having this native solution for iOS APNS, sorry I'm posting in Issues, I didn't see a Discussion section.

We currently have implemented Firebase FCM setup for Android which is finally working with the config, FlutterLocalNotifications, and event handlers, etc.

I'm assuming none of the Firebase portion needs to be part of a iOS native solution.

Is a way to use push where it doesn't handle any Android initialization and just sets up the iOS APNS portion (guessing most of it is turning on native message receiving in Swift and adding custom handlers)

@sonjz
Copy link
Author

sonjz commented May 30, 2024

Just to try answer my own question, would the easiest to be to clone / fork our own version of the push package and remove pubspec.yml > flutter: plugin: platforms: android ? would that cover removing all the android stuff?

image

@ben-xD
Copy link
Owner

ben-xD commented May 31, 2024

Hey @sonjz, I guess you would need to do that, based on flutter/flutter#80374 and flutter/flutter#59657

There is a Flutter PR ready/open with the long term fix for it (flutter/flutter#137040) so you may be able to remove your fork in the future.

@sonjz
Copy link
Author

sonjz commented May 31, 2024

thanks @ben-xD, this would be great, i'd love to turn off firebase's as well except for Android.

here's some finding with the fork, i'll post my fork here for others once i can verify it working and placed some notes (please keep issue open until i can do so):

  • i'm partially way through the fork, and finally got it to compile, so I'll test out integrating it with my app now and see if can i fetch a notification.

  • thanks for the comments on the Federated package dependencies vs Local development dependencies, since i was using a fork locally i had to switch them all out to avoid hitting pub.dev.

  • i did find there was a class conflict for RemoteMessage with Firebase's package:firebase_messaging_platform_interface/firebase_messaging_platform_interface.dart' and Push's package:plugin_platform_interface/plugin_platform_interface.dart. I ended up just refactoring the one in Push with RemoteMessage1` and it seems to compile

@mtkgeek
Copy link

mtkgeek commented Aug 7, 2024

Hi @sonjz did you get this work? I don’t even have an android folder in my project and would love to keep it that way and your iOS only fork would be a life saver.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants