To try Compose for iOS I needed to set `isStatic =...
# squarelibraries
s
To try Compose for iOS I needed to set
isStatic = true
, which results in errors similar to the ones mentioned in this post: https://github.com/cashapp/sqldelight/issues/2512 Can you confirm that right now SQLDelight can't be used in a static XCFramework? Is there explanation why? Does that mean I need to put Compose into a separate XCFramework?
k
If I had to guess (and I'm sure Alec or Jake will correct me) it's because SQLDelight doesn't statically link libsqlite3 itself? My suspicion would stem from sqlite needing to be dynamically linked while the framework is specified as statically linked. Just a stab in the dark so don't take this as gospel!
s
Sounds reasonable 🤔
r
You can make it work in a static or dynamic framework, but you need to link to sqlite differently depending on which you use. For a Kotlin framework which sets
isStatic = true
and includes SQLDelight, try adding
-lsqlite3
to "other linker flags" in Xcode.
KaMPKit probably has some old things it doesn't need in there, but the
-lsqlite3
will let sqldelight work in static frameworks
s
Thank you!