我是使用phonegap进行iOS开发的新手,
我尝试使用 sharekit 插件,我按照自述文件(sharekit 2.0)中提到的所有步骤进行操作,但它仍然无法正常工作,我收到以下 3 个错误:
/..path../Plugins/ShareKitPlugin.m:31:63: Use of undeclared identifier 'SHKURLContentTypeWebpage'
/..path../Plugins/ShareKitPlugin.m:85:63: Use of undeclared identifier 'SHKURLContentTypeWebpage'
/..path../Plugins/ShareKitPlugin.m:102:63: Use of undeclared identifier 'SHKURLContentTypeWebpage'
问题是我找不到任何适用于 cordova 2.2.0 的共享包,因为我得出的结论是该插件的旧版本不支持新的 cordova 2.2.0。
有什么建议可以获取最新的插件吗?或者如何修复这些错误?
最佳答案
我在使用phonegap 2.7.0以及存储库中的最新sharekit和sharekitplugin时遇到了同样的问题。在导入语句下方添加此行。它编译并且插件对我有用。我不确定这是否正确。
#import "SHKMail.h"// Add below this statement
char *SHKURLContentTypeWebpage="text/html";
该插件已有 2 年没有更新,因此这可能与新的 Sharekit 不兼容。
关于ios - Cordova 共享包 2.2.0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13679486/