Cannot initiliaze app - non-Angular issue or XHR / WKWebView Issue?

Description
I’ve got a cordova app (not ionic and not angular - javascript/jquery) and am curious if it’s possible to use the cordova.plugin.zoom plugin with it? I’m able to add the plugin to my project and gotten it to compile, however, when I use cordova.plugins.zoom.initialize(‘app_key’,‘app_secret’) or cordova.zoom.initialize(‘app_key’,‘app_secret’) the xhr-polyfill.js file in the cordova-plugin-wkwebview-file-xhr plugin (used for Apple’s required switch to WkWebView) throws the following error: xhr-polyfill.js - exception delivering event. TypeError: undefined is not an object (evaluating ‘cordova.plugins.zoom.initialize’)

This error occurs during the “load” event of the dispatch. I think the Zoom plugin is successfully sending that dispatch.

I’m curious if this is

  1. An issue because my app is not in Angular? If so, it seems like the cordova plugin code is 95% of the way there to be a more generically accepted plugin. Any thoughts on what that would take?

  2. An issue within xhr / cors due to required switch to WkWebView?

  3. An issue because I’m not initializing the plugin. Because this is not an angular app, I’m not calling

import { Zoom } from '@ionic-native/zoom';

constructor(private zoomService: Zoom) { }

however, in config.xml I’ve added

<feature name="Zoom">
     <param name="ios-package" value="Zoom" />
     <param name="onload" value="true" />
</feature>

Perhaps there is another way to initialize?

Any thoughts would be greatly appreciated. I’ve done quite a bit of googling and searching this forum and trial and error within the code. If at all possible, I’d like to not have to switch to ionic just to add Zoom to our app.

Which version?
4.6.2166-6.603

To Reproduce(If applicable)
see above

Screenshots
not applicable.

Smartphone (please complete the following information):

  • Device: iPhone 11
  • OS: 13.5.1

Additional context
not applicable.

Hi @ajp,

Thanks for using Zoom SDK. As mentioned in the repo: https://github.com/zoom/zoom-sdk-ionic, the Ionic SDK is developed and configured only for the Ionic Angular projects and we have not tested with other environments, such as pure cordova. The Ionic SDK is also using the ionic-native as the bridge wrapper so if this wrapper is missing, then it could run into errors while trying to initialize the SDK.

I will forward this to the engineering team and see if we could decouple the dependency on the Ionic framework in the future.

Thanks!

Thanks! Our timeline is much quicker so we’re going to build an ionic angular app. Your ionic prereqs show “ionic@3”. Will the zoom ionic SDK also work on ionic framework v4 and v5?

Hi @ajp,

Yes, our Ionic SDK sample app is using Ionic 5:https://github.com/zoom/sample-app-ionic/blob/master/package.json

Thanks!