diff --git a/CryptomatorCloudAccess.xcodeproj/project.pbxproj b/CryptomatorCloudAccess.xcodeproj/project.pbxproj index bcbce32..7322b1f 100644 --- a/CryptomatorCloudAccess.xcodeproj/project.pbxproj +++ b/CryptomatorCloudAccess.xcodeproj/project.pbxproj @@ -1781,7 +1781,7 @@ repositoryURL = "https://github.com/google/GTMAppAuth.git"; requirement = { kind = upToNextMinorVersion; - minimumVersion = 4.0.0; + minimumVersion = 4.1.0; }; }; 4A567B352615CAAC002C4D82 /* XCRemoteSwiftPackageReference "gtm-session-fetcher" */ = { @@ -1789,7 +1789,7 @@ repositoryURL = "https://github.com/google/gtm-session-fetcher.git"; requirement = { kind = upToNextMinorVersion; - minimumVersion = 3.1.0; + minimumVersion = 3.5.0; }; }; 4A567B3A2615CB00002C4D82 /* XCRemoteSwiftPackageReference "AppAuth-iOS" */ = { @@ -1797,7 +1797,7 @@ repositoryURL = "https://github.com/openid/AppAuth-iOS.git"; requirement = { kind = upToNextMinorVersion; - minimumVersion = 1.6.0; + minimumVersion = 1.7.0; }; }; 4A75E1C228806F5800952FE6 /* XCRemoteSwiftPackageReference "msgraph-sdk-objc-models-spm" */ = { @@ -1837,7 +1837,7 @@ repositoryURL = "https://github.com/aws-amplify/aws-sdk-ios-spm.git"; requirement = { kind = upToNextMinorVersion; - minimumVersion = 2.34.0; + minimumVersion = 2.35.0; }; }; 740C5877262F800A00F63423 /* XCRemoteSwiftPackageReference "JOSESwift" */ = { @@ -1853,7 +1853,7 @@ repositoryURL = "https://github.com/AzureAD/microsoft-authentication-library-for-objc.git"; requirement = { kind = upToNextMinorVersion; - minimumVersion = 1.3.0; + minimumVersion = 1.5.0; }; }; 746F090C27BC0932003FCD9F /* XCRemoteSwiftPackageReference "pcloud-sdk-swift" */ = { @@ -1877,7 +1877,7 @@ repositoryURL = "https://github.com/groue/GRDB.swift.git"; requirement = { kind = upToNextMinorVersion; - minimumVersion = 5.26.0; + minimumVersion = 6.29.1; }; }; 74F93565251F6863001F4ADA /* XCRemoteSwiftPackageReference "promises" */ = { diff --git a/CryptomatorCloudAccess.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/CryptomatorCloudAccess.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 9076027..f450ab2 100644 --- a/CryptomatorCloudAccess.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/CryptomatorCloudAccess.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -6,8 +6,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/openid/AppAuth-iOS.git", "state" : { - "revision" : "71cde449f13d453227e687458144bde372d30fc7", - "version" : "1.6.2" + "revision" : "c89ed571ae140f8eb1142735e6e23d7bb8c34cb2", + "version" : "1.7.5" } }, { @@ -15,8 +15,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/aws-amplify/aws-sdk-ios-spm.git", "state" : { - "revision" : "8ff8bebfe24271f7b16c5abaeb78daf82bee3a80", - "version" : "2.34.2" + "revision" : "6e23b91609f9ddf988fda58bf711896a6062d4ff", + "version" : "2.35.0" } }, { @@ -78,8 +78,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/groue/GRDB.swift.git", "state" : { - "revision" : "dd7e7f39e8e4d7a22d258d9809a882f914690b01", - "version" : "5.26.1" + "revision" : "2cf6c756e1e5ef6901ebae16576a7e4e4b834622", + "version" : "6.29.3" } }, { @@ -87,8 +87,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/google/gtm-session-fetcher.git", "state" : { - "revision" : "d415594121c9e8a4f9d79cecee0965cf35e74dbd", - "version" : "3.1.1" + "revision" : "a2ab612cb980066ee56d90d60d8462992c07f24b", + "version" : "3.5.0" } }, { @@ -96,8 +96,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/google/GTMAppAuth.git", "state" : { - "revision" : "41aba100f28395ebe842cd66e5d371cdd46c6792", - "version" : "4.0.0" + "revision" : "5d7d66f647400952b1758b230e019b07c0b4b22a", + "version" : "4.1.1" } }, { @@ -114,8 +114,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/AzureAD/microsoft-authentication-library-for-objc.git", "state" : { - "revision" : "d2f81ded070ac6452b2a6acb5bc45eb566427fe7", - "version" : "1.3.3" + "revision" : "b8733236bfd16e10849f4752a4d1c4621e4bf930", + "version" : "1.5.0" } }, { diff --git a/Package.resolved b/Package.resolved index 0622fed..44ea729 100644 --- a/Package.resolved +++ b/Package.resolved @@ -5,8 +5,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/openid/AppAuth-iOS.git", "state" : { - "revision" : "71cde449f13d453227e687458144bde372d30fc7", - "version" : "1.6.2" + "revision" : "c89ed571ae140f8eb1142735e6e23d7bb8c34cb2", + "version" : "1.7.5" } }, { @@ -14,8 +14,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/aws-amplify/aws-sdk-ios-spm.git", "state" : { - "revision" : "8ff8bebfe24271f7b16c5abaeb78daf82bee3a80", - "version" : "2.34.2" + "revision" : "6e23b91609f9ddf988fda58bf711896a6062d4ff", + "version" : "2.35.0" } }, { @@ -77,8 +77,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/groue/GRDB.swift.git", "state" : { - "revision" : "dd7e7f39e8e4d7a22d258d9809a882f914690b01", - "version" : "5.26.1" + "revision" : "2cf6c756e1e5ef6901ebae16576a7e4e4b834622", + "version" : "6.29.3" } }, { @@ -86,8 +86,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/google/gtm-session-fetcher.git", "state" : { - "revision" : "d415594121c9e8a4f9d79cecee0965cf35e74dbd", - "version" : "3.1.1" + "revision" : "a2ab612cb980066ee56d90d60d8462992c07f24b", + "version" : "3.5.0" } }, { @@ -95,8 +95,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/google/GTMAppAuth.git", "state" : { - "revision" : "41aba100f28395ebe842cd66e5d371cdd46c6792", - "version" : "4.0.0" + "revision" : "5d7d66f647400952b1758b230e019b07c0b4b22a", + "version" : "4.1.1" } }, { @@ -113,8 +113,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/AzureAD/microsoft-authentication-library-for-objc.git", "state" : { - "revision" : "d2f81ded070ac6452b2a6acb5bc45eb566427fe7", - "version" : "1.3.3" + "revision" : "b8733236bfd16e10849f4752a4d1c4621e4bf930", + "version" : "1.5.0" } }, { diff --git a/Package.swift b/Package.swift index 75344f4..906093c 100644 --- a/Package.swift +++ b/Package.swift @@ -28,16 +28,16 @@ let package = Package( .library(name: "CryptomatorCloudAccessCore", targets: ["CryptomatorCloudAccessCore"]) ], dependencies: [ - .package(url: "https://github.com/AzureAD/microsoft-authentication-library-for-objc.git", .upToNextMinor(from: "1.3.0")), - .package(url: "https://github.com/aws-amplify/aws-sdk-ios-spm.git", .upToNextMinor(from: "2.34.0")), + .package(url: "https://github.com/AzureAD/microsoft-authentication-library-for-objc.git", .upToNextMinor(from: "1.5.0")), + .package(url: "https://github.com/aws-amplify/aws-sdk-ios-spm.git", .upToNextMinor(from: "2.35.0")), .package(url: "https://github.com/cryptomator/cryptolib-swift.git", .upToNextMinor(from: "1.1.0")), .package(url: "https://github.com/CocoaLumberjack/CocoaLumberjack.git", .upToNextMinor(from: "3.8.0")), .package(url: "https://github.com/google/google-api-objectivec-client-for-rest.git", .upToNextMinor(from: "3.4.0")), - .package(url: "https://github.com/google/GTMAppAuth.git", .upToNextMinor(from: "4.0.0")), - .package(url: "https://github.com/google/gtm-session-fetcher.git", .upToNextMinor(from: "3.1.0")), + .package(url: "https://github.com/google/GTMAppAuth.git", .upToNextMinor(from: "4.1.0")), + .package(url: "https://github.com/google/gtm-session-fetcher.git", .upToNextMinor(from: "3.5.0")), .package(url: "https://github.com/google/promises.git", .upToNextMinor(from: "2.3.0")), - .package(url: "https://github.com/groue/GRDB.swift.git", .upToNextMinor(from: "5.26.0")), - .package(url: "https://github.com/openid/AppAuth-iOS.git", .upToNextMinor(from: "1.6.0")), + .package(url: "https://github.com/groue/GRDB.swift.git", .upToNextMinor(from: "6.29.1")), + .package(url: "https://github.com/openid/AppAuth-iOS.git", .upToNextMinor(from: "1.7.0")), .package(url: "https://github.com/pCloud/pcloud-sdk-swift.git", .upToNextMinor(from: "3.2.0")), .package(url: "https://github.com/phil1995/dropbox-sdk-obj-c-spm.git", .upToNextMinor(from: "7.2.0")), .package(url: "https://github.com/phil1995/msgraph-sdk-objc-spm.git", .upToNextMinor(from: "1.0.0")), diff --git a/README.md b/README.md index 0f1f794..a199103 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ The API is implemented once for each cloud. It also forms the foundation for dec You can use [Swift Package Manager](https://swift.org/package-manager/ "Swift Package Manager"). ```swift -.package(url: "https://github.com/cryptomator/cloud-access-swift.git", .upToNextMinor(from: "1.11.0")) +.package(url: "https://github.com/cryptomator/cloud-access-swift.git", .upToNextMinor(from: "1.12.0")) ``` ## Usage diff --git a/Sources/CryptomatorCloudAccess/Box/BoxIdentifierCache.swift b/Sources/CryptomatorCloudAccess/Box/BoxIdentifierCache.swift index 05e9b10..7108a9e 100644 --- a/Sources/CryptomatorCloudAccess/Box/BoxIdentifierCache.swift +++ b/Sources/CryptomatorCloudAccess/Box/BoxIdentifierCache.swift @@ -13,7 +13,7 @@ class BoxIdentifierCache { private let inMemoryDB: DatabaseQueue init() throws { - self.inMemoryDB = DatabaseQueue() + self.inMemoryDB = try DatabaseQueue() try inMemoryDB.write { db in try db.create(table: BoxItem.databaseTableName) { table in table.column(BoxItem.cloudPathKey, .text).notNull().primaryKey() diff --git a/Sources/CryptomatorCloudAccess/Box/BoxItem.swift b/Sources/CryptomatorCloudAccess/Box/BoxItem.swift index 181d364..0aa4c0e 100644 --- a/Sources/CryptomatorCloudAccess/Box/BoxItem.swift +++ b/Sources/CryptomatorCloudAccess/Box/BoxItem.swift @@ -36,7 +36,7 @@ extension BoxItem { } extension BoxItem: PersistableRecord { - func encode(to container: inout PersistenceContainer) { + func encode(to container: inout PersistenceContainer) throws { container[BoxItem.cloudPathKey] = cloudPath container[BoxItem.identifierKey] = identifier container[BoxItem.itemTypeKey] = itemType diff --git a/Sources/CryptomatorCloudAccess/Crypto/DirectoryIdCache.swift b/Sources/CryptomatorCloudAccess/Crypto/DirectoryIdCache.swift index 5c77f33..780b981 100644 --- a/Sources/CryptomatorCloudAccess/Crypto/DirectoryIdCache.swift +++ b/Sources/CryptomatorCloudAccess/Crypto/DirectoryIdCache.swift @@ -19,7 +19,7 @@ private struct CachedEntry: Decodable, FetchableRecord, TableRecord { } extension CachedEntry: PersistableRecord { - func encode(to container: inout PersistenceContainer) { + func encode(to container: inout PersistenceContainer) throws { container[CachedEntry.cleartextPathKey] = cleartextPath container[CachedEntry.dirIdKey] = dirId } @@ -29,7 +29,7 @@ class DirectoryIdCache { private let inMemoryDB: DatabaseQueue init() throws { - self.inMemoryDB = DatabaseQueue() + self.inMemoryDB = try DatabaseQueue() try inMemoryDB.write { db in try db.create(table: CachedEntry.databaseTableName) { table in table.column(CachedEntry.cleartextPathKey, .text).notNull().primaryKey() diff --git a/Sources/CryptomatorCloudAccess/Crypto/VaultFormat6/VaultFormat6ShortenedNameCache.swift b/Sources/CryptomatorCloudAccess/Crypto/VaultFormat6/VaultFormat6ShortenedNameCache.swift index 66544b5..870b1bd 100644 --- a/Sources/CryptomatorCloudAccess/Crypto/VaultFormat6/VaultFormat6ShortenedNameCache.swift +++ b/Sources/CryptomatorCloudAccess/Crypto/VaultFormat6/VaultFormat6ShortenedNameCache.swift @@ -25,7 +25,7 @@ private struct CachedEntry: Decodable, FetchableRecord, TableRecord { } extension CachedEntry: PersistableRecord { - func encode(to container: inout PersistenceContainer) { + func encode(to container: inout PersistenceContainer) throws { container[CachedEntry.shortenedNameKey] = shortenedName container[CachedEntry.originalNameKey] = originalName } @@ -48,7 +48,7 @@ class VaultFormat6ShortenedNameCache { init(vaultPath: CloudPath) throws { self.vaultPath = vaultPath self.ciphertextNameCompIdx = vaultPath.pathComponents.lastItemIndex() + 4 - self.inMemoryDB = DatabaseQueue() + self.inMemoryDB = try DatabaseQueue() try inMemoryDB.write { db in try db.create(table: CachedEntry.databaseTableName) { table in table.column(CachedEntry.shortenedNameKey, .text).notNull().primaryKey() diff --git a/Sources/CryptomatorCloudAccess/Crypto/VaultFormat7/VaultFormat7ShortenedNameCache.swift b/Sources/CryptomatorCloudAccess/Crypto/VaultFormat7/VaultFormat7ShortenedNameCache.swift index a0ce300..a50b718 100644 --- a/Sources/CryptomatorCloudAccess/Crypto/VaultFormat7/VaultFormat7ShortenedNameCache.swift +++ b/Sources/CryptomatorCloudAccess/Crypto/VaultFormat7/VaultFormat7ShortenedNameCache.swift @@ -31,7 +31,7 @@ private struct CachedEntry: Decodable, FetchableRecord, TableRecord { } extension CachedEntry: PersistableRecord { - func encode(to container: inout PersistenceContainer) { + func encode(to container: inout PersistenceContainer) throws { container[CachedEntry.shortenedNameKey] = shortenedName container[CachedEntry.originalNameKey] = originalName } @@ -106,7 +106,7 @@ class VaultFormat7ShortenedNameCache { self.vaultPath = vaultPath self.threshold = threshold self.ciphertextNameCompIdx = vaultPath.pathComponents.lastItemIndex() + 4 - self.inMemoryDB = DatabaseQueue() + self.inMemoryDB = try DatabaseQueue() try inMemoryDB.write { db in try db.create(table: CachedEntry.databaseTableName) { table in table.column(CachedEntry.shortenedNameKey, .text).notNull().primaryKey() diff --git a/Sources/CryptomatorCloudAccess/GoogleDrive/GoogleDriveIdentifierCache.swift b/Sources/CryptomatorCloudAccess/GoogleDrive/GoogleDriveIdentifierCache.swift index 97b5b93..f5f59f1 100644 --- a/Sources/CryptomatorCloudAccess/GoogleDrive/GoogleDriveIdentifierCache.swift +++ b/Sources/CryptomatorCloudAccess/GoogleDrive/GoogleDriveIdentifierCache.swift @@ -13,7 +13,7 @@ class GoogleDriveIdentifierCache { private let inMemoryDB: DatabaseQueue init() throws { - self.inMemoryDB = DatabaseQueue() + self.inMemoryDB = try DatabaseQueue() try inMemoryDB.write { db in try db.create(table: GoogleDriveItem.databaseTableName) { table in table.column(GoogleDriveItem.cloudPathKey, .text).notNull().primaryKey() diff --git a/Sources/CryptomatorCloudAccess/OneDrive/OneDriveIdentifierCache.swift b/Sources/CryptomatorCloudAccess/OneDrive/OneDriveIdentifierCache.swift index da53e2b..4c32d94 100644 --- a/Sources/CryptomatorCloudAccess/OneDrive/OneDriveIdentifierCache.swift +++ b/Sources/CryptomatorCloudAccess/OneDrive/OneDriveIdentifierCache.swift @@ -13,7 +13,7 @@ class OneDriveIdentifierCache { private let inMemoryDB: DatabaseQueue init() throws { - self.inMemoryDB = DatabaseQueue() + self.inMemoryDB = try DatabaseQueue() try inMemoryDB.write { db in try db.create(table: OneDriveItem.databaseTableName) { table in table.column(OneDriveItem.cloudPathKey, .text).notNull().primaryKey() diff --git a/Sources/CryptomatorCloudAccess/OneDrive/OneDriveItem.swift b/Sources/CryptomatorCloudAccess/OneDrive/OneDriveItem.swift index 4973a83..10e6ade 100644 --- a/Sources/CryptomatorCloudAccess/OneDrive/OneDriveItem.swift +++ b/Sources/CryptomatorCloudAccess/OneDrive/OneDriveItem.swift @@ -42,7 +42,7 @@ struct OneDriveItem: Decodable, FetchableRecord, TableRecord, Equatable { } extension OneDriveItem: PersistableRecord { - func encode(to container: inout PersistenceContainer) { + func encode(to container: inout PersistenceContainer) throws { container[OneDriveItem.cloudPathKey] = cloudPath container[OneDriveItem.identifierKey] = identifier container[OneDriveItem.driveIdentifierKey] = driveIdentifier diff --git a/Sources/CryptomatorCloudAccess/PCloud/PCloudIdentifierCache.swift b/Sources/CryptomatorCloudAccess/PCloud/PCloudIdentifierCache.swift index ece7571..57cd000 100644 --- a/Sources/CryptomatorCloudAccess/PCloud/PCloudIdentifierCache.swift +++ b/Sources/CryptomatorCloudAccess/PCloud/PCloudIdentifierCache.swift @@ -14,7 +14,7 @@ class PCloudIdentifierCache { private let inMemoryDB: DatabaseQueue init() throws { - self.inMemoryDB = DatabaseQueue() + self.inMemoryDB = try DatabaseQueue() try inMemoryDB.write { db in try db.create(table: PCloudItem.databaseTableName) { table in table.column(PCloudItem.cloudPathKey, .text).notNull().primaryKey() diff --git a/Sources/CryptomatorCloudAccess/PCloud/PCloudItem.swift b/Sources/CryptomatorCloudAccess/PCloud/PCloudItem.swift index 2b15d93..daa6ec0 100644 --- a/Sources/CryptomatorCloudAccess/PCloud/PCloudItem.swift +++ b/Sources/CryptomatorCloudAccess/PCloud/PCloudItem.swift @@ -46,7 +46,7 @@ extension PCloudItem { } extension PCloudItem: PersistableRecord { - func encode(to container: inout PersistenceContainer) { + func encode(to container: inout PersistenceContainer) throws { container[PCloudItem.cloudPathKey] = cloudPath container[PCloudItem.identifierKey] = identifier container[PCloudItem.itemTypeKey] = itemType diff --git a/Tests/CryptomatorCloudAccessTests/Common/DirectoryContentCacheTests.swift b/Tests/CryptomatorCloudAccessTests/Common/DirectoryContentCacheTests.swift index 1729e19..28235c0 100644 --- a/Tests/CryptomatorCloudAccessTests/Common/DirectoryContentCacheTests.swift +++ b/Tests/CryptomatorCloudAccessTests/Common/DirectoryContentCacheTests.swift @@ -29,7 +29,7 @@ class DirectoryContentCacheTests: XCTestCase { let subfolderPath = CloudPath("/subfolder") override func setUpWithError() throws { - let inMemoryDB = DatabaseQueue() + let inMemoryDB = try DatabaseQueue() cache = try DirectoryContentDBCache(dbWriter: inMemoryDB, maxPageSize: maxPageSize) }