Sqlite.swift: Getting error when using SQLCipher

Created on 22 Nov 2018  路  3Comments  路  Source: stephencelis/SQLite.swift

I added SQLCipher by following the steps given in the documentation, after adding this pod 'SQLite.swift/SQLCipher', '~> 0.11.5' , I followed the steps added key to db

let db = try Connection("path/to/db.sqlite3")
try db.key("secret")

and I compiled the project but I am getting error (error code:21)

[logging] misuse at line 213459 of [2b0954060f]

need guidance to solve the issue

All 3 comments

Hi @hansrajgavali Just wonder if you manage to solve this issue? I have been encountering the same issue.

I had everything wrong in my Podfile.

I had both sqlite.swift and sqlite.swift/sqlcipher, I only needed sqlcipher.

I solved it by deleting the pods and the cache:

pod cache clean
rm -rf Pods
rm Podfile.lock

Then I used the master branch latest commit as of today in my podfile

platform :macos, '10.14'
use_frameworks!

target 'YourAppName' do
    pod 'SQLite.swift/SQLCipher', :git => 'https://github.com/stephencelis/SQLite.swift.git', :commit => 'ed8f603f856e9f1f4adb76b63b7234547257ec5a'
end

Ran pod install and db.key worked.

you should NOT include the commit to indeed have the latest from git
just use :

pod 'SQLite.swift/SQLCipher', :git => 'https://github.com/stephencelis/SQLite.swift.git'

it does fix the problem temporary, but using dev version is not ideal

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bitflying picture bitflying  路  5Comments

WDDong picture WDDong  路  7Comments

DiamondYuan picture DiamondYuan  路  3Comments

justdan0227 picture justdan0227  路  7Comments

arnoldschmid picture arnoldschmid  路  4Comments