Skip to content

Commit 1b25b9a

Browse files
Merge pull request #127 from ProteGO-Safe/release/4.9.0
Release/4.9.0
2 parents 107adcc + c7b43ce commit 1b25b9a

File tree

89 files changed

+3323
-295
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+3323
-295
lines changed

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,21 @@ 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.9.0
10+
- Added COVID daily stats
11+
- Added subscription for COVID daily stats push notifications
12+
- Added ability to unsubscribe from daily COVID stats push notification
13+
- Added localized push notifications
14+
- Added push notifications history
15+
- Added deep linking for push notifications
16+
- Added Universal Links for deep linking
17+
- Added local notifications (aka Districts Info) to notifications history
18+
- Removed passing push notification payload to UI (aka PWA)
19+
- Added Exposure Notificaticarion stats (keys count, analyze history, risk check)
20+
- Added Simulate Risk CHeck to Debug Panel
21+
- Added fetching CDN keys to Debug Panel
22+
- Changed the way of triggering to show Debug Panel in Stage builds (use shake gesture)
23+
924
## 4.8.0
1025
- Added ability for manual delete exposure risk info
1126

Podfile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@ def pods_definition
1010
pod 'Firebase/Messaging'
1111
pod 'Firebase/Auth'
1212
pod 'Firebase/RemoteConfig'
13-
pod 'PromiseKit', '~> 6.8'
13+
pod 'PromiseKit', '~> 6.13'
1414
pod 'Moya', '~> 14.0'
1515
pod 'ZIPFoundation', '~> 0.9'
1616
pod 'KeychainAccess', '~> 4.2.0'
1717
pod 'TrustKit', '~> 1.6.5'
1818
pod 'Siren', '~> 5.4.0'
1919
pod 'RealmSwift', '~> 5.0.0'
20+
pod 'SwiftProtobuf', '~> 1.0'
2021

2122
pod 'DBDebugToolkit', :configurations => ['Dev', 'DevDist', 'Stage', 'StageDebug', 'StageScreencast', 'LiveDebug', 'LiveAdhoc']
2223

@@ -25,3 +26,9 @@ end
2526
target 'safesafe' do
2627
pods_definition
2728
end
29+
30+
post_install do |installer|
31+
installer.pods_project.build_configurations.each do |config|
32+
config.build_settings['CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER'] = 'NO'
33+
end
34+
end

Podfile.lock

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ PODS:
104104
- Realm (= 5.0.3)
105105
- Siren (5.4.5)
106106
- SnapKit (5.0.1)
107+
- SwiftProtobuf (1.14.0)
107108
- TrustKit (1.6.5)
108109
- ZIPFoundation (0.9.11)
109110

@@ -115,10 +116,11 @@ DEPENDENCIES:
115116
- Firebase/RemoteConfig
116117
- KeychainAccess (~> 4.2.0)
117118
- Moya (~> 14.0)
118-
- PromiseKit (~> 6.8)
119+
- PromiseKit (~> 6.13)
119120
- RealmSwift (~> 5.0.0)
120121
- Siren (~> 5.4.0)
121122
- SnapKit (= 5.0.1)
123+
- SwiftProtobuf (~> 1.0)
122124
- TrustKit (~> 1.6.5)
123125
- ZIPFoundation (~> 0.9)
124126

@@ -148,6 +150,7 @@ SPEC REPOS:
148150
- RealmSwift
149151
- Siren
150152
- SnapKit
153+
- SwiftProtobuf
151154
- TrustKit
152155
- ZIPFoundation
153156

@@ -176,9 +179,10 @@ SPEC CHECKSUMS:
176179
RealmSwift: 493c9f089cd3893b3959007973c0e4f640906ba0
177180
Siren: 4c6f4863ea5b7f2d0e58b576663fefd8f6ef417f
178181
SnapKit: 97b92857e3df3a0c71833cce143274bf6ef8e5eb
182+
SwiftProtobuf: ed465ed18402f998fd117f631da27e0168e6b59c
179183
TrustKit: 073855e3adecd317417bda4ac9e9ac54a2e3b9f2
180184
ZIPFoundation: b1f0de4eed33e74a676f76e12559ab6b75990197
181185

182-
PODFILE CHECKSUM: a6a1ed03c5c3b533396e7e750375e4e80d12b86d
186+
PODFILE CHECKSUM: 779fe596c92aaa178911e4fb4980414eb2b9ab2e
183187

184-
COCOAPODS: 1.9.3
188+
COCOAPODS: 1.9.1

