Skip to content

Commit 9ca25c2

Browse files
committed
Updates for Xcode 12.5
* Updates ruby version used by Travis-CI. * Updates Xcode image to 12.5 for Travis-CI. * Removes workaround in run-tests.sh for older simulators. * Updates Carthage toolchain. * Updates Package.swift tool version. * Fixes up SPM build for SQLiteObjc module.
1 parent 70fb7af commit 9ca25c2

File tree

8 files changed

+103
-28
lines changed

8 files changed

+103
-28
lines changed

.travis.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
language: objective-c
2-
rvm: 2.3
2+
rvm: 2.6
33
# https://docs.travis-ci.com/user/reference/osx
4-
osx_image: xcode10.2
4+
osx_image: xcode12.5
55
env:
66
global:
77
- IOS_SIMULATOR="iPhone XS"
8-
- IOS_VERSION="12.2"
8+
- IOS_VERSION="12.4"
99
matrix:
1010
include:
1111
- env: BUILD_SCHEME="SQLite iOS"
@@ -25,7 +25,7 @@ before_install:
2525
- brew update
2626
- brew outdated carthage || brew upgrade carthage
2727
script:
28-
# Workaround for Xcode 10.2/tvOS 9.1 bug
28+
# Workaround for Xcode 10.2/tvOS 9.1 bug (This is an outdated workaround; commenting out.)
2929
# See https://stackoverflow.com/questions/55389080/xcode-10-2-failed-to-run-app-on-simulator-with-ios-10
30-
- sudo mkdir /Library/Developer/CoreSimulator/Profiles/Runtimes/tvOS\ 9.1.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift
30+
# - sudo mkdir /Library/Developer/CoreSimulator/Profiles/Runtimes/tvOS\ 9.1.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift
3131
- ./run-tests.sh

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
0.12.3 (18-05-2021), [diff][diff-0.12.2]
2+
========================================
3+
4+
* Swift 5.3 support.
5+
* Xcode 12.5 support.
6+
* Bumps minimum deployment versions.
7+
* Fixes up Package.swift to build SQLiteObjc module.
8+
19
0.11.6 (xxx), [diff][diff-0.11.6]
210
========================================
311

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
BUILD_TOOL = xcodebuild
22
BUILD_SCHEME = SQLite Mac
33
IOS_SIMULATOR = iPhone XS
4-
IOS_VERSION = 12.2
4+
IOS_VERSION = 12.4
55
ifeq ($(BUILD_SCHEME),SQLite iOS)
66
BUILD_ARGUMENTS = -scheme "$(BUILD_SCHEME)" -destination "platform=iOS Simulator,name=$(IOS_SIMULATOR),OS=$(IOS_VERSION)"
77
else

Package.swift

Lines changed: 38 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,46 @@
1-
// swift-tools-version:4.0
1+
// swift-tools-version:5.3
22
import PackageDescription
33

44
let package = Package(
55
name: "SQLite.swift",
6-
products: [.library(name: "SQLite", targets: ["SQLite"])],
6+
products: [
7+
.library(
8+
name: "SQLite",
9+
targets: ["SQLite"]
10+
)
11+
],
712
targets: [
8-
.target(name: "SQLite", dependencies: ["SQLiteObjc"]),
9-
.target(name: "SQLiteObjc"),
10-
.testTarget(name: "SQLiteTests", dependencies: ["SQLite"], path: "Tests/SQLiteTests")
11-
],
12-
swiftLanguageVersions: [4, 5]
13+
.target(
14+
name: "SQLite",
15+
dependencies: ["SQLiteObjc"],
16+
exclude: [
17+
"Info.plist"
18+
]
19+
),
20+
.target(
21+
name: "SQLiteObjc",
22+
dependencies: [],
23+
exclude: [
24+
"SQLiteObjc.h",
25+
"fts3_tokenizer.h",
26+
"include/README.md"
27+
]
28+
),
29+
.testTarget(
30+
name: "SQLiteTests",
31+
dependencies: [
32+
"SQLite"
33+
],
34+
path: "Tests/SQLiteTests",
35+
exclude: [
36+
"Info.plist"
37+
],
38+
resources: [
39+
.copy("fixtures/encrypted-3.x.sqlite"),
40+
.copy("fixtures/encrypted-4.x.sqlite")
41+
]
42+
)
43+
]
1344
)
1445

