Hey there,
Can we bundle our app with our own version of SQLite with extensions that we want. From what I've seen, we aren't allowed to add extensions to the built in IOS SQLite, so would this be the only way to use extensions. I ask this because I want to use the spell fix extension.
I couldn't find a lot of people talking about adding SQLite extensions.
Thank you!
If possible, I would recommend sticking with the system-provided version of SQLite. There are platform-specific enhancements that are not available in the open-source version of SQLite.
For extensions like spellcheck1
, you can build and statically link the extension. (See https://www.sqlite.org/loadext.html Section 6. Statically Linking A Run-Time Loadable Extension)
- Add the spellcheck.c file to your Xcode project and add it to your target.
- In Target Membership, click the edit button and add
-DSQLITE_CORE
in Compiler Flags. - After opening your database (
sqlite3_open_v*
), call the initializer and pass NULL for the db routines). Something likesqlite3_spellfix_init(db, &err, NULL);