Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. SQLiteCipher plugin for iOS/Android. How?
Forum Updated to NodeBB v4.3 + New Features

SQLiteCipher plugin for iOS/Android. How?

Scheduled Pinned Locked Moved Solved Mobile and Embedded
8 Posts 2 Posters 1.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    bogong
    wrote on last edited by
    #1

    Hello all!

    I am using devbean/QtCipherSqlitePlugin. It's working perfectly for desktop. I've got failed on attempts of building for iOS and Android. There are Wiki - I've done everything mentioned. It's not working. What am I missing?

    *.pro

    ios {
    
        LIBS += -L$$PWD/addons/ssl/ios/lib/ -lssl -lcrypto
        INCLUDEPATH += $$PWD/addons/ssl/ios/include
        DEPENDPATH += $$PWD/addons/ssl/ios/include
        PRE_TARGETDEPS += $$PWD/addons/ssl/ios/lib/libssl.a
        PRE_TARGETDEPS += $$PWD/addons/ssl/ios/lib/libcrypto.a
    
        CONFIG(debug, debug|release) {
    	LIBS += -lsqlitecipher_debug
        } else {
    	LIBS += -lsqlitecipher
        }
    }
    
    

    main.cpp

    #ifdef Q_OS_IOS
    #include <QtPlugin>
    Q_IMPORT_PLUGIN(SqliteCipherDriverPlugin)
    #endif
    
    1 Reply Last reply
    0
    • B Offline
      B Offline
      bogong
      wrote on last edited by
      #2

      Found related issue. It's solving building troubles. But it's still not working in iOS/Android. Is there any suggestions of why?

      1 Reply Last reply
      0
      • B Offline
        B Offline
        bogong
        wrote on last edited by
        #3

        Does anyone knows any step-by-step QtSqliteCipherPlugin installation manuals?

        1 Reply Last reply
        0
        • B Offline
          B Offline
          bogong
          wrote on last edited by bogong
          #4

          The diagnosis changed ... The QSqlDatabase::drivers() showing me in log this:

          1554392864465 StartDB() (Database->open()) true
          1554392864524 QSqlDatabase::drivers():  ("SQLITECIPHER", "QSQLITE")
          

          It seems that driver loaded now after previous plugin recompilations, but data not reading/writing only on iOS/Android. Why could it be? On desktop all is reading and writing.

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Hi,

            In the Run part of the Project panel, set the QT_DEBUG_PLUGINS to 1 and run your application. This will give you more information about what is happening.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            B 1 Reply Last reply
            0
            • SGaistS SGaist

              Hi,

              In the Run part of the Project panel, set the QT_DEBUG_PLUGINS to 1 and run your application. This will give you more information about what is happening.

              B Offline
              B Offline
              bogong
              wrote on last edited by
              #6

              @SGaist Already done it yesterday. There are

              QSqlQuery::prepare: database not open
              

              The question why it's happening only on iOS/Android but not on Desktop?

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #7

                Likely because you are trying to open your database somewhere you can't.

                What path are you using ? If using QStandardPaths, then check that the folder you get exists otherwise create it. Why ? Because the value you get comes from the system and is valid however, it's not guaranteed that the folder already exists. That's not a bug.

                If you are not using QStandardPaths then you should start doing it at least for the mobile platforms because they severely restrict where you can write data to.

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                -1
                • B Offline
                  B Offline
                  bogong
                  wrote on last edited by
                  #8

                  It was about OpenSSL. it's not working if there no OpenSSL. Make sure that OpenSSL is working properly in Qt Project.

                  1 Reply Last reply
                  0

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved