flutter_apns 1.0.3

  • Readme
  • Changelog
  • Example
  • Installing
  • 87

apns #

Plugin to implement APNS push notifications on iOS and Firebase on Android.

Why this plugin was made? #

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.

Usage #

  1. Configure firebase on Android according to instructions: https://pub.dartlang.org/packages/firebase_messaging.
  2. On iOS, make sure you have correctly configured your app to support push notifications, and that you have generated certificate/token for sending pushes.
  3. Add flutter_apns as a dependency in your pubspec.yaml file.
  4. Using createPushConnector() method, configure push service according to your needs. PushConnector closely resembles FirebaseMessaging, so Firebase samples may be useful during implementation.
import 'package:flutter_apns/apns.dart';

final connector = createPushConnector();
    onLaunch: _onLaunch,
    onResume: _onResume,
    onMessage: _onMessage,
  1. Build on device and test your solution using Firebase Console and NWPusher app.

1.0.0 #

  • First release.

1.0.1 #

  • fixed compilation error with newer flutter version
  • implemented method swizzling which will prevent firebase plugin from registering

1.0.2 #

  • fixed compilation error when using dynamic frameworks
  • upgraded dependencies

1.0.3 #

  • added background messaging support oon Android
  • added workaround for flutter 1.7


flutter_apns_example #

Demonstrates how to use the flutter_apns plugin.

Getting Started #

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.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  flutter_apns: ^1.0.3

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

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';
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]
Learn more about scoring.

We analyzed this package on Oct 18, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.1
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.4


Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Maintenance issues and suggestions

Support latest dependencies. (-10 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency (firebase_messaging).


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
firebase_messaging 5.1.5 5.1.5 5.1.6
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.7
platform 2.2.1
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies