Skip to content

Commit 79b760f

Browse files
authored
fix: query objects doesn't dispatch properly (#293)
1 parent fe67c88 commit 79b760f

File tree

4 files changed

+16
-8
lines changed

4 files changed

+16
-8
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,15 @@
22

33
### main
44

5-
[Full Changelog](https://github.com/parse-community/Parse-Swift/compare/2.3.0...main)
5+
[Full Changelog](https://github.com/parse-community/Parse-Swift/compare/2.3.1...main)
66
* _Contributing to this repo? Add info about your change here to be included in the next release_
77

8+
### 2.3.1
9+
[Full Changelog](https://github.com/parse-community/Parse-Swift/compare/2.3.0...2.3.1)
10+
11+
__Fixes__
12+
- Fixed an issue querying an object didn't dispatch to the proper queue which can cause app crashes ([#293](https://github.com/parse-community/Parse-Swift/pull/293)), thanks to [Corey Baker](https://github.com/cbaker6).
13+
814
### 2.3.0
915
[Full Changelog](https://github.com/parse-community/Parse-Swift/compare/2.2.6...2.3.0)
1016

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ import PackageDescription
5757
let package = Package(
5858
name: "YOUR_PROJECT_NAME",
5959
dependencies: [
60-
.package(url: "https://github.com/parse-community/Parse-Swift", from: "2.2.4"),
60+
.package(url: "https://github.com/parse-community/Parse-Swift", from: "2.3.1"),
6161
]
6262
)
6363
```

Sources/ParseSwift/API/API+NonParseBodyCommand.swift

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,14 @@ internal extension API {
6464
URLSession.parse.dataTask(with: urlRequest,
6565
callbackQueue: callbackQueue,
6666
mapper: mapper) { result in
67-
switch result {
67+
callbackQueue.async {
68+
switch result {
6869

69-
case .success(let decoded):
70-
completion(.success(decoded))
71-
case .failure(let error):
72-
completion(.failure(error))
70+
case .success(let decoded):
71+
completion(.success(decoded))
72+
case .failure(let error):
73+
completion(.failure(error))
74+
}
7375
}
7476
}
7577
case .failure(let error):

Sources/ParseSwift/ParseConstants.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import Foundation
1010

1111
enum ParseConstants {
1212
static let sdk = "swift"
13-
static let version = "2.3.0"
13+
static let version = "2.3.1"
1414
static let fileManagementDirectory = "parse/"
1515
static let fileManagementPrivateDocumentsDirectory = "Private Documents/"
1616
static let fileManagementLibraryDirectory = "Library/"

0 commit comments

Comments
 (0)