错误:找不到插件“EmailComposer”,或者不是CDVPlugin。在config.xml中检查插件映射 [英] ERROR: Plugin 'EmailComposer' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml
问题描述
我使用Cordova 2.8.1和使用Terminal生成的应用程序。
我添加了 EmailComposer.h&在插件
和 EmailComposer.js 文件中的EmailComposer.m 。
< script type =text / javascriptcharset =utf-8src =EmailComposer.js> < / script>
已添加到 index.html。
在plist文件中,我在插件中添加了键: EmailComposer和值: EmailComposer。
最后在config.xml中添加
< feature name =Plugin>
< param name =ios-packagevalue =CDVPlugin/>
< / feature>
按钮操作中的调用方法
Cordova.exec(null,null,'EmailComposer','showEmailComposer',[emailID@gmail.com,message])
但出现如下错误
错误:找不到插件EmailComposer,或者不是CDVPlugin。在config.xml中检查插件映射。
- [CDVCommandQueue executePending] [Line 116] FAILED pluginJSON = [
INVALID,
EmailComposer,
showEmailComposer,
[
emailID@gmail.com,
message
]
]
此问题的任何建议
提前感谢。解决方案.xml:
< feature name =EmailComposer>
< param name =ios-packagevalue =EmailComposer/>
< / feature>
第一个EmailComposer是JS插件的名称,第二个EmailComposer是这个插件在native(Objective-C)端的类名。
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.
解决方案Try this in config.xml:
<feature name="EmailComposer"> <param name="ios-package" value="EmailComposer"/> </feature>
The first "EmailComposer" is the name of this plugin in JS side, and the second "EmailComposer" is the class name of this plugin in native(Objective-C) side .
这篇关于错误:找不到插件“EmailComposer”,或者不是CDVPlugin。在config.xml中检查插件映射的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!