1546
#if os(Linux)

SQLite.xcodeproj/project.pbxproj

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@
277277
EE247B911C3F822500AE3E12 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
278278
EE247B921C3F822600AE3E12 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
279279
EE247B931C3F826100AE3E12 /* SQLite.swift.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; path = SQLite.swift.podspec; sourceTree = "<group>"; };
280-
EE91808D1C46E5230038162A /* SQLiteObjc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SQLiteObjc.h; path = ../../SQLiteObjc/include/SQLiteObjc.h; sourceTree = "<group>"; };
280+
EE91808D1C46E5230038162A /* SQLiteObjc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SQLiteObjc.h; path = ../../SQLiteObjc/SQLiteObjc.h; sourceTree = "<group>"; };
281281
EE9180911C46E9D30038162A /* libsqlite3.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libsqlite3.tbd; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/lib/libsqlite3.tbd; sourceTree = DEVELOPER_DIR; };
282282
EE9180931C46EA210038162A /* libsqlite3.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libsqlite3.tbd; path = usr/lib/libsqlite3.tbd; sourceTree = SDKROOT; };
283283
/* End PBXFileReference section */
@@ -1173,8 +1173,8 @@
11731173
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
11741174
GCC_WARN_UNUSED_FUNCTION = YES;
11751175
GCC_WARN_UNUSED_VARIABLE = YES;
1176-
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
1177-
MACOSX_DEPLOYMENT_TARGET = 10.9;
1176+
IPHONEOS_DEPLOYMENT_TARGET = 12.3;
1177+
MACOSX_DEPLOYMENT_TARGET = 10.15;
11781178
MTL_ENABLE_DEBUG_INFO = YES;
11791179
ONLY_ACTIVE_ARCH = YES;
11801180
PRODUCT_NAME = "";
@@ -1229,8 +1229,8 @@
12291229
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
12301230
GCC_WARN_UNUSED_FUNCTION = YES;
12311231
GCC_WARN_UNUSED_VARIABLE = YES;
1232-
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
1233-
MACOSX_DEPLOYMENT_TARGET = 10.9;
1232+
IPHONEOS_DEPLOYMENT_TARGET = 12.3;
1233+
MACOSX_DEPLOYMENT_TARGET = 10.15;
12341234
MTL_ENABLE_DEBUG_INFO = NO;
12351235
PRODUCT_NAME = "";
12361236
SDKROOT = iphoneos;
@@ -1255,7 +1255,6 @@
12551255
DYLIB_INSTALL_NAME_BASE = "@rpath";
12561256
INFOPLIST_FILE = "$(SRCROOT)/Sources/SQLite/Info.plist";
12571257
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
1258-
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
12591258
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
12601259
PRODUCT_BUNDLE_IDENTIFIER = com.stephencelis.SQLite;
12611260
PRODUCT_NAME = SQLite;
@@ -1276,7 +1275,6 @@
12761275
DYLIB_INSTALL_NAME_BASE = "@rpath";
12771276
INFOPLIST_FILE = "$(SRCROOT)/Sources/SQLite/Info.plist";
12781277
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
1279-
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
12801278
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
12811279
PRODUCT_BUNDLE_IDENTIFIER = com.stephencelis.SQLite;
12821280
PRODUCT_NAME = SQLite;
@@ -1288,7 +1286,6 @@
12881286
isa = XCBuildConfiguration;
12891287
buildSettings = {
12901288
INFOPLIST_FILE = Tests/SQLiteTests/Info.plist;
1291-
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
12921289
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
12931290
PRODUCT_BUNDLE_IDENTIFIER = com.stephencelis.SQLiteTests;
12941291
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -1299,7 +1296,6 @@
12991296
isa = XCBuildConfiguration;
13001297
buildSettings = {
13011298
INFOPLIST_FILE = Tests/SQLiteTests/Info.plist;
1302-
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
13031299
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
13041300
PRODUCT_BUNDLE_IDENTIFIER = com.stephencelis.SQLiteTests;
13051301
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -1320,7 +1316,6 @@
13201316
INFOPLIST_FILE = "$(SRCROOT)/Sources/SQLite/Info.plist";
13211317
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
13221318
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
1323-
MACOSX_DEPLOYMENT_TARGET = 10.10;
13241319
PRODUCT_BUNDLE_IDENTIFIER = com.stephencelis.SQLite;
13251320
PRODUCT_NAME = SQLite;
13261321
SDKROOT = macosx;
@@ -1343,7 +1338,6 @@
13431338
INFOPLIST_FILE = "$(SRCROOT)/Sources/SQLite/Info.plist";
13441339
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
13451340
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
1346-
MACOSX_DEPLOYMENT_TARGET = 10.10;
13471341
PRODUCT_BUNDLE_IDENTIFIER = com.stephencelis.SQLite;
13481342
PRODUCT_NAME = SQLite;
13491343
SDKROOT = macosx;
@@ -1359,7 +1353,6 @@
13591353
COMBINE_HIDPI_IMAGES = YES;
13601354
INFOPLIST_FILE = Tests/SQLiteTests/Info.plist;
13611355
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
1362-
MACOSX_DEPLOYMENT_TARGET = 10.10;
13631356
PRODUCT_BUNDLE_IDENTIFIER = com.stephencelis.SQLiteTests;
13641357
PRODUCT_NAME = "$(TARGET_NAME)";
13651358
SDKROOT = macosx;
@@ -1373,7 +1366,6 @@
13731366
COMBINE_HIDPI_IMAGES = YES;
13741367
INFOPLIST_FILE = Tests/SQLiteTests/Info.plist;
13751368
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
1376-
MACOSX_DEPLOYMENT_TARGET = 10.10;
13771369
PRODUCT_BUNDLE_IDENTIFIER = com.stephencelis.SQLiteTests;
13781370
PRODUCT_NAME = "$(TARGET_NAME)";
13791371
SDKROOT = macosx;

Sources/SQLiteObjc/SQLiteObjc.h

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
//
2+
// SQLite.swift
3+
// https://github.com/stephencelis/SQLite.swift
4+
// Copyright © 2014-2015 Stephen Celis.
5+
//
6+
// Permission is hereby granted, free of charge, to any person obtaining a copy
7+
// of this software and associated documentation files (the "Software"), to deal
8+
// in the Software without restriction, including without limitation the rights
9+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
// copies of the Software, and to permit persons to whom the Software is
11+
// furnished to do so, subject to the following conditions:
12+
//
13+
// The above copyright notice and this permission notice shall be included in
14+
// all copies or substantial portions of the Software.
15+
//
16+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22+
// THE SOFTWARE.
23+
//
24+
25+
@import Foundation;
26+
#if defined(SQLITE_SWIFT_STANDALONE)
27+
@import sqlite3;
28+
#else
29+
@import SQLite3;
30+
#endif
31+
32+
NS_ASSUME_NONNULL_BEGIN
33+
typedef NSString * _Nullable (^_SQLiteTokenizerNextCallback)(const char *input, int *inputOffset, int *inputLength);
34+
int _SQLiteRegisterTokenizer(sqlite3 *db, const char *module, const char *tokenizer, _Nullable _SQLiteTokenizerNextCallback callback);
35+
NS_ASSUME_NONNULL_END
36+

Sources/SQLiteObjc/include/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# README
2+
3+
This folder contains the public interface for the SQLiteObjc module. It is a duplicate
4+
copy of the header file found in the Sources/SQLiteObjc folder. If you change one, change
5+
the other too!
6+
7+

Tests/Carthage/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ CARTHAGE := /usr/local/bin/carthage
22
CARTHAGE_PLATFORM := iOS
33
CARTHAGE_CONFIGURATION := Release
44
CARTHAGE_DIR := Carthage
5-
CARTHAGE_ARGS := --no-use-binaries
6-
CARTHAGE_TOOLCHAIN := com.apple.dt.toolchain.Swift_3_0
5+
CARTHAGE_ARGS := --no-use-binaries --use-xcframeworks
6+
# CARTHAGE_TOOLCHAIN := com.apple.dt.toolchain.Swift_3_0
7+
CARTHAGE_TOOLCHAIN := com.apple.dt.toolchain.XcodeDefault
78
CARTHAGE_CMDLINE := --configuration $(CARTHAGE_CONFIGURATION) --platform $(CARTHAGE_PLATFORM) --toolchain $(CARTHAGE_TOOLCHAIN) $(CARTHAGE_ARGS)
89

910
test: $(CARTHAGE) Cartfile

0 commit comments

Comments
 (0)