阅读本文PouchDB与Couchbase Lite - 性能评估后,我很高兴尝试运行代码https://github.com/zeMirco/pouchdb-vs-couchbase
该应用程序最初没有运行.我删除了平台并重建:
cordova platform add ios cordova build ios
然后我使用iPad视网膜64位模拟器运行应用程序.我注意到控制台输出了以下内容.
2014-05-30 14:38:08.518 HelloCordova[50407:60b] Multi-tasking -> Device: YES, App: YES 2014-05-30 14:38:08.526 HelloCordova[50407:60b] Unlimited access to network resources 2014-05-30 14:38:08.532 HelloCordova[50407:60b] Started backup to iCloud! Please be careful. Your application might rejected by Apple if you store too much data. For more information please read "iOS Data Storage Guidelines" You could find it at the following address https://developer.apple.com/icloud/documentation/data-storage/ . 2014-05-30 14:38:08.594 HelloCordova[50407:60b] CDVPlugin class CBLite (pluginName: cblite) does not exist. 2014-05-30 14:38:08.594 HelloCordova[50407:60b] [CDVTimer][cblite] 0.567973ms 2014-05-30 14:38:08.595 HelloCordova[50407:60b] [CDVTimer][TotalPluginStartup] 1.537025ms 2014-05-30 14:38:09.162 HelloCordova[50407:60b] Resetting plugins due to page load. 2014-05-30 14:38:09.295 HelloCordova[50407:60b] Finished load of: file:///Users/jshultz/Library/Application%20Support/iPhone%20Simulator/7.1-64/Applications/FDA667F2-50BD-48D0-836C-D42F358F6A3F/HelloCordova.app/www/index.html 2014-05-30 14:38:09.408 HelloCordova[50407:60b] CDVPlugin class CBLite (pluginName: CBLite) does not exist. 2014-05-30 14:38:09.409 HelloCordova[50407:60b] ERROR: Plugin 'CBLite' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml. 2014-05-30 14:38:09.409 HelloCordova[50407:60b] -[CDVCommandQueue executePending] [Line 158] FAILED pluginJSON = [ "CBLite1387911234", "CBLite", "getURL", [ ] ]
我认为加载Couchbase lite插件时出错,我尝试重新安装,而Cordova报告已经安装了.
$ cordova plugin add com.couchbase.lite.phonegap Fetching plugin "com.couchbase.lite.phonegap" via plugin registry Plugin "com.couchbase.lite.phonegap" already installed on ios.
user3750746.. 6
添加行:
到config.xml文件使这个警告消失.显然默认是"云".
看到:
http://cordova.apache.org/docs/en/3.5.0/guide_platforms_ios_config.md.html#iOS%20Configuration
添加行:
<preference name="BackupWebStorage" value="local" />
到config.xml文件使这个警告消失.显然默认是"云".
看到:
http://cordova.apache.org/docs/en/3.5.0/guide_platforms_ios_config.md.html#iOS%20Configuration