Sally-Assistant / azure_notification_hubs

Flutter support for using Azure Push Notifications in iOS apps.
https://sally-assistant.com/
BSD 3-Clause "New" or "Revised" License
3 stars 1 forks source link

Introduction

Azure Notification Hubs provide an easy-to-use and scaled-out push engine that allows you to send notifications to any platform (iOS, Android, Windows, Kindle, Baidu, etc.) from any backend (cloud or on-premises). Push notifications is a form of app-to-user communication where users of mobile apps are notified of certain desired information, usually in a pop-up or dialog box on a mobile device.

This plugin allows Flutter developers to extend their apps with Azure Notification Hub functionality. For this plugin to work, one must setup a Notification Hub within Azure and add the necessary capabilities within the project.

Currently, this plugin only functions for iOS. Android support is planned.

Getting started

Installation

To install this plugin, add azure_notification_hubs as a dependency in your pubspec.yaml file.

Setup a Notification Hub

Refer to https://docs.microsoft.com/en-us/azure/notification-hubs/notification-hubs-ios-push-notifications-swift-apps-get-started to create your own Azure Notification Hub.

Add capabilities in your project

In XCode, find your target's Signing & Capabilities tab. Add Push Notifications and Background Modes. Additionally, in the Background Modes capability, check Background fetch and Remote notifications.

Usage

Push Notifications only work on a physical device, the simulator will not suffice!

Example

To run the example, first clone the repo

git clone https://github.com/Sally-Assistant/azure_notification_hubs.git

Then you must set the NHInfoConnectionString and NHInfoHubName according to the data in your Notification Hub.

Push Notifications only work on a physical device, the simulator will not suffice!

Contribute