[TIMOB-17708] iOS8: Email dialog does not recognize message and recipients
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-09-19T17:59:45.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 3.4.0, Release 3.5.0 |
Components | iOS |
Labels | emaildialog, ios8, kitchensink, qe-manualtest |
Reporter | Jick Steen |
Assignee | Pedro Enrique |
Created | 2014-09-14T09:51:56.000+0000 |
Updated | 2014-11-21T20:23:12.000+0000 |
Description
I did use the search and did not find an issue already so I hope it is not a duplicate.
Running the following code on iOS 8 you will notice that the message and the recipient(s) are not set in the email dialog.
var win = Ti.UI.createWindow({
backgroundColor: '#ccc'
});
var btn = Ti.UI.createButton({
title: 'mail'
});
win.add(btn);
btn.addEventListener('click', function () {
var emailDialog = Ti.UI.createEmailDialog();
emailDialog.setSubject("My Subject");
emailDialog.setToRecipients(['email@example.com']);
emailDialog.setBarColor('#CCCCCC');
emailDialog.setMessageBody('Message');
emailDialog.open();
});
win.open();
The dialog also seems to close automatically after a while but not sure whether it is related to this:
viewServiceDidTerminateWithError: Error Domain=_UIViewServiceInterfaceErrorDomain Code=3 "The operation couldn’t be completed. (_UIViewServiceInterfaceErrorDomain error 3.)" UserInfo=0x7b65c7c0 Message=Service Connection Interrupted
<MFMailComposeRemoteViewController: 0x7ba94400> timed out waiting for fence barrier from com.apple.MailCompositionService
Environment:
* Titanium Command-Line Interface, CLI version 3.4.0-rc2, Titanium SDK version 3.4.0.v20140911135715
* Xcode 6
* Titanium Studio, build: 3.4.0.201409121841
* Alloy 1.5.0 rc
* iPhone 6 Plus simulator but also others are affected
Looks like the iOS 8 simulator does not support the email dialog. Shortly after opening, it closes with an internal error. Field a PR that outputs a comment on the console asking the developer to test on a device. https://github.com/appcelerator/titanium_mobile/pull/6103
Maybe the method "isSupported()" could return "false" as well? I am usually using this method to trigger an alert or the email dialog. Will test it on a device as soon as I have installed iOS 8. Wondering if message and recipients will be displayed there.
Works on an actual iOS 8 device for me
Pedro, we can go ahead and merge this PR.
Backport to 3.4.x https://github.com/appcelerator/titanium_mobile/pull/6131
I sent an email, using above code. Tested environment Mac osx 10.9.5 Mavericks Appcelerator Studio, build: 3.4.0.201409161950 Titanium SDK, build: 3.4.0.v20140919123315 acs@1.0.16 alloy 1.5.0-rc2 install@0.1.7 npm@1.4.23 sudo@1.0.3 titanium 3.4.0-rc4 titanium-code-processor@1.1.1 Xcode6.0.1 (6A317) Devices: iPhone 5S iOS8