PushMutableContent/Info.plist

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>CFBundleDevelopmentRegion</key>
6+
<string>$(DEVELOPMENT_LANGUAGE)</string>
7+
<key>CFBundleDisplayName</key>
8+
<string>PushMutableContent</string>
9+
<key>CFBundleExecutable</key>
10+
<string>$(EXECUTABLE_NAME)</string>
11+
<key>CFBundleIdentifier</key>
12+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
13+
<key>CFBundleInfoDictionaryVersion</key>
14+
<string>6.0</string>
15+
<key>CFBundleName</key>
16+
<string>$(PRODUCT_NAME)</string>
17+
<key>CFBundlePackageType</key>
18+
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
19+
<key>CFBundleShortVersionString</key>
20+
<string>$(MARKETING_VERSION)</string>
21+
<key>CFBundleVersion</key>
22+
<string>$(CURRENT_PROJECT_VERSION)</string>
23+
<key>NSExtension</key>
24+
<dict>
25+
<key>NSExtensionPointIdentifier</key>
26+
<string>com.apple.usernotifications.service</string>
27+
<key>NSExtensionPrincipalClass</key>
28+
<string>$(PRODUCT_MODULE_NAME).NotificationService</string>
29+
</dict>
30+
</dict>
31+
</plist>
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
//
2+
// NotificationService.swift
3+
// PushMutableContent
4+
//
5+
// Created by Łukasz Szyszkowski on 19/11/2020.
6+
//
7+
8+
import UserNotifications
9+
10+
class NotificationService: UNNotificationServiceExtension {
11+
12+
var contentHandler: ((UNNotificationContent) -> Void)?
13+
14+
override func didReceive(_ request: UNNotificationRequest, withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void) {
15+
self.contentHandler = contentHandler
16+
let parser = NotificationUserInfoParser()
17+
18+
if let covidStatsDictionary = parser.parseCovidStats(userInfo: request.content.userInfo)?.dictionary {
19+
parser.addSharedData(data: covidStatsDictionary, for: .sharedCovidStats)
20+
}
21+
22+
guard let bestAttemptContent = (request.content.mutableCopy() as? UNMutableNotificationContent) else { return }
23+
24+
guard
25+
let selectedLanguageISO: String = StoredDefaults.standard.get(key: .selectedLanguage, useAppGroup: true),
26+
let selectedModel = parser.selectedLanguageData(lang: selectedLanguageISO, userInfo: request.content.userInfo)
27+
else {
28+
// Save default content if translations doesn't exist
29+
//
30+
let routeRaw: String? = parser.routeData(userInfo: request.content.userInfo)
31+
let dictionary = parser.parseNotification(title: bestAttemptContent.title, content: bestAttemptContent.body, route: routeRaw)
32+
parser.addSharedData(data: dictionary, for: .sharedNotifications)
33+
contentHandler(bestAttemptContent)
34+
return
35+
}
36+
37+
let routeRaw: String? = parser.routeData(userInfo: request.content.userInfo)
38+
let dictionary = parser.parseNotification(title: selectedModel.title, content: selectedModel.content, route: routeRaw)
39+
parser.addSharedData(data: dictionary, for: .sharedNotifications)
40+
41+
var modifiedUserInfo = request.content.userInfo
42+
modifiedUserInfo[NotificationUserInfoParser.Key.uuid.rawValue] = dictionary[NotificationUserInfoParser.Key.id.rawValue] as? String
43+
bestAttemptContent.userInfo = modifiedUserInfo
44+
bestAttemptContent.title = selectedModel.title
45+
bestAttemptContent.body = selectedModel.content
46+
47+
contentHandler(bestAttemptContent)
48+
49+
}
50+
51+
override func serviceExtensionTimeWillExpire() {
52+
}
53+
54+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>aps-environment</key>
6+
<string>development</string>
7+
<key>com.apple.security.application-groups</key>
8+
<array>
9+
<string>group.pl.gov.mc.protegosafe</string>
10+
</array>
11+
</dict>
12+
</plist>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>aps-environment</key>
6+
<string>production</string>
7+
<key>com.apple.security.application-groups</key>
8+
<array>
9+
<string>group.pl.gov.mc.protegosafe</string>
10+
</array>
11+
</dict>
12+
</plist>

README.md

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

7575
## ChangeLog
7676

77+
**4.9.0**
78+
- Added COVID daily stats
79+
- Added subscription for COVID daily stats push notifications
80+
- Added ability to unsubscribe from daily COVID stats push notification
81+
- Added localized push notifications
82+
- Added push notifications history
83+
- Added deep linking for push notifications
84+
- Added Universal Links for deep linking
85+
- Added local notifications (aka Districts Info) to notifications history
86+
- Removed passing push notification payload to UI (aka PWA)
87+
- Added Exposure Notificaticarion stats (keys count, analyze history, risk check)
88+
- Added Simulate Risk CHeck to Debug Panel
89+
- Added fetching CDN keys to Debug Panel
90+
- Changed the way of triggering to show Debug Panel in Stage builds (use shake gesture)
91+
7792
**4.8.0**
7893

7994
- Added ability for manual delete exposure risk info

fastlane/Fastfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,10 @@ private_lane :build_appstore do |options|
112112
export_options: {
113113
method: "app-store",
114114
provisioningProfiles: {
115-
"se.sigmaconnectivity.protegosafe" => "protegosafe-appstore",
116115
"pl.gov.mc.protegosafe" => "protegosafe-appstore",
117-
"pl.gov.mc.protegosafe-staging" => "protegosafe-staging-appstore"
116+
"pl.gov.mc.protegosafe-staging" => "protegosafe-staging-appstore",
117+
"pl.gov.mc.protegosafe-staging.apns-mutablecontent" => "protegosafe-staging-apns-mutablecontent",
118+
"pl.gov.mc.protegosafe.apns-mutablecontent" => "protegosafe-live-apns-mutablecontent"
118119
}
119120
}
120121
)

