Skip to content

Commit

Permalink
Merge pull request #214 from DP-3T/release/1.0.7
Browse files Browse the repository at this point in the history
Release 1.0.7
  • Loading branch information
UBaggeler authored Jul 17, 2020
2 parents 00fb671 + 885c4d6 commit 944cd50
Show file tree
Hide file tree
Showing 85 changed files with 2,517 additions and 420 deletions.
16 changes: 10 additions & 6 deletions DP3TApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@
242D2223245C4BD8005DAEA8 /* ConfigResponseBody.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E6E5170242F5026006E532E /* ConfigResponseBody.swift */; };
242D2224245C4BD8005DAEA8 /* NSLayoutConstants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E7C0D38242E02A20017C4F9 /* NSLayoutConstants.swift */; };
242D2225245C4BD8005DAEA8 /* NSCodeInputControl.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E1771552440B5140008D73D /* NSCodeInputControl.swift */; };
242D2226245C4BD8005DAEA8 /* NSNoCodeInformationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6EA49E2A2444410D009EFCAB /* NSNoCodeInformationViewController.swift */; };
242D2228245C4BD8005DAEA8 /* Logger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 242D21D0245C3853005DAEA8 /* Logger.swift */; };
242D2229245C4BD8005DAEA8 /* NSInfoBoxView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6EFB09782445B2CA0097BD3D /* NSInfoBoxView.swift */; };
242D222A245C4BD8005DAEA8 /* NSExternalLinkButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6EF4D24724582BBB005E2A9C /* NSExternalLinkButton.swift */; };
Expand Down Expand Up @@ -237,7 +236,6 @@
6E8FC0FA24518BF2002AB1E5 /* UIScrollView+UBKeyboardObserver.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E8FC0F724518BF2002AB1E5 /* UIScrollView+UBKeyboardObserver.m */; };
6E8FC0FB24518BF2002AB1E5 /* UBKeyboardObserver.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E8FC0F924518BF2002AB1E5 /* UBKeyboardObserver.m */; };
6EA49E2924443E69009EFCAB /* NSSimpleTextButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6EA49E2824443E69009EFCAB /* NSSimpleTextButton.swift */; };
6EA49E2B2444410D009EFCAB /* NSNoCodeInformationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6EA49E2A2444410D009EFCAB /* NSNoCodeInformationViewController.swift */; };
6EC47BD42451C3C2000D7686 /* NSMeldungDetailMeldungSingleTitleHeader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6EC47BD32451C3C2000D7686 /* NSMeldungDetailMeldungSingleTitleHeader.swift */; };
6EC7E821245B27E10015A55B /* Impressum in Resources */ = {isa = PBXBuildFile; fileRef = 6EC7E820245B27E10015A55B /* Impressum */; };
6EE81DEB245163C400FC7218 /* PhoneCallHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6EE81DEA245163C400FC7218 /* PhoneCallHelper.swift */; };
Expand Down Expand Up @@ -273,6 +271,8 @@
AAF73666242F2EA00051E34A /* NSBegegnungenModuleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = AAF73665242F2EA00051E34A /* NSBegegnungenModuleView.swift */; };
AAF73668242F3D030051E34A /* UIStackView+NS.swift in Sources */ = {isa = PBXBuildFile; fileRef = AAF73667242F3D030051E34A /* UIStackView+NS.swift */; };
AAF7366B2430838A0051E34A /* NSAnimatedGraphLayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = AAF7366A2430838A0051E34A /* NSAnimatedGraphLayer.swift */; };
B67A11AE24B8CB1700B46306 /* NSImageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6AEA30724B74ACA0055B5BB /* NSImageView.swift */; };
B6AEA30824B74ACA0055B5BB /* NSImageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6AEA30724B74ACA0055B5BB /* NSImageView.swift */; };
DC175E402430C4C700BD2AD6 /* NSOnboardingContentViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC175E3F2430C4C700BD2AD6 /* NSOnboardingContentViewController.swift */; };
DC175E422430C4F900BD2AD6 /* NSOnboardingPermissionsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC175E412430C4F900BD2AD6 /* NSOnboardingPermissionsViewController.swift */; };
DC286A26242CE0B9001D5344 /* Environment.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC286A25242CE0B9001D5344 /* Environment.swift */; };
Expand Down Expand Up @@ -327,6 +327,7 @@
F84089F024936D8700A66CD1 /* MockKeychain.swift in Sources */ = {isa = PBXBuildFile; fileRef = F84089EF24936D8700A66CD1 /* MockKeychain.swift */; };
F84089F12493A2EC00A66CD1 /* Keychain.swift in Sources */ = {isa = PBXBuildFile; fileRef = F84089EB2493695200A66CD1 /* Keychain.swift */; };
F84089F22493A2EF00A66CD1 /* KeychainPersisted.swift in Sources */ = {isa = PBXBuildFile; fileRef = F84089ED2493696500A66CD1 /* KeychainPersisted.swift */; };
F85E4C0C24AC84BF00056864 /* MockNotificationCenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = F85E4C0B24AC84BF00056864 /* MockNotificationCenter.swift */; };
F85ED9A32499EF93007EBC49 /* Bundle+BuildInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = F85ED9A22499EF93007EBC49 /* Bundle+BuildInfo.swift */; };
F865C8A324990A6800B730BD /* NSOnboardingDisclaimerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F865C8A224990A6800B730BD /* NSOnboardingDisclaimerViewController.swift */; };
F865C8A424990B5700B730BD /* NSOnboardingDisclaimerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F865C8A224990A6800B730BD /* NSOnboardingDisclaimerViewController.swift */; };
Expand Down Expand Up @@ -450,7 +451,6 @@
6E8FC0F824518BF2002AB1E5 /* UBKeyboardObserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UBKeyboardObserver.h; sourceTree = "<group>"; };
6E8FC0F924518BF2002AB1E5 /* UBKeyboardObserver.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UBKeyboardObserver.m; sourceTree = "<group>"; };
6EA49E2824443E69009EFCAB /* NSSimpleTextButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NSSimpleTextButton.swift; sourceTree = "<group>"; };
6EA49E2A2444410D009EFCAB /* NSNoCodeInformationViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NSNoCodeInformationViewController.swift; sourceTree = "<group>"; };
6EC47BD32451C3C2000D7686 /* NSMeldungDetailMeldungSingleTitleHeader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NSMeldungDetailMeldungSingleTitleHeader.swift; sourceTree = "<group>"; };
6EC7E820245B27E10015A55B /* Impressum */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Impressum; sourceTree = "<group>"; };
6EE81DEA245163C400FC7218 /* PhoneCallHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PhoneCallHelper.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -487,6 +487,7 @@
AAF73665242F2EA00051E34A /* NSBegegnungenModuleView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NSBegegnungenModuleView.swift; sourceTree = "<group>"; };
AAF73667242F3D030051E34A /* UIStackView+NS.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIStackView+NS.swift"; sourceTree = "<group>"; };
AAF7366A2430838A0051E34A /* NSAnimatedGraphLayer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NSAnimatedGraphLayer.swift; sourceTree = "<group>"; };
B6AEA30724B74ACA0055B5BB /* NSImageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NSImageView.swift; sourceTree = "<group>"; };
DC175E3F2430C4C700BD2AD6 /* NSOnboardingContentViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NSOnboardingContentViewController.swift; sourceTree = "<group>"; };
DC175E412430C4F900BD2AD6 /* NSOnboardingPermissionsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NSOnboardingPermissionsViewController.swift; sourceTree = "<group>"; };
DC286A25242CE0B9001D5344 /* Environment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Environment.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -535,6 +536,7 @@
F84089EB2493695200A66CD1 /* Keychain.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Keychain.swift; sourceTree = "<group>"; };
F84089ED2493696500A66CD1 /* KeychainPersisted.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeychainPersisted.swift; sourceTree = "<group>"; };
F84089EF24936D8700A66CD1 /* MockKeychain.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockKeychain.swift; sourceTree = "<group>"; };
F85E4C0B24AC84BF00056864 /* MockNotificationCenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockNotificationCenter.swift; sourceTree = "<group>"; };
F85ED9A22499EF93007EBC49 /* Bundle+BuildInfo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Bundle+BuildInfo.swift"; sourceTree = "<group>"; };
F865C8A224990A6800B730BD /* NSOnboardingDisclaimerViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NSOnboardingDisclaimerViewController.swift; sourceTree = "<group>"; };
F88585ED249272EE00018AEA /* TracingLocalPushTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TracingLocalPushTests.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -632,7 +634,6 @@
children = (
6E1771532440B09A0008D73D /* NSCodeInputViewController.swift */,
6E1771552440B5140008D73D /* NSCodeInputControl.swift */,
6EA49E2A2444410D009EFCAB /* NSNoCodeInformationViewController.swift */,
);
path = CodeInput;
sourceTree = "<group>";
Expand Down Expand Up @@ -1037,6 +1038,7 @@
8E81CCAE241FCC7F006F2437 /* DP3TAppTests */ = {
isa = PBXGroup;
children = (
F85E4C0B24AC84BF00056864 /* MockNotificationCenter.swift */,
8E81CCAF241FCC7F006F2437 /* FakePublishManagerTests.swift */,
F88585ED249272EE00018AEA /* TracingLocalPushTests.swift */,
8E81CCB1241FCC7F006F2437 /* Info.plist */,
Expand Down Expand Up @@ -1155,6 +1157,7 @@
DCA3FFB324502D370003F5AD /* NSTracingErrorView.swift */,
6EFB09782445B2CA0097BD3D /* NSInfoBoxView.swift */,
6E33086924506E0600913B0E /* NSExplanationView.swift */,
B6AEA30724B74ACA0055B5BB /* NSImageView.swift */,
);
path = Views;
sourceTree = "<group>";
Expand Down Expand Up @@ -1537,6 +1540,7 @@
242D21F4245C4BD8005DAEA8 /* NSMeldungenDetailNoMeldungenTitleView.swift in Sources */,
242D21F6245C4BD8005DAEA8 /* UIView+NS.swift in Sources */,
242D21F7245C4BD8005DAEA8 /* UIImage+UBHelpers.m in Sources */,
B67A11AE24B8CB1700B46306 /* NSImageView.swift in Sources */,
242D21F8245C4BD8005DAEA8 /* UIStateManager.swift in Sources */,
242D21F9245C4BD8005DAEA8 /* NSNavigationController.swift in Sources */,
242D21FA245C4BD8005DAEA8 /* PhoneCallHelper.swift in Sources */,
Expand Down Expand Up @@ -1594,7 +1598,6 @@
242D2224245C4BD8005DAEA8 /* NSLayoutConstants.swift in Sources */,
2411CA9D245F1085002FB5A9 /* Environment+PublicKeys.swift in Sources */,
242D2225245C4BD8005DAEA8 /* NSCodeInputControl.swift in Sources */,
242D2226245C4BD8005DAEA8 /* NSNoCodeInformationViewController.swift in Sources */,
242D2228245C4BD8005DAEA8 /* Logger.swift in Sources */,
242D2229245C4BD8005DAEA8 /* NSInfoBoxView.swift in Sources */,
242D222A245C4BD8005DAEA8 /* NSExternalLinkButton.swift in Sources */,
Expand Down Expand Up @@ -1663,6 +1666,7 @@
DC702AFF243F6ED90066C773 /* UIColor+HEX.swift in Sources */,
DC702B0E243F6FAE0066C773 /* UBRawRepresentable.swift in Sources */,
6E8FC0FA24518BF2002AB1E5 /* UIScrollView+UBKeyboardObserver.m in Sources */,
B6AEA30824B74ACA0055B5BB /* NSImageView.swift in Sources */,
6E3308662450442D00913B0E /* NSWhatToDoInformView.swift in Sources */,
A6BBA110246BFCBC00E42EE7 /* UIDevice+ScreenType.swift in Sources */,
6E7C0D37242E02600017C4F9 /* NSStackScrollView.swift in Sources */,
Expand Down Expand Up @@ -1730,7 +1734,6 @@
6E7C0D39242E02A20017C4F9 /* NSLayoutConstants.swift in Sources */,
F84089EE2493696500A66CD1 /* KeychainPersisted.swift in Sources */,
6E1771562440B5140008D73D /* NSCodeInputControl.swift in Sources */,
6EA49E2B2444410D009EFCAB /* NSNoCodeInformationViewController.swift in Sources */,
242D21D1245C3853005DAEA8 /* Logger.swift in Sources */,
6EFB09792445B2CA0097BD3D /* NSInfoBoxView.swift in Sources */,
6EF4D24824582BBB005E2A9C /* NSExternalLinkButton.swift in Sources */,
Expand Down Expand Up @@ -1781,6 +1784,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
F85E4C0C24AC84BF00056864 /* MockNotificationCenter.swift in Sources */,
F88585EE249272EE00018AEA /* TracingLocalPushTests.swift in Sources */,
F84089F024936D8700A66CD1 /* MockKeychain.swift in Sources */,
8E81CCB0241FCC7F006F2437 /* FakePublishManagerTests.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"repositoryURL": "https://github.com/DP-3T/dp3t-sdk-ios.git",
"state": {
"branch": "develop",
"revision": "5133ef9681ab038dafa3848e6f6a2f268238bd30",
"revision": "acd483470a63a148c3c77a34d1f5a68ebe3dfc04",
"version": null
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,6 @@
ReferencedContainer = "container:DP3TApp.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<EnvironmentVariables>
<EnvironmentVariable
key = "OS_ACTIVITY_MODE"
value = "disable"
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release-Internal"
Expand Down
7 changes: 0 additions & 7 deletions DP3TApp.xcodeproj/xcshareddata/xcschemes/Debug.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,6 @@
ReferencedContainer = "container:DP3TApp.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<EnvironmentVariables>
<EnvironmentVariable
key = "OS_ACTIVITY_MODE"
value = "disable"
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>
</LaunchAction>
<ProfileAction
buildConfiguration = "Debug"
Expand Down
8 changes: 2 additions & 6 deletions DP3TApp/Logic/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -94,19 +94,19 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
// Logic for coldstart / background

// if app is cold-started or comes from background > 30 minutes,
// do the force update check
if coldStart || backgroundTime > 30.0 * 60.0 {
if !jumpToMessageIfRequired(onlyFirst: true) {
DispatchQueue.main.asyncAfter(deadline: .now() + 3.0) {
_ = self.jumpToMessageIfRequired(onlyFirst: true)
}
}
NSSynchronizationPersistence.shared?.removeLogsBefore14Days()
startForceUpdateCheck()
} else {
_ = jumpToMessageIfRequired(onlyFirst: false)
}

startForceUpdateCheck()

FakePublishManager.shared.runTask()

NSSynchronizationPersistence.shared?.appendLog(eventType: .open, date: Date(), payload: nil)
Expand Down Expand Up @@ -157,10 +157,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
}
}

func application(_: UIApplication, performFetchWithCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
DatabaseSyncer.shared.performFetch(completionHandler: completionHandler)
}

// MARK: - Force update

private func startForceUpdateCheck() {
Expand Down
14 changes: 1 addition & 13 deletions DP3TApp/Logic/Config/ConfigLoadOperation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,11 @@ class ConfigLoadOperation: Operation {
@UBOptionalUserDefault(key: "presentedConfigForVersion")
static var presentedConfigForVersion: String?

@UBOptionalUserDefault(key: "lastBackgroundConfigLoad")
static var lastBackgroundConfigLoad: Date?

// 6h
static let backgroundInterval: TimeInterval = 60 * 60 * 6

override func main() {
guard isCancelled == false else { return }
// Only load config if last load is older than backgroundInterval
guard Self.lastBackgroundConfigLoad == nil || Date().timeIntervalSince(Self.lastBackgroundConfigLoad!) > Self.backgroundInterval else { return }

let semaphore = DispatchSemaphore(value: 0)
ConfigManager().loadConfig { config in
if config != nil {
Self.lastBackgroundConfigLoad = Date()
}
ConfigManager().loadConfig(backgroundTask: true) { config in

if let c = config, c.forceUpdate {
// only show notification once per app update
Expand All @@ -46,7 +35,6 @@ class ConfigLoadOperation: Operation {
}
} else {
self.cancel()
Logger.log("No forced update")
}
semaphore.signal()
}
Expand Down
Loading

0 comments on commit 944cd50

Please sign in to comment.