我使用 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/