File tree Expand file tree Collapse file tree 2 files changed +5
-10
lines changed
Sources/PowerSyncGRDB/Config Expand file tree Collapse file tree 2 files changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,9 @@ 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+ // We can't currently build with GRDB using this package
22+ // We could use traits for this
23+
2124 // .package(
2225 // url: "https://github.com/sbooth/CSQLite.git",
2326 // from: "3.50.4",
@@ -38,6 +41,8 @@ var conditionalDependencies: [Package.Dependency] = [
3841 // "ENABLE_SESSION"
3942 // ]
4043 // )
44+
45+ // Using SQLCipher here since GRDB doesn't compile with CSQLite
4146 . package ( url: " https://github.com/sqlcipher/SQLCipher.swift.git " , from: " 4.10.0 " )
4247]
4348var conditionalTargets : [ Target ] = [ ]
Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ import Foundation
22import GRDB
33import PowerSync
44import SQLite3
5- import SQLCipher
65
76public extension Configuration {
87 /// Configures GRDB to work with PowerSync by registering required extensions and schema sources.
@@ -24,15 +23,6 @@ public extension Configuration {
2423 mutating func configurePowerSync(
2524 schema: Schema
2625 ) {
27-
28- // This is a bit of a hack. We need to initialize CSQLite before we can use it.
29- // This needs to happen before the GRDB pool is created.
30- // Typically the config will be created before the GRDB pool is created, so we need to do this here.
31- let rc = sqlite3_initialize ( )
32- if rc != 0 {
33- fatalError ( " Call to sqlite3_initialize() failed with \( rc) " )
34- }
35-
3626 // Register the PowerSync core extension
3727 prepareDatabase { database in
3828 #if os(watchOS)
You can’t perform that action at this time.
0 commit comments