Closed bijanmmarkes closed 5 years ago
The typical way to use cordova plugin is to directly use the window injection.
To do so, simply you can use (<any>window).VoxeetSDK
for instance. There are various manipulation possible such as the overall declaration using the implicit window import for instance
It's currently unplanned to have support for Ionic framework - maybe in the future, we'll let you know
Describe the bug I am unable to initialize the VoxeetSDK variable when using an Ionic 4 / Angular 7 project. I add the plugin using cordova, but there is no way to import it as VoxeetSDK or Voxeet doesn't seem to exist.
Has anyone initialized this library using ionic 4, is it possible?
Expected Behaviour To be able to import Voxeet using the following Ionic format:
import {Voxeet, UserInfo} from 'cordova-plugin-voxeet'
using the
Const {Voxeet, UserInfo} = VoxeetSDK
is invalid in ionic projects, even if ran after device ready. Also it throws an error when trying to compile since it doesn't actually exist.Ex error message:
The above causes the compilation to fail.
Steps to Reproduce the Problem
Unless I'm missing something, I followed the README exactly but it seems to only be built for raw cordova? Most people are using frameworks like Ionic now-a-days. If ionic 4 is not supported, will it be? If it is supported, is there a different repo, am I doing something wrong?
Minimalistic code (recommended)
Tried many different approaches such as:
import Voxeet from 'cordova-plugin-voxeet/www/Voxeet';
import Voxeet from 'cordova-plugin-voxeet';
import {Voxeet, UserInfo} from 'cordova-plugin-voxeet';
Specifications
Multiple devices and simulators -- Basically won't even compile. Not reachable via developer tools either.
Any advice would help.
Thanks!