project.yml

Lines changed: 39 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ configs:
1010
Live: release
1111
LiveAdhoc: release #That's a build with Live PWA URL but with debug console
1212

13-
settings:
14-
CODE_SIGN_STYLE: Manual
15-
MARKETING_VERSION: "4.8.0"
16-
CURRENT_PROJECT_VERSION: 745
1713
schemes:
1814
safesafe Dev:
1915
build:
@@ -41,11 +37,46 @@ schemes:
4137
config: Live
4238

4339
targets:
40+
# Target for Mutable Push Notifications Extension
41+
#
42+
PushMutableContent:
43+
settings:
44+
CODE_SIGN_STYLE: Manual
45+
MARKETING_VERSION: "4.9.0"
46+
CURRENT_PROJECT_VERSION: 745
47+
TARGETED_DEVICE_FAMILY: 1,2
48+
type: app-extension
49+
platform: iOS
50+
deploymentTarget: "12.1"
51+
configFiles:
52+
Stage: safesafe/Resources/Extensions/apns-stage-mutablecontent.xcconfig
53+
StageDebug: safesafe/Resources/Extensions/apns-stage-mutablecontent-dev.xcconfig
54+
Live: safesafe/Resources/Extensions/apns-mutablecontent.xcconfig
55+
LiveDebug: safesafe/Resources/Extensions/apns-mutablecontent-dev.xcconfig
56+
sources:
57+
- path: PushMutableContent
58+
name: "PushMutableContent"
59+
- path: safesafe/Common/Helpers/Notifications
60+
group: safesafe/Common/Helpers
61+
excludes:
62+
- NotificationHistoryWorker.swift
63+
- Models/PushNotificationHistoryModel.swift
64+
- path: safesafe/Services/StoredDefaults.swift
65+
group: safesafe/Services
66+
- path: safesafe/Language/LanguageController.swift
67+
group: safesafe/Language
68+
- path: safesafe/Resources/Extensions
69+
group: safesafe/Resources
70+
# Main app target
71+
#
4472
safesafe:
4573
type: application
4674
platform: iOS
4775
deploymentTarget: "12.1"
4876
settings:
77+
CODE_SIGN_STYLE: Manual
78+
MARKETING_VERSION: "4.9.0"
79+
CURRENT_PROJECT_VERSION: 745
4980
TARGETED_DEVICE_FAMILY: 1
5081
SWIFT_OBJC_BRIDGING_HEADER: $(PROJECT_DIR)/safesafe/App/safesafe-Bridging-Header.h
5182
configFiles:
@@ -76,6 +107,10 @@ targets:
76107
type: folder
77108
- path: safesafe/Resources/translations
78109
type: folder
110+
dependencies:
111+
- target: PushMutableContent
112+
codesign: true
113+
embed: true
79114
preBuildScripts:
80115
- name: CopyGooglePlist
81116
path: Scripts/CopyGooglePlist.sh

0 commit comments

Comments
 (0)