couchbase-lite-ios
couchbase-lite-ios copied to clipboard
Swift Package Manager version of CouchbaseLiteSwift 3.1.3 crashes on `MutableDocument()`
When using CouchbaseLiteSwift 3.1.3 via SPM, there's a crash in litecore::LogLevel as soon as instantiating a MutableDocument. Xcode 15 on macOS Sonoma:
import CouchbaseLiteSwift
let doc = MutableDocument(id: "abc") // < crash
Attaching simple SPM test project. Open, let it resolve the dependencies, hit COMMAND + U to run the unit test and it crashes.
Seem like you have found a crack in the code that didn't use log before intializing log compontents. Currently we intializing log comment in the static intializer of the Database class as we assume that when using Couchbase Lite, Database will need to be first created. Therea are a few classes that can be used without accessing the Database first and MutableDocument is one of them. A workaround now is may be create a database first before using MutableDocument.
That works indeed, thanks!
I've created https://issues.couchbase.com/browse/CBL-5221 to track this