2

I am using Cordova 2.8.1 and am generated application using Terminal.

And i added EmailComposer.h & EmailComposer.m files in Plugins

and EmailComposer.js file in www.

<script type="text/javascript" charset="utf-8" src="EmailComposer.js"></script> 

added in index.html.

In plist file i added key: EmailComposer and value: EmailComposer in Plugins.

And finally in config.xml i added

<feature name="Plugin">
    <param name="ios-package" value="CDVPlugin"/>
</feature>

In button action am calling method

Cordova.exec(null, null, 'EmailComposer','showEmailComposer', ["emailID@gmail.com", "message"])

But am getting error as follows

ERROR: Plugin 'EmailComposer' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml.

-[CDVCommandQueue executePending] [Line 116] FAILED pluginJSON = [
"INVALID",
"EmailComposer",
"showEmailComposer",
[
  "emailID@gmail.com",
  "message"
]
]

Any suggestions for this problem Thanks in advance.

4

1 回答 1

1

在 config.xml 中试试这个:

<feature name="EmailComposer">
      <param name="ios-package" value="EmailComposer"/>
</feature>

第一个“EmailComposer”是这个插件在JS端的名字,第二个“EmailComposer”是这个插件在native(Objective-C)端的类名。

于 2013-07-10T09:15:51.750 回答