ios - Phonegap Plugman iOS - 错误 : Plugin not found

标签 ios xcode cordova

我使用 Plugman 来安装这样的插件:

plugman install --platform iOS --project /Users/User/Documents/Projects/MyProject --plugin https://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen.git

然后 Plugman 说安装成功。

然而,在构建项目时,xCode 输出显示:

CDVPlugin class CDVSplashScreen (pluginName: splash screen) does not exist.

[CDVTimer][splashscreen] 1.785994ms

CDVPlugin class CDVSplashScreen (pluginName: SplashScreen) does not exist.

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

第二个错误可能是因为我试图用 javascript 调用 Splashscreen 插件,但我在项目的两个位置确实有 SplashScreen 文件:

MyProject/cordova/plugins/org.apache.cordova.core.splashscreen/

MyProject/MyProject.xcode/plugins/org.apache.cordova.core.splashscreen/CDVSplashScreen.h 我的项目/MyProject.xcode/plugins/org.apache.cordova.core.splashscreen/CDVSplashScreen.m

因此,MyProject 看起来像这样:

  • 我的项目/cordova
  • 我的项目/CordovaLib
  • 我的项目/我的项目
  • MyProject/SpendToday.xcodeproj
  • 我的项目/www

如果没有同样的问题,我无法安装任何其他插件。有人有什么想法吗?

我正在使用不带 CLI 的 Phonegap 3.0(从 Phonegap 2.4 升级)

最佳答案

在 xcode 中,我导航到 MyProject/MyProject/Plugins

发现

  • /CDVSplashScreen.h
  • /CDVSplashScreen.m
  • /CDVInAppBrowser.h
  • /CDVInAppBrowser.m

就在根部。所以我选择删除(只删除引用),重新添加文件系统中的SplashScreen文件夹。

现在文件夹看起来像这样:

  • /org.apache.cordova.core.splashscreen/CDVSplashScreen.h
  • /org.apache.cordova.core.splashscreen/CDVSplashScreen.m
  • /CDVInAppBrowser.h
  • /CDVInAppBrowser.m

现在 SplashScreen 可以工作了!

关于ios - Phonegap Plugman iOS - 错误 : Plugin not found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18563036/

相关文章:

ios - 使用 React 库时 xcode 中没有这样的文件或目录

javascript - Phonegap 应用程序文本和布局太小

cordova - 显示 Admob 广告\LocalStorage 损坏

xcode - 仅按范围搜索时,UISearchDisplayController 不会重新加载数据

javascript - 如何使用 PhoneGap 保存网页供离线使用?

ios - 为什么核心数据模型 URL (modelURL) 返回为零?

ios - 为什么 UIView 比 Screen 宽

objective-c - 离线生成二维码

ios - Firestore - 查询引用字段

ios - Xcode - clang 失败,退出代码为 1。插件原因?