# AvMessagingSdk

## ❗️ **NEW:** Supporting Multiple Versions

The loader script now supports version pinning.

If you would like to also support version pinning, you will need to host multiple versions of the AvMessagingSdk Web Messenger on your CDN. To do so, simply add the new versions next to the existing ones inside your CDN folder, instead of overwriting your folder.

It is **exceptionally** important to host at the very least a version of your previous major version next to the new one in order not to break your customers' integrations. Asides from that case, it is up to you to support as many or as few versions as you would like, and communicate the supported versions to your customers.

## Deployment

1. Put all files from the `cdnPackage` folder at the root of the storage behind `https://placeholder.public.path/`.
2. If your storage is behind a CDN, make sure to issue a cache invalidation for `https://placeholder.public.path/loader.json`.
3. Make sure your [server allows CORS requests](https://enable-cors.org/server.html).
4. Use the instructions in `docs/README.md` to test your deployment.

## Documentation

Distribute `docs/README.md` to your users as this document contains everything needed to explain how to initialize and use the Web Messenger.
