How to get couchbase file based logs in ios from iPhone?

I have read following code from couchbase document, how can we check those logs in real device?
let tempFolder = NSTemporaryDirectory().appending(“cbllog”)
Database.log.file.config = LogFileConfiguration(directory: tempFolder)
Database.log.file.level = .info

Use the Apple FileManager APIs, like, contentsOfDirectory(URL)

guard let directory = Database.log.file.config?.directory else {
  fatalError("failed to get the config directory")
let url = URL(fileURLWithPath: directory)
let files = try FileManager.default.contentsOfDirectory(at: url, includingPropertiesForKeys: [], options: .skipsSubdirectoryDescendants)
for file in files {
	// print file details

Thank you jayahari, i used this and file not yet available on itunes by putting this Application supports iTunes file sharing to true. but is it fine when we goto appstore review?

Sorry, it is my mistake, it was No, now i turn to Yes and i can able to access files. but is it fine with appstore.

Why do you think its not fine with AppStore? this is a public API from Apple.

No, I am just asking, will apple allow us with this or are they denial with some reasons?

You can check the Software Requirement, Data Collection and Storage, Data Use and Share section of the AppStore guideline, which will give more information on API usage as well as data access.

Thank you. i will do review it.

@jayahari.vavachan How to check vebose inside cbl_verbose_1579064744858.cbllog file . Do we need to use cblite tool or any other tools do we need to use it and check it log trace?

Is there any possibility to access cblite2 database file from iPhone?

Is there any possibility to access cblite2 database file from iPhone?

Of course. The DatabaseConfiguration’s directory property points to the directory the db file is in.

are these below lines, will get the database files too?

Database.log.file.config = LogFileConfiguration(directory: logPath)
Database.log.file.level = .info

No. That’s the LogFileConfiguration. I said DatabaseConfiguration.

Can you please send me the documentation link for DatabaseConfiguration

Got it, Database(name: <#T##String#>, config: <#T##DatabaseConfiguration#>) is it safe to save it into the public access?

What do you mean by “save it into the public access”? What are you trying to do with the database file?

No, just want to access database file from itunes and check the replications. we are facing some issues, like when we update document, that is not failing update to server due to remote rev id not available in local. so we enabled logs but no much informations on verbose.

so if we access database file, we can access much informatino. i feel to enable vebose instead of info level log file, for get more details logs including revisions and other infomations.

Sure. You could create a custom DatabaseConfiguration whose path is the Documents directory, so databases would be accessible in iTunes.

Sure, one last question, with verbose log level, can we trace all the replications between mobile lite from/to server?

Something is always logged, for any replication.

Verbose logging produces more detail, most of which is probably only understandable by people at Couchbase.