Tutorial by Topics: notification



Local notifications allow your app to notify the user about content which does not require the use of a server.

Unlike remote notifications which are triggered from a server, local notifications are scheduled and triggered within an app. Notifications in general are targeted to increase user interaction with the app, inviting or tempting the user to open and interact with it.

UILocalNotification was deprecated in iOS 10. Use the UserNotifications framework instead.

iOS notifications are a simple and powerful way to send data in a loosely coupled way. That is, the sender of a notification doesn't have to care about who (if anyone) receives the notification, it just posts it out there to the rest of the app and it could be picked up by lots of things or nothing depending on your app's state.

Source : - HACKING with Swift

iOS 10 gave us UserNotifications.framework, the new API for local/remote notifications. It offers viewing media attachments or responding to messages right from the notification.

Notification content consists of: title, subtitle, body and attachment. Attachment can contain images/gifs/videos up to 50 mb.

We can add Push Notification to react native app by using the npm module react-native-push-notification by zo0r. This enables for a cross platform development.

Installation

npm install --save react-native-push-notification

react-native link

Notification channels enable us app developers to group our notifications into groups—channels—with the user having the ability to modify notification settings for the entire channel at once.In Android O this feature is introduced.Right now it is available developers preview.

This can be done using 2 methods with HTTP Post request, With Firebase admin SDK running on your server. Here I will discuss both of them.


Page 1 of 2