Skip to content

Commit 57d91f3

Browse files
committed
Update dependencies, bump iOS deployment target to 16.0, migrate to GRDB 7
1 parent 882ce1c commit 57d91f3

6 files changed

Lines changed: 53 additions & 54 deletions

File tree

CryptomatorCloudAccess.xcodeproj/project.pbxproj

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1555,7 +1555,7 @@
15551555
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
15561556
GCC_WARN_UNUSED_FUNCTION = YES;
15571557
GCC_WARN_UNUSED_VARIABLE = YES;
1558-
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
1558+
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
15591559
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
15601560
MTL_FAST_MATH = YES;
15611561
ONLY_ACTIVE_ARCH = YES;
@@ -1615,7 +1615,7 @@
16151615
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
16161616
GCC_WARN_UNUSED_FUNCTION = YES;
16171617
GCC_WARN_UNUSED_VARIABLE = YES;
1618-
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
1618+
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
16191619
MTL_ENABLE_DEBUG_INFO = NO;
16201620
MTL_FAST_MATH = YES;
16211621
OTHER_SWIFT_FLAGS = "-Xfrontend -warn-long-expression-type-checking=200 -Xfrontend -warn-long-function-bodies=200";
@@ -1801,15 +1801,15 @@
18011801
repositoryURL = "https://github.com/google/google-api-objectivec-client-for-rest.git";
18021802
requirement = {
18031803
kind = upToNextMinorVersion;
1804-
minimumVersion = 3.4.0;
1804+
minimumVersion = 5.2.0;
18051805
};
18061806
};
18071807
4A567B182615C917002C4D82 /* XCRemoteSwiftPackageReference "GTMAppAuth" */ = {
18081808
isa = XCRemoteSwiftPackageReference;
18091809
repositoryURL = "https://github.com/google/GTMAppAuth.git";
18101810
requirement = {
18111811
kind = upToNextMinorVersion;
1812-
minimumVersion = 4.1.0;
1812+
minimumVersion = 5.0.0;
18131813
};
18141814
};
18151815
4A567B352615CAAC002C4D82 /* XCRemoteSwiftPackageReference "gtm-session-fetcher" */ = {
@@ -1825,7 +1825,7 @@
18251825
repositoryURL = "https://github.com/openid/AppAuth-iOS.git";
18261826
requirement = {
18271827
kind = upToNextMinorVersion;
1828-
minimumVersion = 1.7.0;
1828+
minimumVersion = 2.0.0;
18291829
};
18301830
};
18311831
4A75E1C228806F5800952FE6 /* XCRemoteSwiftPackageReference "msgraph-sdk-objc-models-spm" */ = {
@@ -1857,15 +1857,15 @@
18571857
repositoryURL = "https://github.com/CocoaLumberjack/CocoaLumberjack.git";
18581858
requirement = {
18591859
kind = upToNextMinorVersion;
1860-
minimumVersion = 3.8.0;
1860+
minimumVersion = 3.9.0;
18611861
};
18621862
};
18631863
4AF0AA7A2844DDD200C20B75 /* XCRemoteSwiftPackageReference "aws-sdk-ios-spm" */ = {
18641864
isa = XCRemoteSwiftPackageReference;
18651865
repositoryURL = "https://github.com/aws-amplify/aws-sdk-ios-spm.git";
18661866
requirement = {
18671867
kind = upToNextMinorVersion;
1868-
minimumVersion = 2.35.0;
1868+
minimumVersion = 2.41.0;
18691869
};
18701870
};
18711871
740C5877262F800A00F63423 /* XCRemoteSwiftPackageReference "JOSESwift" */ = {
@@ -1881,7 +1881,7 @@
18811881
repositoryURL = "https://github.com/AzureAD/microsoft-authentication-library-for-objc.git";
18821882
requirement = {
18831883
kind = upToNextMinorVersion;
1884-
minimumVersion = 1.5.0;
1884+
minimumVersion = 2.9.0;
18851885
};
18861886
};
18871887
746F090C27BC0932003FCD9F /* XCRemoteSwiftPackageReference "pcloud-sdk-swift" */ = {
@@ -1905,7 +1905,7 @@
19051905
repositoryURL = "https://github.com/groue/GRDB.swift.git";
19061906
requirement = {
19071907
kind = upToNextMinorVersion;
1908-
minimumVersion = 6.29.1;
1908+
minimumVersion = 7.10.0;
19091909
};
19101910
};
19111911
74F93565251F6863001F4ADA /* XCRemoteSwiftPackageReference "promises" */ = {

CryptomatorCloudAccess.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.resolved

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,23 @@ let appExtensionUnsafeSources = [
2121
let package = Package(
2222
name: "CryptomatorCloudAccess",
2323
platforms: [
24-
.iOS(.v14)
24+
.iOS(.v16)
2525
],
2626
products: [
2727
.library(name: "CryptomatorCloudAccess", targets: ["CryptomatorCloudAccess"]),
2828
.library(name: "CryptomatorCloudAccessCore", targets: ["CryptomatorCloudAccessCore"])
2929
],
3030
dependencies: [
31-
.package(url: "https://github.com/AzureAD/microsoft-authentication-library-for-objc.git", .upToNextMinor(from: "1.5.0")),
32-
.package(url: "https://github.com/aws-amplify/aws-sdk-ios-spm.git", .upToNextMinor(from: "2.35.0")),
31+
.package(url: "https://github.com/AzureAD/microsoft-authentication-library-for-objc.git", .upToNextMinor(from: "2.9.0")),
32+
.package(url: "https://github.com/aws-amplify/aws-sdk-ios-spm.git", .upToNextMinor(from: "2.41.0")),
3333
.package(url: "https://github.com/cryptomator/cryptolib-swift.git", .upToNextMinor(from: "1.1.0")),
34-
.package(url: "https://github.com/CocoaLumberjack/CocoaLumberjack.git", .upToNextMinor(from: "3.8.0")),
35-
.package(url: "https://github.com/google/google-api-objectivec-client-for-rest.git", .upToNextMinor(from: "3.4.0")),
36-
.package(url: "https://github.com/google/GTMAppAuth.git", .upToNextMinor(from: "4.1.0")),
34+
.package(url: "https://github.com/CocoaLumberjack/CocoaLumberjack.git", .upToNextMinor(from: "3.9.0")),
35+
.package(url: "https://github.com/google/google-api-objectivec-client-for-rest.git", .upToNextMinor(from: "5.2.0")),
36+
.package(url: "https://github.com/google/GTMAppAuth.git", .upToNextMinor(from: "5.0.0")),
3737
.package(url: "https://github.com/google/gtm-session-fetcher.git", .upToNextMinor(from: "3.5.0")),
3838
.package(url: "https://github.com/google/promises.git", .upToNextMinor(from: "2.3.0")),
39-
.package(url: "https://github.com/groue/GRDB.swift.git", .upToNextMinor(from: "6.29.1")),
40-
.package(url: "https://github.com/openid/AppAuth-iOS.git", .upToNextMinor(from: "1.7.0")),
39+
.package(url: "https://github.com/groue/GRDB.swift.git", .upToNextMinor(from: "7.10.0")),
40+
.package(url: "https://github.com/openid/AppAuth-iOS.git", .upToNextMinor(from: "2.0.0")),
4141
.package(url: "https://github.com/pCloud/pcloud-sdk-swift.git", .upToNextMinor(from: "3.2.0")),
4242
.package(url: "https://github.com/phil1995/dropbox-sdk-obj-c-spm.git", .upToNextMinor(from: "7.2.0")),
4343
.package(url: "https://github.com/phil1995/msgraph-sdk-objc-spm.git", .upToNextMinor(from: "1.0.0")),

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Continuous integration hosting is provided by [MacStadium](https://www.macstadiu
1717

1818
## Requirements
1919

20-
- iOS 14.0 or higher
20+
- iOS 16.0 or higher
2121
- Swift 5
2222

2323
## Installation

Sources/CryptomatorCloudAccess/Common/DirectoryContentCache.swift

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,10 @@ struct DirectoryContentCacheResponse {
4444
}
4545

4646
struct DirectoryContentDBCache: DirectoryContentCache {
47-
let dbWriter: DatabaseWriter
47+
let dbWriter: any DatabaseWriter
4848
let maxPageSize: Int
49-
private let cachedStatement: Statement
49+
50+
private static let insertSQL = "INSERT INTO entries (cacheIndex, name, itemType, lastModified, size, folderEnumerationPath) VALUES (?, ?, ?, ?, ?, ?)"
5051

5152
private static var migrator: DatabaseMigrator {
5253
var migrator = DatabaseMigrator()
@@ -64,13 +65,10 @@ struct DirectoryContentDBCache: DirectoryContentCache {
6465
return migrator
6566
}
6667

67-
init(dbWriter: DatabaseWriter, maxPageSize: Int) throws {
68+
init(dbWriter: any DatabaseWriter, maxPageSize: Int) throws {
6869
self.dbWriter = dbWriter
6970
self.maxPageSize = maxPageSize
7071
try DirectoryContentDBCache.migrator.migrate(dbWriter)
71-
self.cachedStatement = try dbWriter.write { db in
72-
return try db.cachedStatement(sql: "INSERT INTO entries (cacheIndex, name, itemType, lastModified, size, folderEnumerationPath) VALUES (?, ?, ?, ?, ?, ?)")
73-
}
7472
// reduce the cache size from 2000 KiB to 500 KiB
7573
try dbWriter.write { db in
7674
try db.execute(sql: "pragma cache_size = -500")
@@ -79,8 +77,9 @@ struct DirectoryContentDBCache: DirectoryContentCache {
7977

8078
func save(_ element: CloudItemMetadata, for folderEnumerationPath: CloudPath, index: Int64) throws {
8179
try autoreleasepool {
82-
_ = try dbWriter.write { _ in
83-
try cachedStatement.execute(arguments: [index, element.name, element.itemType, element.lastModifiedDate?.timeIntervalSinceReferenceDate, element.size, folderEnumerationPath])
80+
_ = try dbWriter.write { db in
81+
let statement = try db.cachedStatement(sql: DirectoryContentDBCache.insertSQL)
82+
try statement.execute(arguments: [index, element.name, element.itemType, element.lastModifiedDate?.timeIntervalSinceReferenceDate, element.size, folderEnumerationPath])
8483
}
8584
}
8685
}

0 commit comments

Comments
 (0)