Skip to content

Commit 2b2b883

Browse files
Hongyan JiangGitHub Enterprise
authored andcommitted
remove code for iOS versions lower than 12
1 parent 22c5734 commit 2b2b883

File tree

6 files changed

+5
-433
lines changed

6 files changed

+5
-433
lines changed

Changelog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Changelog
22

3+
## 1.8.5
4+
- remove code for iOS versions lower than 12
35

46
## 1.8.4
57
- better memory management

InstanaAgent.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Pod::Spec.new do |s|
1616
#
1717

1818
s.name = "InstanaAgent"
19-
s.version = "1.8.4"
19+
s.version = "1.8.5"
2020
s.summary = "Instana iOS agent."
2121

2222
# This description is used to generate tags and improve search results.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
struct VersionConfig {
2-
static let agentVersion = "1.8.4"
2+
static let agentVersion = "1.8.5"
33
}

Sources/InstanaAgent/Utils/Networking/NetworkUtility.swift

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ class NetworkUtility {
1616
}
1717

1818
var connectionUpdateHandler: (ConnectionType) -> Void = { _ in }
19-
private var reachability: Reachability?
2019
static let shared = NetworkUtility()
2120

2221
init(observeNetworkChanges: Bool = true) {
@@ -36,21 +35,6 @@ class NetworkUtility {
3635
if observeNetworkChanges {
3736
nwPathMonitor.start(queue: .main)
3837
}
39-
} else {
40-
// Fallback on earlier versions
41-
// Remove when dropping iOS 11 and use NWPath (see git history)
42-
reachability = (try? Reachability())
43-
reachability?.whenReachable = { [weak self] reachability in
44-
guard let self = self else { return }
45-
self.update(reachability.connection == .wifi ? .wifi : .cellular)
46-
}
47-
reachability?.whenUnreachable = { [weak self] _ in
48-
guard let self = self else { return }
49-
self.update(.none)
50-
}
51-
if observeNetworkChanges {
52-
try? reachability?.startNotifier()
53-
}
5438
}
5539
}
5640

0 commit comments

Comments
 (0)