diff --git a/iOS/EmailComposer/EmailComposer.js b/iOS/EmailComposer/EmailComposer.js index 30ee4081..d3c28975 100755 --- a/iOS/EmailComposer/EmailComposer.js +++ b/iOS/EmailComposer/EmailComposer.js @@ -5,11 +5,11 @@ function EmailComposer() { } EmailComposer.ComposeResultType = { - Cancelled:0, - Saved:1, - Sent:2, - Failed:3, - NotSent:4 +Cancelled:0, +Saved:1, +Sent:2, +Failed:3, +NotSent:4 } @@ -30,14 +30,14 @@ EmailComposer.prototype.showEmailComposer = function(subject,body,toRecipients,c args.body = body; if(bIsHTML) args.bIsHTML = bIsHTML; - - Cordova.exec(null, null, "org.apache.cordova.emailComposer", "showEmailComposer", [args]); + + cordova.exec(null, null, "EmailComposer", "showEmailComposer", [args]); } // this will be forever known as the orch-func -jm EmailComposer.prototype.showEmailComposerWithCB = function(cbFunction,subject,body,toRecipients,ccRecipients,bccRecipients,bIsHTML) { - this.resultCallback = cbFunction; - this.showEmailComposer.apply(this,[subject,body,toRecipients,ccRecipients,bccRecipients,bIsHTML]); + this.resultCallback = cbFunction; + this.showEmailComposer.apply(this,[subject,body,toRecipients,ccRecipients,bccRecipients,bIsHTML]); } EmailComposer.prototype._didFinishWithResult = function(res) { @@ -46,10 +46,16 @@ EmailComposer.prototype._didFinishWithResult = function(res) { -Cordova.addConstructor(function() { - if(!window.plugins) - { - window.plugins = {}; - } - window.plugins.emailComposer = new EmailComposer(); -}); \ No newline at end of file +cordova.addConstructor(function() { + if(!window.plugins) + { + window.plugins = {}; + } + + // shim to work in 1.5 and 1.6 + if (!window.Cordova) { + window.Cordova = cordova; + }; + + window.plugins.emailComposer = new EmailComposer(); + }); \ No newline at end of file diff --git a/iOS/EmailComposer/index.html b/iOS/EmailComposer/index.html new file mode 100644 index 00000000..ea038aec --- /dev/null +++ b/iOS/EmailComposer/index.html @@ -0,0 +1,72 @@ + + +
+Don't know how to get started? Check out our Getting Started Guide
+
+