flutter_apns 1.0.0

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 66

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. On iOS, disable firebase method swizzling: https://firebase.google.com/docs/cloud-messaging/ios/client.
  4. Add flutter_apns as a dependency in your pubspec.yaml file.
  5. 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();
connector.configure(
    onLaunch: _onLaunch,
    onResume: _onResume,
    onMessage: _onMessage,
);
connector.requestNotificationPermissions()
  1. Build on device and test your solution using Firebase Console and NWPusher app.

1.0.0 #

  • First release.

example/README.md

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:


dependencies:
  flutter_apns: ^1.0.0

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';
  
Version Uploaded Documentation Archive
1.0.0 Apr 16, 2019 Go to the documentation of flutter_apns 1.0.0 Download flutter_apns 1.0.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
47
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
65
Overall:
Weighted score of the above. [more]
66
Learn more about scoring.

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

  • Dart: 2.3.2
  • pana: 0.12.18
  • Flutter: 1.5.4-hotfix.2

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Maintenance issues and suggestions

Support latest dependencies. (-15 points)

The version constraint in pubspec.yaml does not support the latest published versions for 2 dependencies (1 direct: firebase_messaging).

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.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
firebase_messaging ^4.0.0+3 4.0.0+4 5.0.3
flutter 0.0.0
Transitive dependencies
collection 1.14.11
meta 1.1.6 1.1.7
platform 2.2.0
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test