Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Latest commit

 

History

History
147 lines (96 loc) · 4.26 KB

RELEASE_NOTES.md

File metadata and controls

147 lines (96 loc) · 4.26 KB

JS-SDK 2.8.0

Note This is the final release of the aerogear-js-sdk. Moving forward there will be several changes.

The following packages are being moved.

  • @aerogear/push will continue to be published but will be found at a new repo.
  • @aerogear/voyager-client will be deprecated in favour of a new package under the Offix project.

The following packages will be deprecated.

  • @aerogear/security will be deprecated
  • @aerogear/app will be deprecated
  • @aerogear/metrics will be deprecated
  • @aerogear/core will be deprecated

Note: version 2.8.0 of these packages will be available on npm, but they will no longer be maintained.

Changes to Sync.

This release updates the version of offix-client within @aerogear/voyager-client to version 0.9.0. Go to the Offix releases page to learn more.

JS-SDK 2.7.0

Push

Support WebPush

  • WebPush Variants in mobile-services.json are now supported
  • Compatible browsers such as Chrome can register for and receive webpush push messages sent from UPS
  • Framework for connecting custom service-workers to notification APIs
  • Permissions for Notifications are handled by JS-SDK

JS-SDK 2.6.3

Push

Support iOS 13

JS-SDK 2.6.2

DataSync

Dependency package updates

JS-SDK 2.6.1

DataSync

Fixed problem with client conflicting with it's own changes

Mobile Security Service

Fixed problem with obtaining service url

JS-SDK 2.6.0

DataSync

Support Apollo 2.6.x

Apollo Client 2.6.x with new typings is now supported.

Extended conflict support

New conflict implementation requires changes on both client and server. On server we have changed conflict detection mechanism to single method. Server side conflict resolution was removed due to the fact that we could not provide reliable diff source without separate store.

Server side implementation:
 const conflictError = conflictHandler.checkForConflict(greeting, args);
      if (conflictError) {
        throw conflictError;
      }
}
Client side implementation:

Client side implementation now requires users to apply returnType to context when performing a mutation. Conflict interface now has an additional method mergeOccured that will be triggered when a conflict was resolved without data loss.

Please refer to documentation for more details.

Breaking changes

Cache Helper Interface

Cache Helper interface now will now accept object instead of individual parameters:

 const updateFunction = getUpdateFunction({
            mutationName,
            idField,
            operationType,
            updateQuery
 });
AuthContext Interface

Refactored the `` interfaces defined in the auth and `sync packages` to accept a map of headers. `token` is no longer required.

Push

Registration:

A bug was fixed with the registration process which made the sdk unable to receive notifications from UPS without using the alias criteria. That problem was fixed and now devices are able to receive notifications using all criteria provided by UPS (variant, alias, category)

The new registration process doesn’t use the phonegap-push-plugin/Ionic Push anymore. Now all the steps needed to receive push notification are handled by the push JS SDK itself.

import { PushRegistration } from "@aerogear/push";

new PushRegistration(new ConfigurationService(config)).register()
.then(() => {
  console.log('Push registration successful');
}).catch((err) => {
  console.error('Push registration unsuccessful ', err);
});

Unregistration:

We have added an unregister method to the SDK to unregister devices from UPS

new PushRegistration(new ConfigurationService(config))
.unregister()
.then(() => {
  console.log('Successfully unregistered');
}).catch((err) => {
  console.error('Error unregistering', err);
});

Handle notification:

We replaced the Cordova/Ionic notification handler APIs with APIs provided by the push JS SDK:

PushRegistration.onMessageReceived((notification: any) => {
  console.log('Received a push notification', notification);
});