From fd1376be53dad7bb9c5ecda6d6ca1ec525506d63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Sat, 19 Nov 2016 17:35:49 +0100 Subject: [PATCH] Documentation --- Documentation/CustomSQLiteBuilds.md | 20 +++++++++----------- README.md | 25 ++++++++----------------- 2 files changed, 17 insertions(+), 28 deletions(-) diff --git a/Documentation/CustomSQLiteBuilds.md b/Documentation/CustomSQLiteBuilds.md index 32fdd7f9c..7f4305cbb 100644 --- a/Documentation/CustomSQLiteBuilds.md +++ b/Documentation/CustomSQLiteBuilds.md @@ -11,9 +11,7 @@ GRDB builds SQLite with [swiftlyfalling/SQLiteLib](https://github.com/swiftlyfal **To install GRDB with a custom SQLite build:** -1. Download a copy of the GRDB.swift repository. - -2. Checkout the latest GRDB.swift version and download SQLite sources: +1. Clone the GRDB.swift git repository, checkout the latest tagged version, and download SQLite sources: ```sh cd [GRDB.swift directory] @@ -21,11 +19,11 @@ GRDB builds SQLite with [swiftlyfalling/SQLiteLib](https://github.com/swiftlyfal git submodule update --init SQLiteCustom/src ```` -3. Choose your [extra compilation options](https://www.sqlite.org/compile.html). For example, `SQLITE_ENABLE_FTS5` and `SQLITE_ENABLE_PREUPDATE_HOOK`. +2. Choose your [extra compilation options](https://www.sqlite.org/compile.html). For example, `SQLITE_ENABLE_FTS5` and `SQLITE_ENABLE_PREUPDATE_HOOK`. -4. Create a folder named `GRDBCustomSQLite` somewhere in your project directory. +3. Create a folder named `GRDBCustomSQLite` somewhere in your project directory. -5. Create four files in the `GRDBCustomSQLite` folder: +4. Create four files in the `GRDBCustomSQLite` folder: - `SQLiteLib-USER.xcconfig`: this file sets the extra SQLite compilation flags. @@ -109,13 +107,13 @@ GRDB builds SQLite with [swiftlyfalling/SQLiteLib](https://github.com/swiftlyfal Modify the top of `GRDBCustomSQLite-INSTALL.sh` file so that it contains correct paths. -6. Embed the `GRDB.xcodeproj` project in your own project. +5. Embed the `GRDB.xcodeproj` project in your own project. -7. Add the `GRDBCustomSQLiteOSX` or `GRDBCustomSQLiteiOS` target in the **Target Dependencies** section of the **Build Phases** tab of your **application target**. +6. Add the `GRDBCustomSQLiteOSX` or `GRDBCustomSQLiteiOS` target in the **Target Dependencies** section of the **Build Phases** tab of your **application target**. -8. Add the `GRDBCustomSQLite.framework` from the targetted platform to the **Embedded Binaries** section of the **General** tab of your **application target**. +7. Add the `GRDBCustomSQLite.framework` from the targetted platform to the **Embedded Binaries** section of the **General** tab of your **application target**. -9. Add a Run Script phase for your target in the **Pre-actions** of the **Build** tab of your **application scheme**: +8. Add a Run Script phase for your target in the **Pre-actions** of the **Build** tab of your **application scheme**: ```sh source "${PROJECT_DIR}/GRDBCustomSQLite/GRDBCustomSQLite-INSTALL.sh" @@ -123,7 +121,7 @@ GRDB builds SQLite with [swiftlyfalling/SQLiteLib](https://github.com/swiftlyfal The path should be the path to your `GRDBCustomSQLite-INSTALL.sh` file. -10. Check the "Shared" checkbox of your application scheme (this lets you commit the pre-action in your Version Control System). +9. Check the "Shared" checkbox of your application scheme (this lets you commit the pre-action in your Version Control System). Now you can use GRDB with your custom SQLite build: diff --git a/README.md b/README.md index 5a9014f78..cb5456cf9 100644 --- a/README.md +++ b/README.md @@ -253,20 +253,13 @@ To use GRDB.swift with Carthage: 1. Make sure Xcode is installed in the /Applications folder, with its regular name Xcode. -2. Download a copy of the GRDB.swift repository. +2. [Download](https://github.com/groue/GRDB.swift/releases/tag/v0.90.1) a copy of the GRDB.swift, or clone its repository and make sure you use the latest tagged version with the `git checkout v0.90.1` command. -3. Checkout the latest GRDB.swift version: - - ```sh - cd [GRDB.swift directory] - git checkout v0.90.1 - ```` - -4. Embed the `GRDB.xcodeproj` project in your own project. +3. Embed the `GRDB.xcodeproj` project in your own project. -5. Add the `GRDBOSX`, `GRDBiOS`, or `GRDBWatchOS` target in the **Target Dependencies** section of the **Build Phases** tab of your application target. +4. Add the `GRDBOSX`, `GRDBiOS`, or `GRDBWatchOS` target in the **Target Dependencies** section of the **Build Phases** tab of your application target. -6. Add the `GRDB.framework` from the targetted platform to the **Embedded Binaries** section of the **General** tab of your target. +5. Add the `GRDB.framework` from the targetted platform to the **Embedded Binaries** section of the **General** tab of your target. See [GRDBDemoiOS](DemoApps/GRDBDemoiOS) for an example of such integration. @@ -4301,9 +4294,7 @@ When you create a controller, you can give it a serial dispatch queue. The contr This requires a manual installation of GRDB: -1. Download a copy of the GRDB.swift repository. - -2. Checkout the latest GRDB.swift version and download SQLCipher sources: +1. Clone the GRDB.swift git repository, checkout the latest tagged version, and download SQLCipher sources: ```sh cd [GRDB.swift directory] @@ -4311,11 +4302,11 @@ This requires a manual installation of GRDB: git submodule update --init SQLCipher/src ```` -3. Embed the `GRDB.xcodeproj` project in your own project. +2. Embed the `GRDB.xcodeproj` project in your own project. -4. Add the `GRDBCipherOSX` or `GRDBCipheriOS` target in the **Target Dependencies** section of the **Build Phases** tab of your application target. +3. Add the `GRDBCipherOSX` or `GRDBCipheriOS` target in the **Target Dependencies** section of the **Build Phases** tab of your application target. -5. Add the `GRDBCipher.framework` from the targetted platform to the **Embedded Binaries** section of the **General** tab of your target. +4. Add the `GRDBCipher.framework` from the targetted platform to the **Embedded Binaries** section of the **General** tab of your target. **You create and open an encrypted database** by providing a passphrase to your [database connection](#database-connections):