@@ -27,26 +27,26 @@ class ParetoUpdated: ParetoCheck {
27
27
override var TitleOFF : String {
28
28
" Pareto Security is outdated "
29
29
}
30
-
30
+
31
31
override var infoURL : URL {
32
32
var components = URLComponents ( )
33
33
components. scheme = " https "
34
34
components. host = " paretosecurity.com "
35
35
components. path = " /check/ \( UUID) "
36
-
36
+
37
37
// Add version parameters
38
38
var queryItems = [ URLQueryItem] ( )
39
-
39
+
40
40
// Add current and latest version information
41
41
if !currentVersion. isEmpty {
42
42
queryItems. append ( URLQueryItem ( name: " current_version " , value: currentVersion) )
43
43
}
44
44
if !latestVersion. isEmpty {
45
45
queryItems. append ( URLQueryItem ( name: " latest_version " , value: latestVersion) )
46
46
}
47
-
47
+
48
48
components. queryItems = queryItems
49
-
49
+
50
50
return components. url!
51
51
}
52
52
@@ -108,11 +108,11 @@ class ParetoUpdated: ParetoCheck {
108
108
}
109
109
110
110
let latestVersionString = latestRelease. tag_name. replacingOccurrences ( of: " v " , with: " " )
111
-
111
+
112
112
// Store versions for URL construction
113
- self . currentVersion = appVersion
114
- self . latestVersion = latestVersionString
115
-
113
+ currentVersion = appVersion
114
+ latestVersion = latestVersionString
115
+
116
116
let isUpToDate = appVersion == latestVersionString
117
117
118
118
os_log ( " Latest release is older than 10 days. App version: %{public}s, Latest version: %{public}s, Up to date: %{public}@ " ,
@@ -125,10 +125,10 @@ class ParetoUpdated: ParetoCheck {
125
125
appVersion = String ( appVersion. split ( separator: " - " ) [ 0 ] )
126
126
}
127
127
let latestVersionString = latestRelease. tag_name. replacingOccurrences ( of: " v " , with: " " )
128
-
128
+
129
129
// Store versions for URL construction
130
- self . currentVersion = appVersion
131
- self . latestVersion = latestVersionString
130
+ currentVersion = appVersion
131
+ latestVersion = latestVersionString
132
132
133
133
os_log ( " Latest release is within 10 days grace period. Published: %{public}s, Days ago: %{public}f, App version: %{public}s, Latest version: %{public}s " ,
134
134
latestRelease. published_at, abs ( publishedDate. timeIntervalSinceNow) / ( 24 * 60 * 60 ) , appVersion, latestVersionString)
@@ -144,7 +144,7 @@ class ParetoUpdated: ParetoCheck {
144
144
145
145
override func checkPasses( ) -> Bool {
146
146
// Disable this check when running in SetApp or when beta channel is enabled
147
-
147
+
148
148
#if SETAPP_ENABLED
149
149
// Always pass for SetApp builds as updates are handled by SetApp
150
150
return true
@@ -153,7 +153,7 @@ class ParetoUpdated: ParetoCheck {
153
153
if Defaults [ . showBeta] {
154
154
return true
155
155
}
156
-
156
+
157
157
// Create a semaphore to wait for the async operation to complete
158
158
let semaphore = DispatchSemaphore ( value: 0 )
159
159
0 commit comments