Skip to content

Commit

Permalink
Merge pull request #91 from DP-3T/develop
Browse files Browse the repository at this point in the history
Version 1.0.2
  • Loading branch information
UBaggeler authored Jun 4, 2020
2 parents 1c3d5c8 + afaeb8e commit 28ad59d
Show file tree
Hide file tree
Showing 169 changed files with 6,007 additions and 582 deletions.
69 changes: 29 additions & 40 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,57 +2,46 @@ name: build

on:
push:
branches-ignore:
- master
- release
branches: [ master, develop ]
pull_request:
branches: [ master, develop ]

jobs:
build:
runs-on: macOS-latest

steps:
- uses: actions/checkout@v2

- name: Switch to Xcode 11.5
run: sudo xcode-select --switch /Applications/Xcode_11.5.app

# Compile project and run tests
- name: Compile and run tests
run: fastlane scan --scheme "Debug"

build_release_prod:
runs-on: macOS-latest

steps:
- uses: actions/checkout@v2

- name: Switch to Xcode 11.4.1
run: sudo xcode-select --switch /Applications/Xcode_11.4.app

- name: Sets up bundler
run: bundle update --bundler
- name: Switch to Xcode 11.5
run: sudo xcode-select --switch /Applications/Xcode_11.5.app

- name: Sign and build
env:
MATCH_GIT_URL: ${{ secrets.MATCH_GIT_URL }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}
MATCH_GIT_BRANCH: ${{ secrets.MATCH_GIT_BRANCH }}
APP_SCHEME: "Release-Prod"
APP_IDENTIFIER: ${{ secrets.APP_IDENTIFIER_PROD }}
FASTLANE_TEAM_ID: ${{ secrets.TEAM_ID }}
SKIP_ADD_BADGE: true
BADGE_TITLE: ""
run: bundle exec fastlane sign_and_build

build_release_dev:
# Compile "Release-Prod" for iOS Simulator (no signing)
- name: Compile and run tests
run: fastlane gym --scheme "Release-Prod" --skip_package_ipa true --destination "generic/platform=iOS Simulator"

build_release_dev_calibration:
runs-on: macOS-latest

steps:
- uses: actions/checkout@v2

- name: Switch to Xcode 11.4.1
run: sudo xcode-select --switch /Applications/Xcode_11.4.app

- name: Sets up bundler
run: bundle update --bundler

- name: Sign and build
env:
MATCH_GIT_URL: ${{ secrets.MATCH_GIT_URL }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}
MATCH_GIT_BRANCH: ${{ secrets.MATCH_GIT_BRANCH }}
APP_SCHEME: "Release-Internal"
APP_IDENTIFIER: ${{ secrets.APP_IDENTIFIER_PROD }}
FASTLANE_TEAM_ID: ${{ secrets.TEAM_ID }}
SKIP_ADD_BADGE: true
BADGE_TITLE: ""
run: bundle exec fastlane sign_and_build
- name: Switch to Xcode 11.5
run: sudo xcode-select --switch /Applications/Xcode_11.5.app

# Compile "Release-Dev-Calibration" for iOS Simulator (no signing)
- name: Compile and run tests
run: fastlane gym --scheme "Release-Dev-Calibration" --skip_package_ipa true --destination "generic/platform=iOS Simulator"
39 changes: 22 additions & 17 deletions .github/workflows/distribute.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,27 @@ name: testflight

on:
push:
branches:
- master
- release
pull_request:
branches:
- master
branches-ignore:
- '**'

#on:
# push:
# branches:
# - master
# - release
# pull_request:
# branches:
# - master

jobs:
testflight_internal:
testflight_dev:
runs-on: macOS-latest

steps:
- uses: actions/checkout@v2

- name: Switch to Xcode 11.4.1
run: sudo xcode-select --switch /Applications/Xcode_11.4.app
- name: Switch to Xcode 11.5
run: sudo xcode-select --switch /Applications/Xcode_11.5.app

