Skip to content

Commit 8f93428

Browse files
authored
Merge pull request #119 from ProteGO-Safe/release/4.6.0
Release/4.6.0
2 parents 1176a1e + 8e89e93 commit 8f93428

39 files changed

+1125
-3672
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ safesafe/resources/Stage/GoogleService-Info.plist
4444
safesafe/resources/Dev/Config-dev.plist
4545
safesafe/resources/Stage/Config-stage.plist
4646

47-
safesafe/Resources/pwa
47+
safesafe/Resources/pwa/
4848

4949
## Xcodegen
5050
*.xcodeproj

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@ All notable changes to this project will be documented in this file.
66
The format is based on [Keep a Changelog](http://keepachangelog.com/)
77
and this project adheres to [Semantic Versioning](http://semver.org/).
88

9+
## 4.6.0
10+
- Added restricted districts feature
11+
- Added subscribing for notification for restricted districts
12+
- Small fixes for JS contract
13+
- Added ability to test districts changes notification to debug panel
14+
- Translations update
15+
- Fix for manage max exposure notifications key amount per day
16+
- Remove debug logging from iOS < 13.5
17+
918
## 4.5.0
1019
- Manage user diagnosis keys share rejection
1120
- Prevents url requests caching

Podfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,4 +206,4 @@ SPEC CHECKSUMS:
206206

207207
PODFILE CHECKSUM: 3b4c80f3b7969f193f8dc8c1f1db0378d6243a8c
208208

209-
COCOAPODS: 1.9.3
209+
COCOAPODS: 1.9.1

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,15 @@ To launch it, type `sh rebuild.sh` in your console.
7474

7575
## ChangeLog
7676

77+
**4.6.0**
78+
- Added restricted districts feature
79+
- Added subscribing for notification for restricted districts
80+
- Small fixes for JS contract
81+
- Added ability to test districts changes notification to debug panel
82+
- Translations update
83+
- Fix for manage max exposure notifications key amount per day
84+
- Remove debug logging from iOS < 13.5
85+
7786
**4.5.0**
7887
- Manage user diagnosis keys share rejection
7988
- Prevents url requests caching

project.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ configs:
1212

1313
settings:
1414
CODE_SIGN_STYLE: Manual
15-
MARKETING_VERSION: "4.5.0"
16-
CURRENT_PROJECT_VERSION: 650
15+
MARKETING_VERSION: "4.6.0"
16+
CURRENT_PROJECT_VERSION: 12
1717

1818
schemes:
1919
safesafe Dev:

safesafe/App/AppCoordinator.swift

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ final class AppCoordinator: CoordinatorType {
2828

2929
init?(appWindow: UIWindow?, dependencyContainer: DependencyContainer) {
3030
self.dependencyContainer = dependencyContainer
31-
RealmLocalStorage.setupEncryption()
32-
31+
3332
guard let window = appWindow else {
3433
Fatal.execute("Window doesn't exists")
3534
}
@@ -49,16 +48,15 @@ final class AppCoordinator: CoordinatorType {
4948
window.makeKeyAndVisible()
5049

5150
updateReminder()
51+
configureJSBridge(with: rootViewController)
5252

53-
if #available(iOS 13.5, *) {
54-
configureJSBridge(with: rootViewController)
55-
}
5653

5754
if #available(iOS 13.5, *) {
5855
// Don't register bg task on iPad devices that are not supported by EN
5956
guard UIDevice.current.model == "iPhone" else { return }
6057
dependencyContainer.backgroundTaskService.scheduleExposureTask()
6158
}
59+
6260
}
6361

6462
private func updateReminder() {
@@ -109,14 +107,16 @@ final class AppCoordinator: CoordinatorType {
109107
self.noInternetAlert = noInternetAlert
110108
}
111109

112-
@available(iOS 13.5, *)
113110
private func configureJSBridge(with viewController: UIViewController) {
114-
let factory: ExposureNotificationJSBridgeFactory = dependencyContainer
111+
if #available(iOS 13.5, *) {
112+
let factory: ExposureNotificationJSBridgeFactory = dependencyContainer
113+
dependencyContainer.jsBridge.registerExposureNotification(
114+
with: factory.makeExposureNotificationJSBridge(with: viewController),
115+
diagnosisKeysUploadService: dependencyContainer.diagnosisKeysUploadService
116+
)
117+
}
115118

116-
dependencyContainer.jsBridge.registerExposureNotification(
117-
with: factory.makeExposureNotificationJSBridge(with: viewController),
118-
diagnosisKeysUploadService: dependencyContainer.diagnosisKeysUploadService
119-
)
119+
dependencyContainer.jsBridge.register(districtService: dependencyContainer.districtsService)
120120
}
121121

122122
@objc

safesafe/App/AppDelegate.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
6666

6767
func applicationDidBecomeActive(_ application: UIApplication) {
6868
NotificationManager.shared.clearBadgeNumber()
69+
NotificationManager.shared.registerAPNSIfNeeded()
6970
}
7071

7172
func applicationDidEnterBackground(_ application: UIApplication) {

safesafe/App/SceneDelegate.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
3737
@available(iOS 13.0, *)
3838
func sceneDidBecomeActive(_ scene: UIScene) {
3939
NotificationManager.shared.clearBadgeNumber()
40+
NotificationManager.shared.registerAPNSIfNeeded()
4041
// Called when the scene has moved from an inactive state to an active state.
4142
// Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive.
4243

safesafe/Common/Helpers/Logger.swift

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ public final class Logger {
2727
}
2828
}
2929

30-
private static var dateFormatter: DateFormatter {
30+
private static var dateFormatter: DateFormatter = {
3131
let formatter = DateFormatter()
3232
formatter.dateFormat = "yyyy-MM-dd_HH:mm:ss.SSS"
3333

3434
return formatter
35-
}
35+
}()
3636

3737
public static func log(_ value: Any?, type: LogType, file: String, function: String, line: Int, fullPath: Bool = false) {
3838
#if !LIVE
@@ -52,13 +52,11 @@ public final class Logger {
5252
}
5353

5454
private static func fileLog(_ message: String) {
55-
DispatchQueue.global(qos: .background).async {
56-
let datePrefix = "{\(Self.dateFormatter.string(from: Date()))}"
57-
let line = "\(datePrefix) \(message)"
58-
if #available(iOS 13.0, *) {
55+
if #available(iOS 13.5, *) {
56+
DispatchQueue.global(qos: .background).async {
57+
let datePrefix = "{\(Logger.dateFormatter.string(from: Date()))}"
58+
let line = "\(datePrefix) \(message)"
5959
File.logToFile(line)
60-
} else {
61-
// Not implemented on earlier versions yet
6260
}
6361
}
6462
}

safesafe/Common/Protocols/AlertManager/AlertAction.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ enum AlertAction {
1111
case cancel
1212
case ok
1313
case retry
14+
case settings
1415

1516
var title: String {
1617
switch self {
@@ -20,6 +21,8 @@ enum AlertAction {
2021
return "ALERT_OK_BUTTON_TITLE".localized()
2122
case .retry:
2223
return "ALERT_RETRY_BUTTON_TITLE".localized()
24+
case .settings:
25+
return "ALERT_SETTINGS_BUTTON_TITLE".localized()
2326
}
2427
}
2528
}

0 commit comments

Comments
 (0)