{"action":"created","issue":{"url":"https://api.github.com/repos/katzer/cordova-plugin-email-composer/issues/130","labels_url":"https://api.github.com/repos/katzer/cordova-plugin-email-composer/issues/130/labels{/name}","comments_url":"https://api.github.com/repos/katzer/cordova-plugin-email-composer/issues/130/comments","events_url":"https://api.github.com/repos/katzer/cordova-plugin-email-composer/issues/130/events","html_url":"https://github.com/katzer/cordova-plugin-email-composer/pull/130","id":103120827,"number":130,"title":"Fix iOS crash when no email is set up, caused by isAvailable falsely returning True","user":{"login":"TylerAldrich","id":1406391,"avatar_url":"https://avatars.githubusercontent.com/u/1406391?v=3","gravatar_id":"","url":"https://api.github.com/users/TylerAldrich","html_url":"https://github.com/TylerAldrich","followers_url":"https://api.github.com/users/TylerAldrich/followers","following_url":"https://api.github.com/users/TylerAldrich/following{/other_user}","gists_url":"https://api.github.com/users/TylerAldrich/gists{/gist_id}","starred_url":"https://api.github.com/users/TylerAldrich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TylerAldrich/subscriptions","organizations_url":"https://api.github.com/users/TylerAldrich/orgs","repos_url":"https://api.github.com/users/TylerAldrich/repos","events_url":"https://api.github.com/users/TylerAldrich/events{/privacy}","received_events_url":"https://api.github.com/users/TylerAldrich/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-25T21:25:45Z","updated_at":"2015-11-17T21:35:53Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/katzer/cordova-plugin-email-composer/pulls/130","html_url":"https://github.com/katzer/cordova-plugin-email-composer/pull/130","diff_url":"https://github.com/katzer/cordova-plugin-email-composer/pull/130.diff","patch_url":"https://github.com/katzer/cordova-plugin-email-composer/pull/130.patch"},"body":"The problem and way the crash occurs can be seen in this issue: https://github.com/katzer/cordova-plugin-email-composer/issues/122\r\n\r\nThis else case hides the fact that canSendMail is FALSE. \r\n\r\ncanSendMail is being set to false, but withScheme is true - There is no reason to OR these two together because the function returns a boolean array with both Bools in it anyways. \r\n\r\nRemoving this else condition makes it so that isAvailable properly returns false and causes no device crashes."},"comment":{"url":"https://api.github.com/repos/katzer/cordova-plugin-email-composer/issues/comments/157515400","html_url":"https://github.com/katzer/cordova-plugin-email-composer/pull/130#issuecomment-157515400","issue_url":"https://api.github.com/repos/katzer/cordova-plugin-email-composer/issues/130","id":157515400,"user":{"login":"batkinson","id":478997,"avatar_url":"https://avatars.githubusercontent.com/u/478997?v=3","gravatar_id":"","url":"https://api.github.com/users/batkinson","html_url":"https://github.com/batkinson","followers_url":"https://api.github.com/users/batkinson/followers","following_url":"https://api.github.com/users/batkinson/following{/other_user}","gists_url":"https://api.github.com/users/batkinson/gists{/gist_id}","starred_url":"https://api.github.com/users/batkinson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/batkinson/subscriptions","organizations_url":"https://api.github.com/users/batkinson/orgs","repos_url":"https://api.github.com/users/batkinson/repos","events_url":"https://api.github.com/users/batkinson/events{/privacy}","received_events_url":"https://api.github.com/users/batkinson/received_events","type":"User","site_admin":false},"created_at":"2015-11-17T21:35:53Z","updated_at":"2015-11-17T21:35:53Z","body":"We're experiencing the exact scenario described in #131. I have built and tested this manually on an iPad mini 2 (ME279LL/A) running iOS 9.1 (13B143) for both failure and success scenarios and the fix appears to work as expected."}}