Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

removed dead code #589

Merged
merged 3 commits into from
Jun 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cfg/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.9.0.2337
1.0.0.0
20 changes: 10 additions & 10 deletions src/xcode/ENA/ENA.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2551,7 +2551,7 @@
CODE_SIGN_ENTITLEMENTS = "${PROJECT}/Resources/ENACommunity.entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2337;
CURRENT_PROJECT_VERSION = 0;
DEVELOPMENT_TEAM = $IPHONE_APP_DEV_TEAM;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
Expand All @@ -2567,7 +2567,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 0.8.2;
MARKETING_VERSION = 1.0.0;
OTHER_CFLAGS = (
"-DSQLITE_HAS_CODEC",
"-DSQLITE_TEMP_STORE=3",
Expand Down Expand Up @@ -2715,7 +2715,7 @@
CODE_SIGN_ENTITLEMENTS = "${PROJECT}/Resources/ENACommunity.entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2337;
CURRENT_PROJECT_VERSION = 0;
DEVELOPMENT_TEAM = $IPHONE_APP_DEV_TEAM;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
Expand All @@ -2730,7 +2730,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 0.8.2;
MARKETING_VERSION = 1.0.0;
OTHER_CFLAGS = (
"-DSQLITE_HAS_CODEC",
"-DSQLITE_TEMP_STORE=3",
Expand Down Expand Up @@ -2934,7 +2934,7 @@
CODE_SIGN_ENTITLEMENTS = "${PROJECT}/Resources/ENATest.entitlements";
CODE_SIGN_IDENTITY = $IPHONE_APP_CODE_SIGN_IDENTITY;
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 2337;
CURRENT_PROJECT_VERSION = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
Expand All @@ -2948,7 +2948,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 0.8.2;
MARKETING_VERSION = 1.0.0;
OTHER_CFLAGS = (
"-DSQLITE_HAS_CODEC",
"-DSQLITE_TEMP_STORE=3",
Expand Down Expand Up @@ -2977,7 +2977,7 @@
CODE_SIGN_ENTITLEMENTS = "${PROJECT}/Resources/ENA.entitlements";
CODE_SIGN_IDENTITY = $IPHONE_APP_CODE_SIGN_IDENTITY;
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 2337;
CURRENT_PROJECT_VERSION = 0;
GCC_PREPROCESSOR_DEFINITIONS = "SQLITE_HAS_CODEC=1";
INFOPLIST_FILE = ENA/Resources/Info.plist;
IPHONE_APP_CODE_SIGN_IDENTITY = "iPhone Developer";
Expand All @@ -2987,7 +2987,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 0.8.2;
MARKETING_VERSION = 1.0.0;
OTHER_CFLAGS = (
"-DSQLITE_HAS_CODEC",
"-DSQLITE_TEMP_STORE=3",
Expand Down Expand Up @@ -3181,7 +3181,7 @@
CODE_SIGN_ENTITLEMENTS = "${PROJECT}/Resources/ENA.entitlements";
CODE_SIGN_IDENTITY = $IPHONE_APP_CODE_SIGN_IDENTITY;
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 2337;
CURRENT_PROJECT_VERSION = 0;
GCC_PREPROCESSOR_DEFINITIONS = "SQLITE_HAS_CODEC=1";
INFOPLIST_FILE = ENA/Resources/Info.plist;
IPHONE_APP_CODE_SIGN_IDENTITY = "iPhone Developer";
Expand All @@ -3191,7 +3191,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 0.8.2;
MARKETING_VERSION = 1.0.0;
OTHER_CFLAGS = (
"-DSQLITE_HAS_CODEC",
"-DSQLITE_TEMP_STORE=3",
Expand Down
5 changes: 2 additions & 3 deletions src/xcode/ENA/ENA/Source/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import FMDB
import UIKit

protocol CoronaWarnAppDelegate: AnyObject {
var client: Client { get }
var client: HTTPClient { get }
var downloadedPackagesStore: DownloadedPackagesStore { get }
var store: Store { get }
var riskProvider: RiskProvider { get }
Expand Down Expand Up @@ -143,8 +143,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
}
}()

lazy var client: Client = {

lazy var client: HTTPClient = {
var configuration: HTTPClient.Configuration
#if !RELEASE
let store = self.store
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import Foundation
import UIKit

protocol RequiresAppDependencies {
var client: Client { get }
var client: HTTPClient { get }
var store: Store { get }
var taskScheduler: ENATaskScheduler { get }
var downloadedPackagesStore: DownloadedPackagesStore { get }
Expand All @@ -30,7 +30,7 @@ protocol RequiresAppDependencies {
}

extension RequiresAppDependencies {
var client: Client {
var client: HTTPClient {
UIApplication.coronaWarnDelegate().client
}

Expand Down
28 changes: 1 addition & 27 deletions src/xcode/ENA/ENA/Source/SceneDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,32 +51,6 @@ final class SceneDelegate: UIResponder, UIWindowSceneDelegate, RequiresAppDepend
}
#endif

private lazy var clientConfiguration: HTTPClient.Configuration = {
guard
let distributionURLString = store.developerDistributionBaseURLOverride,
let submissionURLString = store.developerSubmissionBaseURLOverride,
let verificationURLString = store.developerVerificationBaseURLOverride,
let distributionURL = URL(string: distributionURLString),
let verificationURL = URL(string: verificationURLString),
let submissionURL = URL(string: submissionURLString) else {
return .production
}

return HTTPClient.Configuration(
apiVersion: "v1",
country: "DE",
endpoints: HTTPClient.Configuration.Endpoints(
distribution: .init(baseURL: distributionURL, requiresTrailingSlash: false),
submission: .init(baseURL: submissionURL, requiresTrailingSlash: true),
verification: .init(baseURL: verificationURL, requiresTrailingSlash: false)
)
)
}()

private(set) lazy var client: Client = {
HTTPClient(configuration: clientConfiguration)
}()

private var enStateHandler: ENStateHandler?

// MARK: UISceneDelegate
Expand Down Expand Up @@ -183,7 +157,7 @@ final class SceneDelegate: UIResponder, UIWindowSceneDelegate, RequiresAppDepend
enStateHandler = ENStateHandler(
initialExposureManagerState: exposureManager.preconditions(),
reachabilityService: ConnectivityReachabilityService(
connectivityURLs: [clientConfiguration.configurationURL]
connectivityURLs: [client.configuration.configurationURL]
),
delegate: self
)
Expand Down