From ccf339d6efd8c87ebbe1b31fe73cfcc0ff4a3051 Mon Sep 17 00:00:00 2001 From: David Kraus Date: Wed, 6 Mar 2019 14:55:11 +0100 Subject: [PATCH] improve fts5 documentation --- README.md | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 307a41f00..833de6be6 100644 --- a/README.md +++ b/README.md @@ -5074,13 +5074,23 @@ let documents = try Document.filter(Column("content").match(pattern)).fetchAll(d When the FTS3 and FTS4 full-text engines don't suit your needs, you may want to use FTS5. See [Choosing the Full-Text Engine](#choosing-the-full-text-engine) to help you make a decision. The version of SQLite that ships with iOS, macOS and watchOS does not always support the FTS5 engine. To enable FTS5 support, you'll need to install GRDB with one of those installation techniques: - -1. Use the GRDBPlus CocoaPod. It uses the system SQLite, and requires iOS 11.4+ / macOS 10.13+ / watchOS 4.3+: - + +1. Use a custom compilation option. It uses the system SQLite and requires iOS 11.4+ / macOS 10.13+ / watchOS 4.3+: + ```ruby - pod 'GRDBPlus' + platform :ios, '11.4' # or above + + post_install do |installer| + installer.pods_project.targets.select { |target| target.name == "GRDB.swift" }.each do |target| + target.build_configurations.each do |config| + config.build_settings['OTHER_SWIFT_FLAGS'] = "$(inherited) -D SQLITE_ENABLE_FTS5" + end + end + end ``` +> :point_up: **Note**: make sure you use the right platform version! GRDB can't protect you here and you will get runtime errors on devices with a lower version. + 2. Use the GRDBCipher CocoaPod. It uses SQLCipher (see [encryption](#encryption)), and requires iOS 8.0+ / macOS 10.9+ / watchOS 2.0+: ```ruby