Skip to content
This repository was archived by the owner on Jun 13, 2023. It is now read-only.

Commit e04adfe

Browse files
authored
⚡ Relase 2.2.3 (#144)
* ⚡ Release 2.2.3 * Fixes swift demo project
1 parent 0d23a52 commit e04adfe

File tree

8 files changed

+22
-12
lines changed

8 files changed

+22
-12
lines changed

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# ParseLiveQuery-iOS-OSX Changelog
22

3+
# 2.2.3
4+
5+
- Bumps Parse SDK to 1.15.4 and Bolts to 1.9.0, thanks to [marcgovi](https://github.com/marcgovi)
6+
- Updates logging strategy for websockets, thanks to [Joe Szymanski](https://github.com/JoeSzymanski)
7+
- Ensures unsubscribed queries are removed from subscriptions list, thanks to [Joe Szymanski](https://github.com/JoeSzymanski)
8+
- Do not attempt to reconnect if a connection is already in progress, thanks to [Joe Szymanski](https://github.com/JoeSzymanski)
9+
310
# 2.2.2
411

512
- Adds ability to set the clientKey on the connect message, thanks to [bryandel](https://github.com/bryandel)

Cartfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
github "BoltsFramework/Bolts-Swift"
2-
github "ParsePlatform/Parse-SDK-iOS-OSX" == 1.15.0
2+
github "ParsePlatform/Parse-SDK-iOS-OSX" == 1.15.4
33
github "daltoniam/Starscream" == 2.1.1

Cartfile.resolved

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
github "BoltsFramework/Bolts-ObjC" "1.8.4"
1+
github "BoltsFramework/Bolts-ObjC" "1.9.0"
22
github "BoltsFramework/Bolts-Swift" "1.3.0"
3+
github "ParsePlatform/Parse-SDK-iOS-OSX" "1.15.4"
34
github "daltoniam/Starscream" "2.1.1"
4-
github "ParsePlatform/Parse-SDK-iOS-OSX" "1.15.0"

Carthage/Checkouts/Bolts-ObjC

Submodule Bolts-ObjC updated 43 files

Examples/LiveQueryDemo/main.swift

+6-3
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ class ChatRoomManager {
3737
disconnectFromChatRoom()
3838
}
3939

40-
Room.query()?.whereKey("name", equalTo: room).getFirstObjectInBackground().continue({ task in
40+
Room.query()?.whereKey("name", equalTo: room).getFirstObjectInBackground()
41+
.continueOnSuccessWith(block: { task -> Any? in
4142
self.currentChatRoom = task.result as? Room
4243
print("Connected to room \(self.currentChatRoom?.name ?? "null")")
4344

@@ -64,7 +65,8 @@ class ChatRoomManager {
6465
}
6566

6667
func printPriorMessages() {
67-
messagesQuery.findObjectsInBackground().continue({ task in
68+
messagesQuery.findObjectsInBackground()
69+
.continueOnSuccessWith(block: { task -> Any? in
6870
(task.result as? [Message])?.forEach(self.printMessage)
6971

7072
return nil
@@ -123,7 +125,8 @@ let password = "Enter password for \(username): ".withCString {
123125
let chatManager = ChatRoomManager()
124126
let inputManager = InputManager(chatManager: chatManager)
125127

126-
PFUser.logInWithUsername(inBackground: username, password: password).continue({ task in
128+
PFUser.logInWithUsername(inBackground: username, password: password)
129+
.continueOnSuccessWith(block: { task -> Any? in
127130
print("Enter chat room to connect to: ")
128131
return nil
129132
})

ParseLiveQuery.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'ParseLiveQuery'
3-
s.version = '2.2.2'
3+
s.version = '2.2.3'
44
s.license = { :type => 'BSD' }
55
s.summary = 'Allows for subscriptions to queries in conjunction with parse-server.'
66
s.homepage = 'http://parseplatform.org'

Sources/ParseLiveQuery/Internal/BoltsHelpers.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@ func objcTask<T>(_ task: Task<T>) -> BFTask<T> where T: AnyObject {
1919
taskCompletionSource.trySetCancelled()
2020
} else if task.faulted {
2121
let error = (task.error as NSError?) ?? NSError(domain: unknownDomain, code: -1, userInfo: nil)
22-
taskCompletionSource.trySetError(error)
22+
taskCompletionSource.trySet(error: error)
2323
} else {
24-
taskCompletionSource.trySetResult(task.result)
24+
taskCompletionSource.trySet(result: task.result)
2525
}
2626
}
2727
return taskCompletionSource.task
2828
}
2929

3030
func swiftTask(_ task: BFTask<AnyObject>) -> Task<AnyObject> {
3131
let taskCompletionSource = TaskCompletionSource<AnyObject>()
32-
task.continue({ task in
32+
task.continueWith(block: { task in
3333
if task.isCancelled {
3434
taskCompletionSource.tryCancel()
3535
} else if let error = task.error , task.isFaulted {

0 commit comments

Comments
 (0)