Skip to content

Commit

Permalink
Update ci.yml
Browse files Browse the repository at this point in the history
Bump oldest xcode version to xcode_13.1
  • Loading branch information
lsmilek1 committed Feb 13, 2024
1 parent 956ff3c commit f125613
Show file tree
Hide file tree
Showing 11 changed files with 245 additions and 121 deletions.
48 changes: 36 additions & 12 deletions Sources/ParseSwift/Objects/ParseInstallation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,9 @@ extension ParseInstallation {
if case .success(let foundResult) = result {
do {
try Self.updateKeychainIfNeeded([foundResult])
completion(.success(foundResult))
callbackQueue.async {
completion(.success(foundResult))
}
} catch {
let defaultError = ParseError(code: .unknownError,
message: error.localizedDescription)
Expand All @@ -560,7 +562,9 @@ extension ParseInstallation {
}
}
} else {
completion(result)
callbackQueue.async {
completion(result)
}
}
}
} catch {
Expand Down Expand Up @@ -1020,7 +1024,9 @@ extension ParseInstallation {
case .success:
do {
try Self.updateKeychainIfNeeded([self], deleting: true)
completion(.success(()))
callbackQueue.async {
completion(.success(()))
}
} catch {
let defaultError = ParseError(code: .unknownError,
message: error.localizedDescription)
Expand All @@ -1030,7 +1036,9 @@ extension ParseInstallation {
}
}
case .failure(let error):
completion(.failure(error))
callbackQueue.async {
completion(.failure(error))
}
}
}
} catch let error as ParseError {
Expand Down Expand Up @@ -1215,7 +1223,9 @@ public extension Sequence where Element: ParseInstallation {
ignoringCustomObjectIdConfig: ignoringCustomObjectIdConfig,
options: options,
callbackQueue: callbackQueue)
completion(.success(objects))
callbackQueue.async {
completion(.success(objects))
}
} catch {
let defaultError = ParseError(code: .unknownError,
message: error.localizedDescription)
Expand Down Expand Up @@ -1269,7 +1279,9 @@ public extension Sequence where Element: ParseInstallation {
transaction: transaction,
options: options,
callbackQueue: callbackQueue)
completion(.success(objects))
callbackQueue.async {
completion(.success(objects))
}
} catch {
let defaultError = ParseError(code: .unknownError,
message: error.localizedDescription)
Expand Down Expand Up @@ -1323,7 +1335,9 @@ public extension Sequence where Element: ParseInstallation {
transaction: transaction,
options: options,
callbackQueue: callbackQueue)
completion(.success(objects))
callbackQueue.async {
completion(.success(objects))
}
} catch {
let defaultError = ParseError(code: .unknownError,
message: error.localizedDescription)
Expand Down Expand Up @@ -1377,7 +1391,9 @@ public extension Sequence where Element: ParseInstallation {
transaction: transaction,
options: options,
callbackQueue: callbackQueue)
completion(.success(objects))
callbackQueue.async {
completion(.success(objects))
}
} catch {
let defaultError = ParseError(code: .unknownError,
message: error.localizedDescription)
Expand Down Expand Up @@ -1507,7 +1523,9 @@ public extension Sequence where Element: ParseInstallation {
returnBatch.append(contentsOf: saved)
if completed == (batches.count - 1) {
try? Self.Element.updateKeychainIfNeeded(returnBatch.compactMap {try? $0.get()})
completion(.success(returnBatch))
callbackQueue.async {
completion(.success(returnBatch))
}
}
completed += 1
case .failure(let error):
Expand Down Expand Up @@ -1616,7 +1634,9 @@ public extension Sequence where Element: ParseInstallation {
}
}
try? Self.Element.updateKeychainIfNeeded(fetchedObjects)
completion(.success(fetchedObjectsToReturn))
callbackQueue.async {
completion(.success(fetchedObjectsToReturn))
}
case .failure(let error):
callbackQueue.async {
completion(.failure(error))
Expand Down Expand Up @@ -1732,11 +1752,15 @@ public extension Sequence where Element: ParseInstallation {
if completed == (batches.count - 1) {
try? Self.Element.updateKeychainIfNeeded(self.compactMap {$0},
deleting: true)
completion(.success(returnBatch))
callbackQueue.async {
completion(.success(returnBatch))
}
}
completed += 1
case .failure(let error):
completion(.failure(error))
callbackQueue.async {
completion(.failure(error))
}

Check warning on line 1763 in Sources/ParseSwift/Objects/ParseInstallation.swift

View check run for this annotation

Codecov / codecov/patch

Sources/ParseSwift/Objects/ParseInstallation.swift#L1761-L1763

Added lines #L1761 - L1763 were not covered by tests
return
}
}
Expand Down
49 changes: 34 additions & 15 deletions Sources/ParseSwift/Objects/ParseObject.swift
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,9 @@ transactions for this call.
ignoringCustomObjectIdConfig: ignoringCustomObjectIdConfig,
options: options,
callbackQueue: callbackQueue)
completion(.success(objects))
callbackQueue.async {
completion(.success(objects))
}
} catch {
let defaultError = ParseError(code: .unknownError,
message: error.localizedDescription)
Expand Down Expand Up @@ -568,7 +570,9 @@ transactions for this call.
transaction: transaction,
options: options,
callbackQueue: callbackQueue)
completion(.success(objects))
callbackQueue.async {
completion(.success(objects))
}
} catch {
let defaultError = ParseError(code: .unknownError,
message: error.localizedDescription)
Expand Down Expand Up @@ -621,7 +625,9 @@ transactions for this call.
transaction: transaction,
options: options,
callbackQueue: callbackQueue)
completion(.success(objects))
callbackQueue.async {
completion(.success(objects))
}
} catch {
let defaultError = ParseError(code: .unknownError,
message: error.localizedDescription)
Expand Down Expand Up @@ -674,7 +680,9 @@ transactions for this call.
transaction: transaction,
options: options,
callbackQueue: callbackQueue)
completion(.success(objects))
callbackQueue.async {
completion(.success(objects))
}
} catch {
let defaultError = ParseError(code: .unknownError,
message: error.localizedDescription)
Expand Down Expand Up @@ -798,11 +806,15 @@ transactions for this call.
case .success(let saved):
returnBatch.append(contentsOf: saved)
if completed == (batches.count - 1) {
completion(.success(returnBatch))
callbackQueue.async {
completion(.success(returnBatch))
}
}
completed += 1
case .failure(let error):
completion(.failure(error))
callbackQueue.async {
completion(.failure(error))
}

Check warning on line 817 in Sources/ParseSwift/Objects/ParseObject.swift

View check run for this annotation

Codecov / codecov/patch

Sources/ParseSwift/Objects/ParseObject.swift#L815-L817

Added lines #L815 - L817 were not covered by tests
return
}
}
Expand Down Expand Up @@ -897,7 +909,9 @@ transactions for this call.
message: "objectId \"\(uniqueObjectId)\" was not found in className \"\(Self.Element.className)\"")))
}
}
completion(.success(fetchedObjectsToReturn))
callbackQueue.async {
completion(.success(fetchedObjectsToReturn))
}
case .failure(let error):
callbackQueue.async {
completion(.failure(error))
Expand Down Expand Up @@ -1007,11 +1021,15 @@ transactions for this call.
case .success(let saved):
returnBatch.append(contentsOf: saved)
if completed == (batches.count - 1) {
completion(.success(returnBatch))
callbackQueue.async {
completion(.success(returnBatch))
}
}
completed += 1
case .failure(let error):
completion(.failure(error))
callbackQueue.async {
completion(.failure(error))
}

Check warning on line 1032 in Sources/ParseSwift/Objects/ParseObject.swift

View check run for this annotation

Codecov / codecov/patch

Sources/ParseSwift/Objects/ParseObject.swift#L1030-L1032

Added lines #L1030 - L1032 were not covered by tests
return
}
}
Expand Down Expand Up @@ -1550,12 +1568,13 @@ extension ParseObject {
do {
try deleteCommand().executeAsync(options: options,
callbackQueue: callbackQueue) { result in
switch result {

case .success:
completion(.success(()))
case .failure(let error):
completion(.failure(error))
callbackQueue.async {
switch result {
case .success:
completion(.success(()))
case .failure(let error):
completion(.failure(error))
}
}
}
} catch let error as ParseError {
Expand Down
Loading

0 comments on commit f125613

Please sign in to comment.