Skip to content
Cheng Liang edited this page Apr 8, 2017 · 2 revisions

SqliteCipherDriverPlugin could be used for iOS since v0.7. BUT this needs some additional actions. Please follow these steps:

  • Open the plugin project with QtCreator, compile it using iOS kit on Mac OS.

  • Use make install command to install plugin.

    This should copy necessary files to installed Qt plugins folder. After this, the file named libsqlitecipher(_debug).a should be copied to %QT_INSTALLED_PATH%/plugins/sqldrivers.

  • Add following code to your app.pro file:

ios {
    CONFIG(debug, debug|release) {
        LIBS += -lsqlitecipher_debug
    } else {
        LIBS += -lsqlitecipher
    }
}

Note if the linker complains could not find sqlitecipher(_debug), please check if the file exists in %QT_INSTALLED_PATH%/plugins/sqldrivers, OR use -L to specify the folder manually. And also noticed, the name just after -l need no prefix or extension name.

  • In your main.cpp, add following code:
#ifdef Q_OS_IOS
#  include <QtPlugin>

Q_IMPORT_PLUGIN(SqliteCipherDriverPlugin)
#endif

Then there you go. If has any problem, please check the code in test project.

Clone this wiki locally