- name: Installs librsvg
run: brew install librsvg
Expand All @@ -34,8 +39,8 @@ jobs:
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}
MATCH_GIT_BRANCH: ${{ secrets.MATCH_GIT_BRANCH }}
APP_SCHEME: "Release-Internal"
APP_IDENTIFIER: ${{ secrets.APP_IDENTIFIER_INTERNAL }}
APP_SCHEME: "Release-Dev"
APP_IDENTIFIER: ${{ secrets.APP_IDENTIFIER_DEV }}
FASTLANE_TEAM_ID: ${{ secrets.TEAM_ID }}
BADGE_TITLE: "DEV"
run: bundle exec fastlane sign_and_build
Expand All @@ -54,8 +59,8 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Switch to Xcode 11.4.1
run: sudo xcode-select --switch /Applications/Xcode_11.4.app
- name: Switch to Xcode 11.5
run: sudo xcode-select --switch /Applications/Xcode_11.5.app

- name: Installs librsvg
run: brew install librsvg
Expand Down Expand Up @@ -92,8 +97,8 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Switch to Xcode 11.4.1
run: sudo xcode-select --switch /Applications/Xcode_11.4.app
- name: Switch to Xcode 11.5
run: sudo xcode-select --switch /Applications/Xcode_11.5.app

- name: Installs librsvg
run: brew install librsvg
Expand Down Expand Up @@ -130,8 +135,8 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Switch to Xcode 11.4.1
run: sudo xcode-select --switch /Applications/Xcode_11.4.app
- name: Switch to Xcode 11.5
run: sudo xcode-select --switch /Applications/Xcode_11.5.app

