2013-02-21 36 views
0

您好我正在使用phonegap插件的EmailcomposerWithAttachments插件。我使用Phonegap-2.3.0和ios6模擬器和最新的Xcode。「FAILED pluginJSON」調用EmailComposerwitter時發生錯誤Phonegap-2.3.0插件

我已經放在.M,.h文件在WWW文件夾中的項目和JS文件的Plugins文件夾,並呼籲使用

window.plugins.emailComposer.showEmailComposer("Look at this photo","Take a look at <b>this<b/>:",["[email protected]", "[email protected]"],[],[],true,[]); 

js代碼爲readme.md文件中給出的插件。 https://github.com/phonegap/phonegap-plugins/tree/master/iOS/EmailComposerWithAttachments

當我運行它我收到以下日誌錯誤。

-[CDVCommandQueue executePending] [Line 103] FAILED pluginJSON = ["INVALID","EmailComposer","showEmailComposer",[{"subject":"Look at this photo","bIsHTML":true,"ccRecipients":[],"attachments":[],"bccRecipients":[],"toRecipients":["[email protected]","[email protected]"],"body":"Take a look at <b>this<b/>:"}]] 

請讓我知道我在做什麼錯了。

在config.xml文件中<plugin name="EmailComposer" value="EmailComposer" />我在插件添加此

感謝。

回答

0

看來你的插件已經正確添加了,但是在插件文件中出現了一些錯誤。我想你可能會在xcode中創建另一個項目並編譯以檢查插件中是否存在錯誤。

0

嘗試使用 「」,而不是[]這樣

window.plugins.emailComposer.showEmailComposer(
"Look at this photo", // subject 
"Take a look at <b>this<b/>:", // body 
"[email protected],[email protected]", // toRecipients 
"", // toRecipients 
"", // bccRecipients 
true, // bIsHTML 
); 
代碼

,我們預計字符串單獨然後通過@ 「」

... 
[picker setToRecipients:[ toRecipientsString componentsSeparatedByString:@","]]; 
... 

我希望這有助於