How to find Couchbase Mobile DB file in iOS?

孤人 提交于 2019-12-10 10:42:00

问题


I want to find Couchbase Mobile DB file location in iOS and please also describe how to open db file?

Thanks


回答1:


If you are using CBM 1.4 or earlier, you can locate the location of the cblite2 db file as discussed here

https://developer.couchbase.com/documentation/mobile/1.4/guides/couchbase-lite/native-api/manager/index.html#dude-wheres-my-database-file

To view the database , you can use CouchbaseLiteViewer which is (not officially supported ) Mac application
https://github.com/couchbaselabs/CouchbaseLiteViewer.

You could also use any sqlite browser such as http://sqlitebrowser.org to browse the sqlite content




回答2:


CouchbaseLiteViewer is not updated for checking data in Cblite 2.0 , i waiting for it so as of now following way check Cblite db data and it will work.

Latest solution Couchbase 2.0 db check:

There is a command line tool which I believe is inside the zip file that you download to get Couchbase Lite (look in tools) called "cblite" which is similar to the sqlite command line tool. It can perform operations on a database such as listing documents, querying, etc.

  1. Download Couchbase sdk from the website
  2. It comes with the folder inside this, there is a folder called Tools .

Screenshots for reference :

3.Inside tools cblite is there , just launch it . now suppose i have cblite db .

Use following way to query and this tools provide you comannd terminal way to search data/document :

I tried this and it works 👍

shobhakar$ ./cblite /Downloads/mobile-travel-sample-master/ios/TravelSample/TravelSample/prebuilt/travel-sample.cblite2 Opened database /Downloads/mobile-travel-sample-master/ios/TravelSample/TravelSample/prebuilt/travel-sample.cblite2/

This is the current solution and this is awesome.

Reference link : https://github.com/couchbase/couchbase-lite-ios/issues/2176#issuecomment-423921463



来源:https://stackoverflow.com/questions/44458198/how-to-find-couchbase-mobile-db-file-in-ios

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!