@@ -18,26 +18,27 @@ let localCoreExtension: String? = nil
1818// With a local SDK, we point to a `Package.swift` within the Kotlin SDK containing a target pointing
1919// towards a local framework build
2020var conditionalDependencies : [ Package . Dependency ] = [
21- . package (
22- url: " https://github.com/sbooth/CSQLite.git " ,
23- from: " 3.50.4 " ,
24- traits: [
25- . defaults,
26- // CSQLite uses THREADSAFE=0 by default, which breaks PowerSync because we're using SQLite on
27- // multiple threads (it can lead to race conditions when closing connections sharing resources
28- // like shared memory, causing crashes).
29- // THREADSAFE=2 overrides the default, and is safe to use as long as a single SQLite connection
30- // is not shared between threads.
31- // TODO: Technically, we should not use .defaults because there's a logical conflict between
32- // the threadsafe options. Instead, we should spell out all defaults again and remove that
33- // thread-safety option.
34- // However, despite the docs explicitly saying something else, it looks like there's no way to
35- // disable default traits anyway (XCode compiles sqlite3.c with the default option even without
36- // .defaults being included here).
37- " THREADSAFE_2 " ,
38- " ENABLE_SESSION "
39- ]
40- )
21+ // .package(
22+ // url: "https://github.com/sbooth/CSQLite.git",
23+ // from: "3.50.4",
24+ // traits: [
25+ // .defaults,
26+ // // CSQLite uses THREADSAFE=0 by default, which breaks PowerSync because we're using SQLite on
27+ // // multiple threads (it can lead to race conditions when closing connections sharing resources
28+ // // like shared memory, causing crashes).
29+ // // THREADSAFE=2 overrides the default, and is safe to use as long as a single SQLite connection
30+ // // is not shared between threads.
31+ // // TODO: Technically, we should not use .defaults because there's a logical conflict between
32+ // // the threadsafe options. Instead, we should spell out all defaults again and remove that
33+ // // thread-safety option.
34+ // // However, despite the docs explicitly saying something else, it looks like there's no way to
35+ // // disable default traits anyway (XCode compiles sqlite3.c with the default option even without
36+ // // .defaults being included here).
37+ // "THREADSAFE_2",
38+ // "ENABLE_SESSION"
39+ // ]
40+ // )
41+ . package ( url: " https://github.com/sqlcipher/SQLCipher.swift.git " , from: " 4.10.0 " )
4142]
4243var conditionalTargets : [ Target ] = [ ]
4344var kotlinTargetDependency = Target . Dependency. target ( name: " PowerSyncKotlin " )
@@ -108,7 +109,8 @@ let package = Package(
108109 dependencies: [
109110 kotlinTargetDependency,
110111 . product( name: " PowerSyncSQLiteCore " , package : corePackageName) ,
111- . product( name: " CSQLite " , package : " CSQLite " )
112+ // .product(name: "CSQLite", package: "CSQLite")
113+ . product( name: " SQLCipher " , package : " SQLCipher.swift " )
112114 ]
113115 ) ,
114116 . target(
0 commit comments