- name: Sets up bundler
run: bundle update --bundler
Expand Down
38 changes: 34 additions & 4 deletions DP3TApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@
8E81CC99241FCC7D006F2437 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E81CC98241FCC7D006F2437 /* AppDelegate.swift */; };
8E81CC9D241FCC7D006F2437 /* NSViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E81CC9C241FCC7D006F2437 /* NSViewController.swift */; };
8E81CCA2241FCC7F006F2437 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8E81CCA1241FCC7F006F2437 /* Assets.xcassets */; };
8E81CCB0241FCC7F006F2437 /* DP3TAppTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E81CCAF241FCC7F006F2437 /* DP3TAppTests.swift */; };
8E81CCB0241FCC7F006F2437 /* FakePublishManagerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E81CCAF241FCC7F006F2437 /* FakePublishManagerTests.swift */; };
8E81CCCF241FD813006F2437 /* SnapKit in Frameworks */ = {isa = PBXBuildFile; productRef = 8E81CCCE241FD813006F2437 /* SnapKit */; };
8EB23D78245AF2C30073E83A /* RandomGenerators.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8EB23D77245AF2C30073E83A /* RandomGenerators.swift */; };
A6BBA110246BFCBC00E42EE7 /* UIDevice+ScreenType.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6BBA10F246BFCBC00E42EE7 /* UIDevice+ScreenType.swift */; };
Expand Down Expand Up @@ -371,6 +371,18 @@
2485F47B2458625F00C3D8C3 /* DatabaseSyncer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DatabaseSyncer.swift; sourceTree = "<group>"; };
2485F47D2458AC9000C3D8C3 /* FakePublishManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakePublishManager.swift; sourceTree = "<group>"; };
2485F47F2459631A00C3D8C3 /* NetworkError.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkError.swift; sourceTree = "<group>"; };
24D33D902487B7FE0068E509 /* sq */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sq; path = sq.lproj/Localizable.strings; sourceTree = "<group>"; };
24D33D912487B7FE0068E509 /* sq */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sq; path = sq.lproj/InfoPlist.strings; sourceTree = "<group>"; };
24D33D922487B8140068E509 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/Localizable.strings; sourceTree = "<group>"; };
24D33D932487B8140068E509 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/InfoPlist.strings; sourceTree = "<group>"; };
24D33D942487B8590068E509 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/Localizable.strings; sourceTree = "<group>"; };
24D33D952487B8590068E509 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/InfoPlist.strings; sourceTree = "<group>"; };
24D33D9B24880D880068E509 /* sr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sr; path = sr.lproj/Localizable.strings; sourceTree = "<group>"; };
24D33D9C24880D880068E509 /* sr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sr; path = sr.lproj/InfoPlist.strings; sourceTree = "<group>"; };
24D33D9D24880D9A0068E509 /* bs */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = bs; path = bs.lproj/Localizable.strings; sourceTree = "<group>"; };
24D33D9E24880D9A0068E509 /* bs */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = bs; path = bs.lproj/InfoPlist.strings; sourceTree = "<group>"; };
24D33D9F24880F6C0068E509 /* hr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "hr"; path = "hr.lproj/Localizable.strings"; sourceTree = "<group>"; };
24D33DA024880F6C0068E509 /* hr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "hr"; path = "hr.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
24D5EF672448CAB900C197D6 /* UIStateManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIStateManager.swift; sourceTree = "<group>"; };
24D5EF692448CAE800C197D6 /* UIStateModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIStateModel.swift; sourceTree = "<group>"; };
48E967992473478100E4A5D6 /* codegen-service-t.bag.admin.ch.der */ = {isa = PBXFileReference; lastKnownFileType = file; path = "codegen-service-t.bag.admin.ch.der"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -445,7 +457,7 @@
8E81CCA1241FCC7F006F2437 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
8E81CCA6241FCC7F006F2437 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
8E81CCAB241FCC7F006F2437 /* DP3TAppTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = DP3TAppTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
8E81CCAF241FCC7F006F2437 /* DP3TAppTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DP3TAppTests.swift; sourceTree = "<group>"; };
8E81CCAF241FCC7F006F2437 /* FakePublishManagerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FakePublishManagerTests.swift; sourceTree = "<group>"; };
8E81CCB1241FCC7F006F2437 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
8EB23D77245AF2C30073E83A /* RandomGenerators.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RandomGenerators.swift; sourceTree = "<group>"; };
A6BBA10F246BFCBC00E42EE7 /* UIDevice+ScreenType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIDevice+ScreenType.swift"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -995,7 +1007,7 @@
8E81CCAE241FCC7F006F2437 /* DP3TAppTests */ = {
isa = PBXGroup;
children = (
8E81CCAF241FCC7F006F2437 /* DP3TAppTests.swift */,
8E81CCAF241FCC7F006F2437 /* FakePublishManagerTests.swift */,
8E81CCB1241FCC7F006F2437 /* Info.plist */,
);
path = DP3TAppTests;
Expand Down Expand Up @@ -1226,6 +1238,12 @@
de,
it,
Base,
sq,
es,
pt,
sr,
bs,
"hr",
);
mainGroup = 8E81CC8C241FCC7D006F2437;
packageReferences = (
Expand Down Expand Up @@ -1708,7 +1726,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8E81CCB0241FCC7F006F2437 /* DP3TAppTests.swift in Sources */,
8E81CCB0241FCC7F006F2437 /* FakePublishManagerTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -1730,6 +1748,12 @@
DC9A81A5242CE5E000AD1548 /* en */,
DC9A81A7242CE5E000AD1548 /* it */,
DC9A81A9242CE5E000AD1548 /* fr */,
24D33D902487B7FE0068E509 /* sq */,
24D33D922487B8140068E509 /* es */,
24D33D942487B8590068E509 /* pt */,
24D33D9B24880D880068E509 /* sr */,
24D33D9D24880D9A0068E509 /* bs */,
24D33D9F24880F6C0068E509 /* hr */,
);
name = Localizable.strings;
sourceTree = "<group>";
Expand All @@ -1741,6 +1765,12 @@
DC9A81A6242CE5E000AD1548 /* en */,
DC9A81A8242CE5E000AD1548 /* it */,
DC9A81AA242CE5E000AD1548 /* fr */,
24D33D912487B7FE0068E509 /* sq */,
24D33D932487B8140068E509 /* es */,
24D33D952487B8590068E509 /* pt */,
24D33D9C24880D880068E509 /* sr */,
24D33D9E24880D9A0068E509 /* bs */,
24D33DA024880F6C0068E509 /* hr */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
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": "25de2a202bba99c4f58ac9b441f6d31a8114aa0b",
"revision": "dcc2318c5a1e514dabccb2fc635ea2b7acf1524b",
"version": null
}
},
Expand Down
11 changes: 10 additions & 1 deletion DP3TApp.xcodeproj/xcshareddata/IDETemplateMacros.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@
<plist version="1.0">
<dict>
<key>FILEHEADER</key>
<string>/</string>
<string>
/*
* Copyright (c) 2020 Ubique Innovation AG &lt;https://www.ubique.ch&gt;
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*
* SPDX-License-Identifier: MPL-2.0
*/</string>
</dict>
</plist>
12 changes: 8 additions & 4 deletions DP3TApp/Logic/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
/*
* Created by Ubique Innovation AG
* https://www.ubique.ch
* Copyright (c) 2020. All rights reserved.
* Copyright (c) 2020 Ubique Innovation AG <https://www.ubique.ch>
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*
* SPDX-License-Identifier: MPL-2.0
*/

