devbean / QtCipherSqlitePlugin

A Qt plugin for cipher SQLite.
http://qtciphersqliteplugin.galaxyworld.org
GNU Lesser General Public License v2.1
380 stars 155 forks source link

iOS error #9

Closed angeluslove closed 7 years ago

angeluslove commented 7 years ago

install -m 644 -p libsqlitecipher.a /Users/angeluslove/Qt5.8.0/5.8/ios/plugins/sqldrivers/libsqlitecipher.a /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib -s /Users/angeluslove/Qt5.8.0/5.8/ios/plugins/sqldrivers/libsqlitecipher.a

but :

Starting remote process. ("QSQLITE") QSqlDatabase: SQLITECIPHER driver not loaded QSqlDatabase: available drivers: QSQLITE Can not open connection: "Driver not loaded" exited with exit code -1, Run ended.

devbean commented 7 years ago

Yes, I have noticed this problem and I'm working on it now. But I'm not so familiar with Qt plugins on iOS so it's a bit slow. I think this might because the plugin should be compiled with static link but not sure. If you found any solution, please let me know. Thank you!

angeluslove commented 7 years ago

Normal compilation libsqlitecipher.a

you app.pro add
ios:LIBS += -L$$PWD/ -lsqlitecipher. //Compiled libsqlitecipher.a directory address

you main.cpp add

include \<QtPlugin>

Q_IMPORT_PLUGIN(SqliteCipherDriverPlugin)

iOS test Output results: ("SQLITECIPHER", "QSQLITE")

1 : "AAA" 2 : "BBB" 3 : "CCC" 4 : "DDD" 5 : "EEE" 6 : "FFF" 7 : "GGG"


1 : "ZZZ" 2 : "BBB" 3 : "CCC" 4 : "DDD" 5 : "EEE" 6 : "FFF" 7 : "GGG"


1 : "ZZZ" 2 : "BBB" 3 : "CCC" 5 : "EEE" 6 : "FFF" 7 : "GGG" exited with exit code 0,

devbean commented 7 years ago

Thank you, I think this could do. I'll close this issue and add a wifi page for it. If there is any problem, please reopen it. Thanks again!