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.
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.
- 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
Support iOS 13
Dependency package updates
Fixed problem with client conflicting with it's own changes
Fixed problem with obtaining service url
Apollo Client 2.6.x with new typings is now supported.
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.
const conflictError = conflictHandler.checkForConflict(greeting, args);
if (conflictError) {
throw conflictError;
}
}
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.
Cache Helper interface now will now accept object instead of individual parameters:
const updateFunction = getUpdateFunction({
mutationName,
idField,
operationType,
updateQuery
});
Refactored the `` interfaces defined in the auth
and `sync packages` to accept a map of headers. `token` is no longer required.
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);
});
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);
});
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);
});