问题是,device
还没有准备好,永远不会在之下的ios仿真器。Cordova&Ionic on ios - 设备插件无法正常工作
科尔多瓦的设备插件正确初始化对象device
,但device.ready
总是假,加上各个领域为空。这意味着该插件没有被初始化,并且事件不会被触发,也无法使用$ionicPlatform.ready(...)
方法(正确导入,使用['ionic']
依赖项并使用["$ionicPlatform", function($ionicPlatform)]
注入到控制器中)。
到目前为止,我已经尝试了几次重建,增加了插件几次,ionic prepare
以及更多的东西,但没有任何工作。
在Xcode的输出我得到以下错误:
2016-09-27 11:55:15.738 MyApp[74125:12496643] ERROR: Plugin 'Device' not found, or is not a CDVPlugin. Chech your plugin mapping in config.xml.
2016-09-27 11:55:15.738 MyApp[74125:12496643] -[CDVCommandQueue executePending] [Line 142] FAILED pluginJSON = ["Device330720986", "Device", "getDeviceInfo", []]
2016-09-27 11:55:15.738 MyApp[74125:12496643] ERROR: Plugin 'StatusBar' not found, or is not a CDVPlugin. Chech your plugin mapping in config.xml.
2016-09-27 11:55:15.738 MyApp[74125:12496643] -[CDVCommandQueue executePending] [Line 142] FAILED pluginJSON = ["StatusBar330720987", "StatusBar", "_ready", []]
我怀疑这最后的_ready
有事情做与deviceready
不会被触发。
Android /波纹
在Android下已经过测试,效果很好。在波纹下也给出了很好的回应。
那么,你认为这可能是什么问题?我一直在网络上漫游堆栈溢出和其他地方,我还没有看到任何结果尝试共同的解决方案。
随时问我更多的数据。
呀,不知何故它的工作原理,也发布了'离子钩加ios'加不做'sudo chmod -R 777 *',所以现在工作! – SigmaSoldier