This repository has been archived by the owner on Feb 7, 2019. It is now read-only.
Releases: NativeScript/push-plugin
Releases · NativeScript/push-plugin
[DEPRECATION] v1.1.6
Push plugin is now deprecated. Feel free to use the Firebase Plugin for implementing push notifications in your NativeScript app. If you already have an app that use the Push Plugin, read the migrate-to-firebase doc for initial guidance.
v1.1.5
v1.1.4
v1.1.3
fixed: EddyVerbruggen/nativescript-plugin-firebase#660
fixed: #204
v1.1.0 release
New Features
- iOS: updated the plugin platform definitions so it automatically enables the push notifications settings in the Xcode project when building an app. This means that opening the Xcode project to enable the Push Notifications Capability or manually editing
.plist
/.entitlements
files in the platforms directory should no longer be needed. - Android: the push notification callback can now be registered just like the iOS one from the registration settings object using
notificationCallbackAndroid
:
const pushSettings = {
// Android settings
senderID: "<ENTER_YOUR_PROJECT_NUMBER>",
notificationCallbackAndroid: (stringifiedData: String, fcmNotification: any) => {
const notificationBody = fcmNotification && fcmNotification.getBody();
this.updateMessage("Message received!\n" + notificationBody + "\n" + stringifiedData);
},
// iOS settings
notificationCallbackIOS: (message: any) => {
this.updateMessage("Message received!\n" + JSON.stringify(message));
}
};
- Android: update Firebase Messaging reference version to 11.8.0
Fixes
- Android: updated demo to remove push notification data from the intent when resuming app. This fixes issue where push notification can be handled more than once if app was in the background.
v1.0.0 release
- Plugin version updated to v1.0.0
- Update documentation with more detailed setup instructions and troubleshooting tips for Android and iOS.
- Fix Android data only FCM notifcations not being handled if app is stopped.
Update plugin for NativeScript 3.4.0 runtime
- add compatibility with 3.4.0 release
- update documentation: more information about running in iOS, Android refresh token function signature
- fix return value of areNotificationsEnabled on Android
- update demo app to show how to read notification data on app resume on Android
Updated android support
This release fixes a number of bugs and includes a breaking change for Android.
Fixes:
- notifications not showing for Android Oreo when the app is not active
- notifications not showing for Android when the app is closed (neither in active, nor in inactive state)
Breaking changes
- Android callback function signature changed - message parameter is removed
// OLD
pushPlugin.onMessageReceived(function callback(message, stringifiedData, fcmNotification) {
var notificationBody = fcmNotification && fcmNotification.getBody();
alert("Message received!\n" + notificationBody + "\n" + stringifiedData);
});
// NEW
pushPlugin.onMessageReceived(function callback(stringifiedData, fcmNotification) {
var notificationBody = fcmNotification && fcmNotification.getBody();
alert("Message received!\n" + notificationBody + "\n" + stringifiedData);
});
Add metadata for NativeScript 3.0
0.1.3 Update package.json for NS 3.0. Adding freshly rebuilt Android aar
0.1.2
Add webpack compatibility per the {N} plugin requirements.