From 53535246ef498021659467d31f09fa64594437ae Mon Sep 17 00:00:00 2001 From: Bill Thompson Date: Tue, 30 Apr 2019 16:59:35 -0700 Subject: [PATCH] Dropping Swift 4.2 support (#20) Swift 5.0+ only --- CHANGELOG.md | 21 +++++++++++++++++++++ README.md | 4 ++-- SQift.podspec | 4 ++-- Source/Connection/Functions/Function.swift | 4 ---- Source/Connection/Statement.swift | 6 ------ 5 files changed, 25 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f754fd8..b2cd447 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. `SQift` adheres to [Semantic Versioning](http://semver.org/). +#### 5.x Releases + +- `5.0.x` Releases - [5.0.0](#500) + #### 4.x Releases - `4.1.x` Releases - [4.1.0](#410) @@ -38,12 +42,26 @@ All notable changes to this project will be documented in this file. - `0.1.x` Releases - [0.1.0](#010) --- + +## [5.0.0](https://github.com/Nike-Inc/SQift/releases/tag/5.0.0) + +Release on 2019-04-30. All issues associated with this milestone can be found using this +[filter](https://github.com/Nike-Inc/SQift/milestone/10?closed=1). + +#### Updated + +- Dropped Swift 4.2 support. + - Updated by [William Thompson](https://github.com/eSpecialized) in Pull Request [#19](https://github.com/Nike-Inc/SQift/pull/19). + +--- + ## [4.1.0](https://github.com/Nike-Inc/SQift/releases/tag/4.1.0) Release on 2019-04-30. All issues associated with this milestone can be found using this [filter](https://github.com/Nike-Inc/SQift/milestone/8?closed=1). #### Updated + - To Swift 5 with backwards compatibility to Swift 4.2. - Updated by [William Thompson](https://github.com/eSpecialized) in Pull Request [#18](https://github.com/Nike-Inc/SQift/pull/18). - Deployment targets to watchOS 3.0 and tvOS 10.0 in Xcode project to match podspec. @@ -57,14 +75,17 @@ Release on 2018-11-30. All issues associated with this milestone can be found u [filter](https://github.com/Nike-Inc/SQift/milestone/7?closed=1). #### Added + - Migration Guide for SQift 4 and added it to the README. - Added by [Jereme Claussen](https://github.com/jereme) in Pull Request [#16](https://github.com/Nike-Inc/SQift/pull/16). #### Updated + - Deployment targets to iOS 9.0, Mac OSX 10.11, WatchOS 2.0 and tvOS 9.0. - Updated by [Jereme Claussen](https://github.com/jereme) in Pull Request [#16](https://github.com/Nike-Inc/SQift/pull/16). #### Removed + - `Connection.trace` in favor of `Connection.traceEvent()` - Removed by [Jereme Claussen](https://github.com/jereme) in Pull Request [#16](https://github.com/Nike-Inc/SQift/pull/16). diff --git a/README.md b/README.md index 8598fec..57e80f1 100644 --- a/README.md +++ b/README.md @@ -30,8 +30,8 @@ SQift is a lightweight Swift wrapper for SQLite. ## Requirements - iOS 10.0+, macOS 10.12+, tvOS 10.0+, watchOS 3.0+ -- Xcode 10.0+ -- Swift 4.2+ +- Xcode 10.2+ +- Swift 5.0+ ## Migration Guides diff --git a/SQift.podspec b/SQift.podspec index d6cfee5..79c19a7 100644 --- a/SQift.podspec +++ b/SQift.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "SQift" - s.version = "4.1.0" + s.version = "5.0.0" s.license = "MIT" s.summary = "A lightweight Swift wrapper for SQLite." s.homepage = "https://github.com/Nike-Inc/SQift" @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.source = { :git => "https://github.com/Nike-Inc/SQift.git", :tag => s.version } s.source_files = "Source/**/*.swift" - s.swift_versions = ["4.2", "5.0"] + s.swift_version = "5.0" s.ios.deployment_target = "10.0" s.osx.deployment_target = "10.12" diff --git a/Source/Connection/Functions/Function.swift b/Source/Connection/Functions/Function.swift index 29972a1..c65f07f 100644 --- a/Source/Connection/Functions/Function.swift +++ b/Source/Connection/Functions/Function.swift @@ -361,13 +361,9 @@ extension Connection { sqlite3_result_text64(context, text, UInt64(text.utf8.count), SQLITE_TRANSIENT, UInt8(SQLITE_UTF8)) case .data(var data): - #if swift(<5.0) - data.withUnsafeBytes { sqlite3_result_blob64(context, $0, UInt64(data.count), SQLITE_TRANSIENT) } - #else data.withUnsafeBytes { sqlite3_result_blob64(context, $0.bindMemory(to: UInt8.self).baseAddress, UInt64(data.count), SQLITE_TRANSIENT) } - #endif case .zeroData(let length): sqlite3_result_zeroblob64(context, length) diff --git a/Source/Connection/Statement.swift b/Source/Connection/Statement.swift index ca8ff5a..8de710f 100644 --- a/Source/Connection/Statement.swift +++ b/Source/Connection/Statement.swift @@ -472,15 +472,9 @@ public class Statement { try connection.check(sqlite3_bind_text(handle, index, value, -1, SQLITE_TRANSIENT)) case .blob(let value): - #if swift(<5.0) - try value.withUnsafeBytes { (bytes: UnsafePointer) -> Void in - try connection.check(sqlite3_bind_blob(handle, index, bytes, Int32(value.count), SQLITE_TRANSIENT)) - } - #else try value.withUnsafeBytes { _ = try connection.check(sqlite3_bind_blob(handle, index, $0.bindMemory(to: UInt8.self).baseAddress, Int32(value.count), SQLITE_TRANSIENT)) } - #endif } } }