ben-xD / push

Push notifications in Flutter without firebase_messaging.
https://pub.dev/packages/push
36 stars 22 forks source link

How to iOS APNS only? #61

Open sonjz opened 4 weeks ago

sonjz commented 4 weeks ago

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 commented 4 weeks ago

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 commented 4 weeks ago

Hey @sonjz, I guess you would need to do that, based on https://github.com/flutter/flutter/issues/80374 and https://github.com/flutter/flutter/issues/59657

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

sonjz commented 4 weeks ago

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):