Plugin to implement APNS push notifications on iOS and Firebase on Android.
Currently, the only available push notification plugin is
firebase_messaging. This means that, even on iOS, you will need to setup firebase and communicate with Google to send push notification. This plugin solves the problem by providing native APNS implementation while leaving configured Firebase for Android.
flutter_apnsas a dependency in your pubspec.yaml file.
createPushConnector()method, configure push service according to your needs.
FirebaseMessaging, so Firebase samples may be useful during implementation.
import 'package:flutter_apns/apns.dart'; final connector = createPushConnector(); connector.configure( onLaunch: _onLaunch, onResume: _onResume, onMessage: _onMessage, ); connector.requestNotificationPermissions()
Demonstrates how to use the flutter_apns plugin.
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.
Add this to your package's pubspec.yaml file:
dependencies: flutter_apns: ^1.0.0
You can install packages from the command line:
$ flutter pub get
Alternatively, your editor might support
flutter pub get.
Check the docs for your editor to learn more.
Now in your Dart code, you can use:
import 'package:flutter_apns/apns.dart'; import 'package:flutter_apns/apns_connector.dart'; import 'package:flutter_apns/connector.dart'; import 'package:flutter_apns/firebase_connector.dart';
|1.0.0||Apr 16, 2019|
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
We analyzed this package on Jun 17, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
Detected platforms: Flutter
References Flutter, and has no conflicting libraries.
Support latest dependencies. (-15 points)
The version constraint in
pubspec.yaml does not support the latest published versions for 2 dependencies (1 direct:
The package description is too short. (-20 points)
Add more detail to the
description field of
pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.