Skip to content

Commit 06379f7

Browse files
authored
Merge pull request #560 from zapcannon87/master
Release v11.6.3
2 parents b472a53 + 2f9e4b8 commit 06379f7

File tree

7 files changed

+57
-7
lines changed

7 files changed

+57
-7
lines changed

AVOS/AVOSCloud/UserAgent.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
#define SDK_VERSION @"v11.6.2"
1+
#define SDK_VERSION @"v11.6.3"

AVOS/AVOSCloudLiveQuery/AVSubscriber.m

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ - (void)loginWithCallback:(void (^)(BOOL succeeded, NSError *error))callback
248248
if (subscriber.alive) {
249249
[subscriber.backoffTimer reset];
250250
[subscriber invokeAllLoginCallbackWithSucceeded:true error:nil];
251+
[subscriber.webSocket setActivatingReconnectionEnabled:true];
251252
} else {
252253
[subscriber resentLoginCommand];
253254
}
@@ -287,9 +288,14 @@ - (void)resentLoginCommand
287288
[self.backoffTimer reset];
288289
[self invokeAllLoginCallbackWithSucceeded:true error:nil];
289290
NSArray<AVLiveQuery *> *livingObjects = [self->_weakLiveQueryObjectTable allObjects];
291+
BOOL liveQueryExist = false;
290292
for (AVLiveQuery *item in livingObjects) {
291-
[item resubscribe];
293+
if (item) {
294+
liveQueryExist = true;
295+
[item resubscribe];
296+
}
292297
}
298+
[self.webSocket setActivatingReconnectionEnabled:liveQueryExist];
293299
} else {
294300
NSTimeInterval after = [self.backoffTimer timeIntervalAndCalculateNext];
295301
dispatch_time_t when = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(after * NSEC_PER_SEC));

AVOS/RuntimeTestDemo/Base.lproj/Main.storyboard

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="VH5-ld-v4z">
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="VH5-ld-v4z">
33
<device id="retina4_7" orientation="portrait">
44
<adaptation id="fullscreen"/>
55
</device>
66
<dependencies>
77
<deployment identifier="iOS"/>
8-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
8+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
99
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
1010
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
1111
</dependencies>
@@ -76,7 +76,20 @@
7676
<view key="view" contentMode="scaleToFill" id="h7e-6P-8WR">
7777
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
7878
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
79+
<subviews>
80+
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="hOm-BY-Rnz">
81+
<rect key="frame" x="164.5" y="328.5" width="46" height="30"/>
82+
<state key="normal" title="Button"/>
83+
<connections>
84+
<action selector="buttonAction:" destination="seK-7Q-3AH" eventType="touchUpInside" id="Dgt-mI-x2d"/>
85+
</connections>
86+
</button>
87+
</subviews>
7988
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
89+
<constraints>
90+
<constraint firstItem="hOm-BY-Rnz" firstAttribute="centerX" secondItem="TfI-CA-Ioe" secondAttribute="centerX" id="0zG-FN-bay"/>
91+
<constraint firstItem="hOm-BY-Rnz" firstAttribute="centerY" secondItem="TfI-CA-Ioe" secondAttribute="centerY" id="r3z-L1-KOD"/>
92+
</constraints>
8093
<viewLayoutGuide key="safeArea" id="TfI-CA-Ioe"/>
8194
</view>
8295
</viewController>

AVOS/RuntimeTestDemo/LiveQueryTestViewController.swift

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,35 @@ import AVOSCloudLiveQuery
1414

1515
class LiveQueryTestViewController: UIViewController {
1616

17+
var liveQuery: AVLiveQuery!
18+
19+
var query: AVQuery!
20+
21+
override func viewDidLoad() {
22+
super.viewDidLoad()
23+
24+
self.query = AVQuery(className: "Todo")
25+
self.query.whereKeyExists("objectId")
26+
27+
self.liveQuery = AVLiveQuery(query: query)
28+
self.liveQuery.delegate = self
29+
30+
self.liveQuery.subscribe { (succeeded, error) in
31+
32+
}
33+
}
34+
35+
@IBAction func buttonAction(_ sender: UIButton) {
36+
let object = AVObject(className: "Todo")
37+
object.save()
38+
}
39+
40+
}
41+
42+
extension LiveQueryTestViewController: AVLiveQueryDelegate {
43+
44+
func liveQuery(_ liveQuery: AVLiveQuery, objectDidCreate object: Any) {
45+
print("\(liveQuery) objectDidCreate: \(object)")
46+
}
47+
1748
}

AVOSCloud.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'AVOSCloud'
3-
s.version = '11.6.2'
3+
s.version = '11.6.3'
44
s.homepage = 'https://leancloud.cn/'
55
s.summary = 'LeanCloud Objective-C SDK'
66
s.authors = 'LeanCloud'

AVOSCloudIM.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'AVOSCloudIM'
3-
s.version = '11.6.2'
3+
s.version = '11.6.3'
44
s.homepage = 'https://leancloud.cn/'
55
s.summary = 'LeanCloud IM Objective-C SDK'
66
s.authors = 'LeanCloud'

AVOSCloudLiveQuery.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'AVOSCloudLiveQuery'
3-
s.version = '11.6.2'
3+
s.version = '11.6.3'
44
s.homepage = 'https://leancloud.cn/'
55
s.summary = 'LeanCloud LiveQuery Objective-C SDK'
66
s.authors = 'LeanCloud'

0 commit comments

Comments
 (0)