Migrate from previous SDKs
Understand how to migrate from previous SDK files until v1.7.x
Up to Webex Connect version v6.14.0, you could download the JavaScript SDK directly from the Webex Connect UI. Starting from Webex Connect version v6.15.0, the SDK is no longer available through the UI and is now distributed publicly on GitHub as a minified file (webex-connect-sdk.min.js).
If you previously downloaded JavaScript SDK files (up to v1.7.x) from the Webex Connect UI, you need to update your integration process to align with the new GitHub-based distribution. To do this, follow these steps:
- Remove existing JavsScript SDK related files from your project:
- js/aes.js
- js/IMIClient.js
- js/mqttws31.js
- js/jquery.min.js
- js/manifest/manifest_*.json
- sw.js
- Download the JavaScript SDK from JS SDK GITHUB LINK and extract files to a subfolder ‘assets’ within the project.
- Move the service worker file ‘sw.min.js’ to the project root (or a chosen subfolder). You can specify a subfolder if needed as per steps outlined in Manage Assetspage.
- Include dependencies:
<script src="https://code.jquery.com/jquery-1.12.4.js"></script> - For Push Notifications, include Firebase SDK files
- Include supported Firebase SDK files
<script type="text/javascript" src="https://www.gstatic.com/firebasejs/11.1.0/firebase-app-compat.js"></script> <script type="text/javascript" src="https://www.gstatic.com/firebasejs/11.1.0/firebase-messaging-compat.js"></script> - Include manifest.json file.
Download ‘manifest.json’ from https://github.com/firebase/quickstart-js/blob/master/messaging/manifest.json and copy manifest.json into the same ‘assets/manifest/’ folder. Note, do not reference the link itself./assets/manifest/manifest.json
- Include supported Firebase SDK files
- Include JavaScript SDK files in your HTML page:
<script src="assets/js/imi-environments.js"></script>
<script type="text/javascript" src="assets/js/webex-connect-sdk.min.js"></script>
Imi-environments.js file is available from the Downloads section of the Webex Connect UI, refer Create a Mobile App Asset in Webex Connect section for more information.
Updated 4 days ago
