Skip to content

Commit e28f30c

Browse files
committed
Swift 5
- Passed through project language version setting to framework & unit test targets - Bumped version to 0.11.6 in documentation & pod spec - Fixed build warnings in unit test code for Swift 5
1 parent 93f5568 commit e28f30c

File tree

5 files changed

+20
-46
lines changed

5 files changed

+20
-46
lines changed

Documentation/Index.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@
6767

6868
## Installation
6969

70-
> _Note:_ SQLite.swift requires Swift 4.1 (and
71-
> [Xcode 9.3](https://developer.apple.com/xcode/downloads/)) or greater.
70+
> _Note:_ SQLite.swift requires Swift 5 (and
71+
> [Xcode 10.2](https://developer.apple.com/xcode/downloads/)) or greater.
7272
7373

7474
### Carthage
@@ -80,7 +80,7 @@ install SQLite.swift with Carthage:
8080
2. Update your Cartfile to include the following:
8181

8282
```ruby
83-
github "stephencelis/SQLite.swift" ~> 0.11.5
83+
github "stephencelis/SQLite.swift" ~> 0.11.6
8484
```
8585

8686
3. Run `carthage update` and [add the appropriate framework][Carthage Usage].
@@ -110,7 +110,7 @@ install SQLite.swift with Carthage:
110110
use_frameworks!
111111
112112
target 'YourAppTargetName' do
113-
pod 'SQLite.swift', '~> 0.11.5'
113+
pod 'SQLite.swift', '~> 0.11.6'
114114
end
115115
```
116116

@@ -124,7 +124,7 @@ with the OS you can require the `standalone` subspec:
124124

125125
```ruby
126126
target 'YourAppTargetName' do
127-
pod 'SQLite.swift/standalone', '~> 0.11.5'
127+
pod 'SQLite.swift/standalone', '~> 0.11.6'
128128
end
129129
```
130130

@@ -134,7 +134,7 @@ dependency to sqlite3 or one of its subspecs:
134134

135135
```ruby
136136
target 'YourAppTargetName' do
137-
pod 'SQLite.swift/standalone', '~> 0.11.5'
137+
pod 'SQLite.swift/standalone', '~> 0.11.6'
138138
pod 'sqlite3/fts5', '= 3.15.0' # SQLite 3.15.0 with FTS5 enabled
139139
end
140140
```
@@ -148,7 +148,7 @@ If you want to use [SQLCipher][] with SQLite.swift you can require the
148148

149149
```ruby
150150
target 'YourAppTargetName' do
151-
pod 'SQLite.swift/SQLCipher', '~> 0.11.5'
151+
pod 'SQLite.swift/SQLCipher', '~> 0.11.6'
152152
end
153153
```
154154

@@ -181,7 +181,7 @@ applications.
181181

182182
```swift
183183
dependencies: [
184-
.package(url: "https://github.com/stephencelis/SQLite.swift.git", from: "0.11.5")
184+
.package(url: "https://github.com/stephencelis/SQLite.swift.git", from: "0.11.6")
185185
]
186186
```
187187

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SQLite.swift
22

3-
[![Build Status][TravisBadge]][TravisLink] [![CocoaPods Version][CocoaPodsVersionBadge]][CocoaPodsVersionLink] [![Swift4 compatible][Swift4Badge]][Swift4Link] [![Platform][PlatformBadge]][PlatformLink] [![Carthage compatible][CartagheBadge]][CarthageLink] [![Join the chat at https://gitter.im/stephencelis/SQLite.swift][GitterBadge]][GitterLink]
3+
[![Build Status][TravisBadge]][TravisLink] [![CocoaPods Version][CocoaPodsVersionBadge]][CocoaPodsVersionLink] [![Swift5 compatible][Swift5Badge]][Swift5Link] [![Platform][PlatformBadge]][PlatformLink] [![Carthage compatible][CartagheBadge]][CarthageLink] [![Join the chat at https://gitter.im/stephencelis/SQLite.swift][GitterBadge]][GitterLink]
44

55
A type-safe, [Swift][]-language layer over [SQLite3][].
66

@@ -112,7 +112,7 @@ and the [companion repository][SQLiteDataAccessLayer2].
112112

113113
## Installation
114114

115-
> _Note:_ SQLite.swift requires Swift 4.1 (and [Xcode][] 9.3).
115+
> _Note:_ SQLite.swift requires Swift 5 (and [Xcode][] 10.2).
116116
117117
### Carthage
118118

@@ -124,7 +124,7 @@ install SQLite.swift with Carthage:
124124
2. Update your Cartfile to include the following:
125125

126126
```ruby
127-
github "stephencelis/SQLite.swift" ~> 0.11.5
127+
github "stephencelis/SQLite.swift" ~> 0.11.6
128128
```
129129

130130
3. Run `carthage update` and
@@ -156,7 +156,7 @@ SQLite.swift with CocoaPods:
156156
use_frameworks!
157157
158158
target 'YourAppTargetName' do
159-
pod 'SQLite.swift', '~> 0.11.5'
159+
pod 'SQLite.swift', '~> 0.11.6'
160160
end
161161
```
162162

@@ -174,7 +174,7 @@ Swift code.
174174

175175
```swift
176176
dependencies: [
177-
.package(url: "https://github.com/stephencelis/SQLite.swift.git", from: "0.11.5")
177+
.package(url: "https://github.com/stephencelis/SQLite.swift.git", from: "0.11.6")
178178
]
179179
```
180180

SQLite.swift.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "SQLite.swift"
3-
s.version = "0.11.5"
3+
s.version = "0.11.6"
44
s.summary = "A type-safe, Swift-language layer over SQLite3 for iOS and OS X."
55

66
s.description = <<-DESC
@@ -21,7 +21,7 @@ Pod::Spec.new do |s|
2121
s.watchos.deployment_target = "2.2"
2222
s.default_subspec = 'standard'
2323
s.pod_target_xcconfig = {
24-
'SWIFT_VERSION' => '4.2',
24+
'SWIFT_VERSION' => '5',
2525
}
2626

2727
s.subspec 'standard' do |ss|

SQLite.xcodeproj/project.pbxproj

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@
700700
};
701701
EE247ADC1C3F04ED00AE3E12 = {
702702
CreatedOnToolsVersion = 7.2;
703-
LastSwiftMigration = 0900;
703+
LastSwiftMigration = 1020;
704704
};
705705
EE247B3B1C3F3ED000AE3E12 = {
706706
CreatedOnToolsVersion = 7.2;
@@ -1033,8 +1033,6 @@
10331033
PRODUCT_NAME = SQLite;
10341034
SDKROOT = appletvos;
10351035
SKIP_INSTALL = YES;
1036-
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
1037-
SWIFT_VERSION = 4.2;
10381036
TVOS_DEPLOYMENT_TARGET = 9.1;
10391037
};
10401038
name = Debug;
@@ -1055,8 +1053,6 @@
10551053
PRODUCT_NAME = SQLite;
10561054
SDKROOT = appletvos;
10571055
SKIP_INSTALL = YES;
1058-
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
1059-
SWIFT_VERSION = 4.2;
10601056
TVOS_DEPLOYMENT_TARGET = 9.1;
10611057
};
10621058
name = Release;
@@ -1069,8 +1065,6 @@
10691065
PRODUCT_BUNDLE_IDENTIFIER = com.stephencelis.SQLiteTests;
10701066
PRODUCT_NAME = "$(TARGET_NAME)";
10711067
SDKROOT = appletvos;
1072-
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
1073-
SWIFT_VERSION = 4.2;
10741068
TVOS_DEPLOYMENT_TARGET = 9.1;
10751069
};
10761070
name = Debug;
@@ -1083,8 +1077,6 @@
10831077
PRODUCT_BUNDLE_IDENTIFIER = com.stephencelis.SQLiteTests;
10841078
PRODUCT_NAME = "$(TARGET_NAME)";
10851079
SDKROOT = appletvos;
1086-
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
1087-
SWIFT_VERSION = 4.2;
10881080
TVOS_DEPLOYMENT_TARGET = 9.1;
10891081
};
10901082
name = Release;
@@ -1106,8 +1098,6 @@
11061098
PRODUCT_NAME = SQLite;
11071099
SDKROOT = watchos;
11081100
SKIP_INSTALL = YES;
1109-
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
1110-
SWIFT_VERSION = 4.2;
11111101
TARGETED_DEVICE_FAMILY = 4;
11121102
WATCHOS_DEPLOYMENT_TARGET = 2.2;
11131103
};
@@ -1130,8 +1120,6 @@
11301120
PRODUCT_NAME = SQLite;
11311121
SDKROOT = watchos;
11321122
SKIP_INSTALL = YES;
1133-
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
1134-
SWIFT_VERSION = 4.2;
11351123
TARGETED_DEVICE_FAMILY = 4;
11361124
WATCHOS_DEPLOYMENT_TARGET = 2.2;
11371125
};
@@ -1192,6 +1180,7 @@
11921180
PRODUCT_NAME = "";
11931181
SDKROOT = iphoneos;
11941182
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
1183+
SWIFT_VERSION = 5.0;
11951184
TARGETED_DEVICE_FAMILY = "1,2,3";
11961185
VERSIONING_SYSTEM = "apple-generic";
11971186
VERSION_INFO_PREFIX = "";
@@ -1246,6 +1235,7 @@
12461235
PRODUCT_NAME = "";
12471236
SDKROOT = iphoneos;
12481237
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
1238+
SWIFT_VERSION = 5.0;
12491239
TARGETED_DEVICE_FAMILY = "1,2,3";
12501240
VALIDATE_PRODUCT = YES;
12511241
VERSIONING_SYSTEM = "apple-generic";
@@ -1271,8 +1261,6 @@
12711261
PRODUCT_NAME = SQLite;
12721262
SKIP_INSTALL = YES;
12731263
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
1274-
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
1275-
SWIFT_VERSION = 5.0;
12761264
};
12771265
name = Debug;
12781266
};
@@ -1293,8 +1281,6 @@
12931281
PRODUCT_BUNDLE_IDENTIFIER = com.stephencelis.SQLite;
12941282
PRODUCT_NAME = SQLite;
12951283
SKIP_INSTALL = YES;
1296-
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
1297-
SWIFT_VERSION = 5.0;
12981284
};
12991285
name = Release;
13001286
};
@@ -1306,8 +1292,6 @@
13061292
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
13071293
PRODUCT_BUNDLE_IDENTIFIER = com.stephencelis.SQLiteTests;
13081294
PRODUCT_NAME = "$(TARGET_NAME)";
1309-
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
1310-
SWIFT_VERSION = 4.2;
13111295
};
13121296
name = Debug;
13131297
};
@@ -1319,8 +1303,6 @@
13191303
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
13201304
PRODUCT_BUNDLE_IDENTIFIER = com.stephencelis.SQLiteTests;
13211305
PRODUCT_NAME = "$(TARGET_NAME)";
1322-
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
1323-
SWIFT_VERSION = 4.2;
13241306
};
13251307
name = Release;
13261308
};
@@ -1344,8 +1326,6 @@
13441326
SDKROOT = macosx;
13451327
SKIP_INSTALL = YES;
13461328
SWIFT_INCLUDE_PATHS = "";
1347-
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
1348-
SWIFT_VERSION = 4.2;
13491329
};
13501330
name = Debug;
13511331
};
@@ -1369,8 +1349,6 @@
13691349
SDKROOT = macosx;
13701350
SKIP_INSTALL = YES;
13711351
SWIFT_INCLUDE_PATHS = "";
1372-
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
1373-
SWIFT_VERSION = 4.2;
13741352
};
13751353
name = Release;
13761354
};
@@ -1385,8 +1363,6 @@
13851363
PRODUCT_BUNDLE_IDENTIFIER = com.stephencelis.SQLiteTests;
13861364
PRODUCT_NAME = "$(TARGET_NAME)";
13871365
SDKROOT = macosx;
1388-
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
1389-
SWIFT_VERSION = 4.2;
13901366
};
13911367
name = Debug;
13921368
};
@@ -1401,8 +1377,6 @@
14011377
PRODUCT_BUNDLE_IDENTIFIER = com.stephencelis.SQLiteTests;
14021378
PRODUCT_NAME = "$(TARGET_NAME)";
14031379
SDKROOT = macosx;
1404-
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
1405-
SWIFT_VERSION = 4.2;
14061380
};
14071381
name = Release;
14081382
};

Tests/SQLiteTests/FoundationTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ import SQLite
33

44
class FoundationTests : XCTestCase {
55
func testDataFromBlob() {
6-
let data = Data(bytes: [1, 2, 3])
6+
let data = Data([1, 2, 3])
77
let blob = data.datatypeValue
88
XCTAssertEqual([1, 2, 3], blob.bytes)
99
}
1010

1111
func testBlobToData() {
1212
let blob = Blob(bytes: [1, 2, 3])
1313
let data = Data.fromDatatypeValue(blob)
14-
XCTAssertEqual(Data(bytes: [1, 2, 3]), data)
14+
XCTAssertEqual(Data([1, 2, 3]), data)
1515
}
1616
}

0 commit comments

Comments
 (0)