A SQLCipher-ready version of SQLite.swift.
import SQLiteCipher
let db = try Connection("path/to/db.sqlite3")
try db.key("secret")
Note: SQLiteCipher.swift requires Swift 2 (and Xcode 7) or greater.
Carthage is a simple, decentralized dependency manager for Cocoa. To install SQLiteCipher.swift with Carthage:
-
Make sure Carthage is installed.
-
Update your Cartfile to include the following:
github "stephencelis/SQLiteCipher.swift" "master"
-
Run
carthage update
and add the appropriate framework.
CocoaPods is a dependency manager for Cocoa projects. To install SQLiteCipher.swift with CocoaPods:
-
Make sure CocoaPods is installed. (SQLiteCipher.swift requires version 0.37 or greater.)
-
Update your Podfile to include the following:
use_frameworks! pod 'SQLiteCipher.swift', git: 'https://github.com/stephencelis/SQLiteCipher.swift.git'
-
Run
pod install
.
To install SQLiteCipher.swift as an Xcode sub-project:
-
Drag the SQLiteCipher.xcodeproj file into your own project. (Submodule or clone the project first.)
-
In your target’s General tab, click the + button under Linked Frameworks and Libraries.
-
Select the appropriate SQLiteCipher.framework for your platform.
-
Click Add.
SQLiteCipher.swift is available under the MIT license. See the LICENSE file for more information.