Skip to content

Releases: activitree/meteor-push

Google Libraries Updates and migrated usage of _ensureIndex to createIndex

09 Oct 12:29
Compare
Choose a tag to compare

Updates

Compatibility with Meteor 2.4+
Migrated usage of _ensureIndex to createIndex

Firebase Admin to 10.0.0
Dropped support for Node 10.
View release notes for Firebase Admin: https://firebase.google.com/support/release-notes/admin/node#10.0.0

Firebase JS SDK to 9.1.3
View release notes for Firebase JS: https://firebase.google.com/support/release-notes/js

Internals:
Separated function for Web Push sending in order to explore a new paradigm. In the past we used to overwrite a web push token for a user and a user would end up getting a notification on the last device subscribed. Now we save all token approved by a user and send to all.
We now do a far better control of tokens and we delete tokens as users log out and get new tokens as they log in. Details and examples in the [...repo...]

Removed deprecated functions for FirebaseJS SDK (this is the component that we use to receive our messages). See the release notes.
Updated the service worker to use the latest Firebase libraries and import only relevant components. (reduce code download size).
The latest Firebase version expects a certain service worker name so we removed the client side registration since Firebase does that instead.

Syntax updates to match the new SDK for Firebase-Admin

Extend the Notification object to include

  • click_action
apns: {
      // https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/sending_notification_requests_to_ 
      apns
           headers: {
        'apns-topic': defaults.topic, // do not remove, required by apns-push-type === 'alert' or 'background' or 'location'
        'apns-priority': mongoNote.priority || defaults.apnsPriority,
        'apns-collapse-id': mongoNote.collapseKey,
        'apns-push-type': mongoNote.apnsPushType || defaults.apnsPushType, // one of ['alert', 'background', 'location', 'voip' ... etc.]
        // IOS makes it truly complicated. When type is 'background', priority must be 5. Check the url for more details.
      },
...
}
payload: {
        aps: {
            // category: 'NEW_MESSAGE_CATEGORY',
         }
}

Extend Push configuration to receive a MongoDB url so it can store Push data separately from Meteor data. A first step in separating concern (Push from Meteor)

Google Libraries Updates

08 Aug 19:28
Compare
Choose a tag to compare

Updates:
firebase-admin to 9.11.0
firebase to 8.8.1

Update the web.js component for web push and implement small changes required by above libraries updates.
When update to a new release please also update your library imports in the web worker for web Puch (e.g. firebase-messaging-sw.js)

Adds compatibility with Meteor 2.3+

11 Jul 04:10
Compare
Choose a tag to compare
2.0.9

Compatibility with Meteor 2.3

2.0.8

15 Sep 11:58
Compare
Choose a tag to compare
  • Update firebase-admin to 9.1.0 (drop support for Node.js < 10
  • Update firebase to 7.17.2
  • include deprecated packages raix:eventstate and raix:eventemitter in activitree:push. Now events NPM is a direct dependency of this package
  • still depend on phonegap-plugin-push which unfortunately has been archived (read only). Evaluate a new updated source for the package (e.g. https://github.com/havesource/cordova-plugin-push/commits/master)
  • remove dependencies on RAIX deprecated packages 'raix:eventstate' and. 'raix:eventemitter'. We now use 'events' NPM (https://www.npmjs.com/package/events)

Firebase Libraries update and PWA Improvements

02 Jun 12:02
cda7da8
Compare
Choose a tag to compare
  • [email protected]
  • [email protected]
  • firebase libraries imported in the service workers also updated to 7.14.5
  • Do not install a service worker in the in-app browser in FB mobile app.
  • Look for a Web Push configuration in the client side (startup) and if found, install /firebase-messaging-sw.js otherwise install /sw.js. These files should be accessible in the public folder.

Reduce the scope of SW registration for Web

17 May 21:31
Compare
Choose a tag to compare

Do not register a SW for the FB in-app browser.
Refresh all tabs if/when a SW is updated.

FCM for IOS, Android and Web, APN for IOS as an option

28 Oct 11:46
2f47457
Compare
Choose a tag to compare
  • Client: register Web/PWA with Firebase and Android/IOS with cordova-push-plugin
  • Server: Unified Node sending API with FCM. Send once to unified message object for all Cordova and Web/PWA.
  • Implements Android messaging standards for Android as per cordova-push-plugin (all keys are in the 'data' object and all keys must be strings).
  • can send to a user, a list of users, token or list of tokens, tokenId (from MongoDB) or list of token ids.
  • options for a single 'global' data object or different data objects per vendor.
  • improve documentation with more 'how to references' and examples

First public version

04 Apr 16:07
Compare
Choose a tag to compare

This version is in production at Activitree. Documentation is a WIP and will hopefully get in shape with help from the community. Under Activitree you may also find a token tester for APN.