import UIKit
Expand Down Expand Up @@ -81,7 +85,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
_ = jumpToMessageIfRequired(onlyFirst: false)
}

FakePublishManager.shared.runForegroundTask()
FakePublishManager.shared.runTask()
}

func jumpToMessageIfRequired(onlyFirst: Bool) -> Bool {
Expand Down
12 changes: 9 additions & 3 deletions DP3TApp/Logic/Config/ConfigLoadOperation.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
/*
* Created by Ubique Innovation AG
* https://www.ubique.ch
* Copyright (c) 2020. All rights reserved.
* Copyright (c) 2020 Ubique Innovation AG <https://www.ubique.ch>
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*
* SPDX-License-Identifier: MPL-2.0
*/

import BackgroundTasks
Expand All @@ -12,6 +16,8 @@ class ConfigLoadOperation: Operation {
static var presentedConfigForVersion: String?

override func main() {
guard isCancelled == false else { return }

let semaphore = DispatchSemaphore(value: 0)
ConfigManager().loadConfig { config in
if let c = config, c.forceUpdate {
Expand Down
10 changes: 7 additions & 3 deletions DP3TApp/Logic/Config/ConfigManager.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
/*
* Created by Ubique Innovation AG
* https://www.ubique.ch
* Copyright (c) 2020. All rights reserved.
* Copyright (c) 2020 Ubique Innovation AG <https://www.ubique.ch>
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*
* SPDX-License-Identifier: MPL-2.0
*/

import DP3TSDK
Expand Down
10 changes: 7 additions & 3 deletions DP3TApp/Logic/Config/ConfigResponseBody.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
/*
* Created by Ubique Innovation AG
* https://www.ubique.ch
* Copyright (c) 2020. All rights reserved.
* Copyright (c) 2020 Ubique Innovation AG <https://www.ubique.ch>
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*
* SPDX-License-Identifier: MPL-2.0
*/

import UIKit
Expand Down
10 changes: 7 additions & 3 deletions DP3TApp/Logic/Helpers/DateFormatter.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
/*
* Created by Ubique Innovation AG
* https://www.ubique.ch
* Copyright (c) 2020. All rights reserved.
* Copyright (c) 2020 Ubique Innovation AG <https://www.ubique.ch>
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*
* SPDX-License-Identifier: MPL-2.0
*/

import Foundation
Expand Down
10 changes: 7 additions & 3 deletions DP3TApp/Logic/Helpers/Language.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
/*
* Created by Ubique Innovation AG
* https://www.ubique.ch
* Copyright (c) 2020. All rights reserved.
* Copyright (c) 2020 Ubique Innovation AG <https://www.ubique.ch>
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*
* SPDX-License-Identifier: MPL-2.0
*/

import Foundation
Expand Down
Loading

0 comments on commit 28ad59d

Please sign in to comment.