Migrate from previous SDKs from v1.x.x to v1.7.x
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
- To download the JavaScript SDK, go to GitHub page. Download and extract
dist.zip.- Create an
assets/jsfolder in your project. - Copy
webex-connect-sdk.min.jsandimi-environment.jstoassets/js/folder.
- Create an
- Move the service worker file
sw.min.jsto the project root (or a chosen subfolder). You can specify a subfolder if needed as per steps outlined in Managing 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.
Copy the extractedmanifest.jsonfromdist.zipinto the sameassets/manifest/folder./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 20 days ago
