cordova-plugin-email-composer icon indicating copy to clipboard operation
cordova-plugin-email-composer copied to clipboard

EmailComposer.getPlugin.getClients is not a function

Open daxter44 opened this issue 2 years ago • 0 comments

on iOS 16 simulator, where is not installed any email client I got this error when I try to call .hasClient():

TypeError: EmailComposer.getPlugin().getClients() is not a function. (In EmailComposer.getPlugin().getClients(function (apps) { resolve(apps & apps.length>0);})) EmailComposer.getPlugin().getClients() is undefined

Its look like plugin are not installed but i installed it and make sure with npm I -force And also when I run .open method I don't have any errors and nothing happens

My code :

import { EmailComposer } from '@ionic-native/email-composer/ngx';

public openEmailApp(): void { this.emailComposer.hasClient().then((hasClient) => { this.toastService.showGeneralToast('primary', 'Email works'+hasClient); }).catch((error) => {this.toastService.showGeneralToast('primary', error);});

}

daxter44 avatar Jan 16 '23 20:01 daxter44