This library wrap cordova plugins api for accessing native API when running in native app.
This library only works when running as a native App(android, ios or windows). You can export a native app from a built production of your projects.
Remember to check the corresponding plugin that your app needs when exporting native apps. Ex. Check to import "Camera" plugin if your app needs to access device camera.
Check if the build is running as a Cordova App before accessing any functions.
if(CG.Base.system.isCordovaApp()) {
CG.Cordova.camera.getPicture(imgData => {
// do something with the image data.
}, error => {
// handle error
});
}