hypery2k / cordova-email-plugin

Edit and send email messages

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

plugin version 1.1.0, version iOS 9, cordova 6.1.1

Jehu opened this issue · comments

i've installed due "cordova plugin add" and now the master branch from a local directory.
The Plugin is not working on iOS (iPhone 6, iOS 9.3.1).

There is no error, just isAvailable returns false.
Callback from cordova.plugins.email.open() returns false too (if i omit the isAvailable-Check).

cannot really reproduce that error, plugin is working fine for me with iOS 9.3 and cordova cli 6.1.1 and cordova iOS 4.1.1

I'm having same problem on 9.3.2. I cannot test in Simulator, as it says it requires a true hardware device. I'm using Cordova CLI version 6.1.1. This plugin works great on Android.

I would be happy to troubleshoot further. Just let me know what to check.

OK, more information for you:
First of all, I had not configured the iOS email account for my email. Instead, I had already installed gmail and was using that to check my emails. So, as soon as I created the gmail account in the iOS accounts section under settings, the app was able to get past the isAvailable() call returning true.

This failure scenario might be a good point to put in the documentation here.

However, now I have two email clients configured on my iPhone and the number of unread messages on the iPhone icon is nearly 13,000 unread (not at all accurate). I know this is not your problem, but iOS is kinda forcing this stupidity on my app now.

So, now my app simply crashes. I finally debug it in XCode and get the following error:

*** Assertion failure in - [MFMailComposeInternalViewController addAttachmentData:mimeType:fileName:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/MessageUI/MessageUI-1637.33/Mail/MFMailComposeInternalViewController.m:746
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[MFMailComposeInternalViewController addAttachmentData:mimeType:fileName:] mimeType must not be nil.'.

So now I shall embark upon figuring out how to set the mime type on the message before sending.

Thank you very much for writing this plugin and contributing to the O.S. community. I find it very useful, and I'm sure that once I have it working, it will make my life easier.

Thank you,

Edward

thanks for the hint. Can you just try to use the released versioned via cordova plugin add cordova-plugin-email and check if this is working?