File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -16,17 +16,16 @@ protocol NetworkMonitor: AnyObject {
16
16
}
17
17
18
18
var currentNetWorkType : String = NetWorkType . UnKnow
19
+ var currentIsOnline : Bool = true
19
20
20
21
extension NWPathMonitor : NetworkMonitor {
21
- var isOnline : Bool {
22
- currentPath. status == . satisfied
23
- }
24
-
22
+ var isOnline : Bool { currentIsOnline }
25
23
var netWorkType : String { currentNetWorkType }
26
24
27
25
func startMonitoring( using queue: DispatchQueue ) {
28
26
start ( queue: queue)
29
27
pathUpdateHandler = { path in
28
+ currentIsOnline = path. status == . satisfied
30
29
if path. usesInterfaceType ( . wifi) {
31
30
currentNetWorkType = NetWorkType . Wifi
32
31
} else if path. usesInterfaceType ( . cellular) {
Original file line number Diff line number Diff line change 8
8
enum PackageInfo {
9
9
/// the clickstream analytics iOS sdk version
10
10
/// note: update and align the version with new tag version before committing new tag
11
- static let version = " 0.5.1 "
11
+ static let version = " 0.5.2 "
12
12
}
You can’t perform that action at this time.
0 commit comments