Closed limoli closed 6 years ago
I expect that the method hasPermission() triggers the popup on iOS to allow that permission.
It seems that the permission is already granted, indeed the promise returns a granted value set to true.
However, the method open() throws the following exception:
ERROR: Exception opening email composer {"code":1,"message":"NOT_FOUND_ERR"}
To test I am using a real device:
this.emailComposer.hasPermission().then((granted: boolean) => { if (granted) { this.contactSupportViaEmail(); } else { Logger.WriteError("Email composer has no permissions."); } }).catch(err => { Logger.WriteError("Exception requesting mail permission", JSON.stringify(err)); }); async contactSupportViaEmail() { try { const email = { to: this.invoice.issuer.email, subject: 'Information about invoice', body: 'Generated by mInvoice', isHtml: true }; await this.emailComposer.open(email); } catch (err) { Logger.WriteError("Exception opening email composer", JSON.stringify(err)); } }
Expected behaviour
I expect that the method hasPermission() triggers the popup on iOS to allow that permission.
What happens
It seems that the permission is already granted, indeed the promise returns a granted value set to true.
However, the method open() throws the following exception:
ERROR: Exception opening email composer {"code":1,"message":"NOT_FOUND_ERR"}
Device
To test I am using a real device:
Code