diff --git a/.github/workflows/distribute.yml b/.github/workflows/distribute.yml index a6c314346..2c0abef4d 100644 --- a/.github/workflows/distribute.yml +++ b/.github/workflows/distribute.yml @@ -1,21 +1,13 @@ -name: testflight +name: appstore on: push: - branches-ignore: - - '**' - -#on: -# push: -# branches: -# - master -# - release -# pull_request: -# branches: -# - master + branches: + - master + jobs: - testflight_dev: + appstore_dev: runs-on: macOS-latest steps: @@ -30,10 +22,19 @@ jobs: - name: Installs magick run: brew install imagemagick + - name: Remove current version of Pango (contains a bug) + run: brew unlink pango + + - name: Install older version of Pango + run: brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/7cf3b63be191cb2ce4cd86f4406915128ec97432/Formula/pango.rb + + - name: Use older version of Pango + run: brew switch pango 1.42.4_1 + - name: Sets up bundler run: bundle update --bundler - - name: Sign and build + - name: Build and Sign env: MATCH_GIT_URL: ${{ secrets.MATCH_GIT_URL }} MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} @@ -43,17 +44,31 @@ jobs: APP_IDENTIFIER: ${{ secrets.APP_IDENTIFIER_DEV }} FASTLANE_TEAM_ID: ${{ secrets.TEAM_ID }} BADGE_TITLE: "DEV" - run: bundle exec fastlane sign_and_build - - - name: Upload and distribution - env: - FASTLANE_USER: ${{ secrets.FASTLANE_USER }} - FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }} - REVIEW_CONTACT_EMAIL: ${{ secrets.REVIEW_CONTACT_EMAIL }} - REVIEW_CONTACT_PHONE: ${{ secrets.REVIEW_CONTACT_PHONE }} - run: bundle exec fastlane upload_and_distribute + run: bundle exec fastlane build_and_sign + + - name: SHA256 + run: shasum -a 256 build/SwissCovid.ipa + + - name: Archive ipa file + uses: actions/upload-artifact@v2 + with: + name: AppStore_DEV_SwissCovid.ipa + path: build/SwissCovid.ipa + + - name: Archive xcarchive (incl symbols) files + uses: actions/upload-artifact@v2 + with: + name: AppStore_DEV_SwissCovid.xcarchive + path: "build/SwissCovid.xcarchive" + + - name: Archive log file + uses: actions/upload-artifact@v2 + with: + name: AppStore_DEV_Build.log + path: "build/build.log" + - testflight_test: + appstore_test: runs-on: macOS-latest steps: @@ -68,10 +83,19 @@ jobs: - name: Installs magick run: brew install imagemagick + - name: Remove current version of Pango (contains a bug) + run: brew unlink pango + + - name: Install older version of Pango + run: brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/7cf3b63be191cb2ce4cd86f4406915128ec97432/Formula/pango.rb + + - name: Use older version of Pango + run: brew switch pango 1.42.4_1 + - name: Sets up bundler run: bundle update --bundler - - name: Sign and build + - name: Build and Sign env: MATCH_GIT_URL: ${{ secrets.MATCH_GIT_URL }} MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} @@ -80,18 +104,32 @@ jobs: APP_SCHEME: "Release-Test" APP_IDENTIFIER: ${{ secrets.APP_IDENTIFIER_TEST }} FASTLANE_TEAM_ID: ${{ secrets.TEAM_ID }} - BADGE_TITLE: "DEV" - run: bundle exec fastlane sign_and_build - - - name: Upload and distribution - env: - FASTLANE_USER: ${{ secrets.FASTLANE_USER }} - FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }} - REVIEW_CONTACT_EMAIL: ${{ secrets.REVIEW_CONTACT_EMAIL }} - REVIEW_CONTACT_PHONE: ${{ secrets.REVIEW_CONTACT_PHONE }} - run: bundle exec fastlane upload_and_distribute + BADGE_TITLE: "TEST" + run: bundle exec fastlane build_and_sign - testflight_abnahme: + - name: SHA256 + run: shasum -a 256 build/SwissCovid.ipa + + - name: Archive ipa file + uses: actions/upload-artifact@v2 + with: + name: AppStore_TEST_SwissCovid.ipa + path: build/SwissCovid.ipa + + - name: Archive xcarchive (incl symbols) files + uses: actions/upload-artifact@v2 + with: + name: AppStore_TEST_SwissCovid.xcarchive + path: "build/SwissCovid.xcarchive" + + - name: Archive log file + uses: actions/upload-artifact@v2 + with: + name: AppStore_TEST_Build.log + path: "build/build.log" + + + appstore_abnahme: runs-on: macOS-latest steps: @@ -106,10 +144,19 @@ jobs: - name: Installs magick run: brew install imagemagick + - name: Remove current version of Pango (contains a bug) + run: brew unlink pango + + - name: Install older version of Pango + run: brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/7cf3b63be191cb2ce4cd86f4406915128ec97432/Formula/pango.rb + + - name: Use older version of Pango + run: brew switch pango 1.42.4_1 + - name: Sets up bundler run: bundle update --bundler - - name: Sign and build + - name: Build and Sign env: MATCH_GIT_URL: ${{ secrets.MATCH_GIT_URL }} MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} @@ -119,17 +166,31 @@ jobs: APP_IDENTIFIER: ${{ secrets.APP_IDENTIFIER_ABNAHME }} FASTLANE_TEAM_ID: ${{ secrets.TEAM_ID }} BADGE_TITLE: "ABN" - run: bundle exec fastlane sign_and_build - - - name: Upload and distribution - env: - FASTLANE_USER: ${{ secrets.FASTLANE_USER }} - FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }} - REVIEW_CONTACT_EMAIL: ${{ secrets.REVIEW_CONTACT_EMAIL }} - REVIEW_CONTACT_PHONE: ${{ secrets.REVIEW_CONTACT_PHONE }} - run: bundle exec fastlane upload_and_distribute + run: bundle exec fastlane build_and_sign + + - name: SHA256 + run: shasum -a 256 build/SwissCovid.ipa - testflight_prod: + - name: Archive ipa file + uses: actions/upload-artifact@v2 + with: + name: AppStore_ABNAHME_SwissCovid.ipa + path: build/SwissCovid.ipa + + - name: Archive xcarchive (incl symbols) files + uses: actions/upload-artifact@v2 + with: + name: AppStore_ABNAHME_SwissCovid.xcarchive + path: "build/SwissCovid.xcarchive" + + - name: Archive log file + uses: actions/upload-artifact@v2 + with: + name: AppStore_ABNAHME_Build.log + path: "build/build.log" + + + appstore_prod: runs-on: macOS-latest steps: @@ -141,7 +202,7 @@ jobs: - name: Sets up bundler run: bundle update --bundler - - name: Sign and build + - name: Build and Sign env: MATCH_GIT_URL: ${{ secrets.MATCH_GIT_URL }} MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} @@ -152,16 +213,25 @@ jobs: FASTLANE_TEAM_ID: ${{ secrets.TEAM_ID }} SKIP_ADD_BADGE: true BADGE_TITLE: "" - run: bundle exec fastlane sign_and_build + run: bundle exec fastlane build_and_sign + + - name: SHA256 + run: shasum -a 256 build/SwissCovid.ipa - name: Archive ipa file - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v2 + with: + name: AppStore_PROD_SwissCovid.ipa + path: build/SwissCovid.ipa + + - name: Archive xcarchive (incl symbols) files + uses: actions/upload-artifact@v2 with: - name: dp3t.ipa - path: "DP3TApp.ipa" + name: AppStore_PROD_SwissCovid.xcarchive + path: "build/SwissCovid.xcarchive" - - name: Archive dSYM files - uses: actions/upload-artifact@v1 + - name: Archive log file + uses: actions/upload-artifact@v2 with: - name: dp3t_dSYMs.zip - path: "DP3TApp.app.dSYM.zip" + name: AppStore_PROD_Build.log + path: "build/build.log" diff --git a/DP3TApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DP3TApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 2d9416abd..5317a76c4 100644 --- a/DP3TApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DP3TApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -33,7 +33,7 @@ "repositoryURL": "https://github.com/DP-3T/dp3t-sdk-ios.git", "state": { "branch": "develop", - "revision": "818bb6f6febfa2297820b15d824246ac778669a5", + "revision": "fcb11aa6d9cd10b6188e2d2838ba1e16eaea5450", "version": null } }, diff --git a/DP3TApp/Logic/Tracing/DatabaseSyncer.swift b/DP3TApp/Logic/Tracing/DatabaseSyncer.swift index 0fdf3e6b3..2e2230a9b 100644 --- a/DP3TApp/Logic/Tracing/DatabaseSyncer.swift +++ b/DP3TApp/Logic/Tracing/DatabaseSyncer.swift @@ -9,7 +9,7 @@ */ import Foundation - +import ExposureNotification import DP3TSDK class DatabaseSyncer { @@ -81,6 +81,7 @@ class DatabaseSyncer { UIStateManager.shared.lastSyncErrorTime = Date() switch wrappedError { case let .networkSessionError(netErr as NSError) where netErr.code == -999 && netErr.domain == NSURLErrorDomain: + // Certificate error UIStateManager.shared.immediatelyShowSyncError = false UIStateManager.shared.syncErrorIsNetworkError = true case let .HTTPFailureResponse(status: status) where status == 502 || status == 503: @@ -91,11 +92,16 @@ class DatabaseSyncer { UIStateManager.shared.immediatelyShowSyncError = false UIStateManager.shared.syncErrorIsNetworkError = true case .timeInconsistency: + UIStateManager.shared.immediatelyShowSyncError = true UIStateManager.shared.hasTimeInconsistencyError = true + UIStateManager.shared.syncErrorIsNetworkError = false default: UIStateManager.shared.immediatelyShowSyncError = true UIStateManager.shared.syncErrorIsNetworkError = false } + case let .exposureNotificationError(error: expError as ENError) where expError.code == ENError.Code.rateLimited: + // never show the ratelimit error to the user + UIStateManager.shared.syncError = nil case .cancelled: // background task got cancelled, dont show error immediately UIStateManager.shared.immediatelyShowSyncError = false @@ -120,6 +126,8 @@ class DatabaseSyncer { UIStateManager.shared.lastSyncErrorTime = nil UIStateManager.shared.hasTimeInconsistencyError = false UIStateManager.shared.immediatelyShowSyncError = false + UIStateManager.shared.syncErrorIsNetworkError = false + UIStateManager.shared.syncError = nil } // wait another 2 days befor warning diff --git a/DP3TApp/Logic/Tracing/UIState/Errors+Localized.swift b/DP3TApp/Logic/Tracing/UIState/Errors+Localized.swift index 7bab283b2..cc81cec03 100644 --- a/DP3TApp/Logic/Tracing/UIState/Errors+Localized.swift +++ b/DP3TApp/Logic/Tracing/UIState/Errors+Localized.swift @@ -14,10 +14,20 @@ import DP3TSDK /// Only CodedError should be used in the UI and UI State /// All errors that are generated by the SDK or the app should conform to this protocol protocol CodedError: Error { + var errorTitle: String? { get } var errorCodeString: String? { get } } extension DP3TTracingError: LocalizedError, CodedError { + var errorTitle: String? { + switch self { + case let .networkingError(error: wrapped): + return wrapped.errorTitle + default: + return nil + } + } + public var errorDescription: String? { let unexpected = "unexpected_error_title".ub_localized switch self { @@ -67,6 +77,15 @@ extension DP3TTracingError: LocalizedError, CodedError { } extension DP3TNetworkingError: LocalizedError, CodedError { + var errorTitle: String? { + switch self { + case .timeInconsistency: + return "time_inconsistency_title".ub_localized + default: + return nil + } + } + public var errorDescription: String? { switch self { case let .networkSessionError(error: error): @@ -76,13 +95,14 @@ extension DP3TNetworkingError: LocalizedError, CodedError { } return "network_error".ub_localized + case .timeInconsistency: + return "time_inconsistency_text".ub_localized case .notHTTPResponse: fallthrough case .HTTPFailureResponse: fallthrough case .noDataReturned: fallthrough case .couldNotParseData: fallthrough case .couldNotEncodeBody: fallthrough case .batchReleaseTimeMissmatch: fallthrough - case .timeInconsistency: fallthrough case .jwtSignatureError: return "unexpected_error_title".ub_localized } @@ -114,6 +134,10 @@ extension DP3TNetworkingError: LocalizedError, CodedError { } extension NetworkError: LocalizedError, CodedError { + var errorTitle: String? { + nil + } + var errorDescription: String? { switch self { case .networkError: @@ -144,6 +168,10 @@ extension NetworkError: LocalizedError, CodedError { /// Since we only want to pass CodedErrors through the app /// We wrap everything that should not happen enum UnexpectedThrownError: LocalizedError, CodedError { + var errorTitle: String? { + nil + } + case startTracing(error: Error) var errorDescription: String? { @@ -160,6 +188,10 @@ enum UnexpectedThrownError: LocalizedError, CodedError { } extension CertificateValidationError: LocalizedError, CodedError { + var errorTitle: String? { + nil + } + var errorDescription: String? { return "certificate_validation_error".ub_localized } diff --git a/DP3TApp/Logic/Tracing/UIState/UIStateLogic.swift b/DP3TApp/Logic/Tracing/UIState/UIStateLogic.swift index f1a538eed..c3561836a 100644 --- a/DP3TApp/Logic/Tracing/UIState/UIStateLogic.swift +++ b/DP3TApp/Logic/Tracing/UIState/UIStateLogic.swift @@ -122,6 +122,7 @@ class UIStateLogic { } if let codedError = UIStateManager.shared.syncError, let errorCode = codedError.errorCodeString { if manager.immediatelyShowSyncError { + newState.homescreen.meldungen.errorTitle = codedError.errorTitle newState.homescreen.meldungen.errorMessage = codedError.localizedDescription } else { newState.homescreen.meldungen.errorMessage = "homescreen_meldung_data_outdated_text".ub_localized @@ -142,6 +143,7 @@ class UIStateLogic { last.timeIntervalSince(first) > manager.syncProblemInterval { newState.homescreen.meldungen.syncProblemNetworkingError = true if let codedError = UIStateManager.shared.syncError { + newState.homescreen.meldungen.errorTitle = codedError.errorTitle newState.homescreen.meldungen.errorMessage = codedError.localizedDescription #if ENABLE_VERBOSE diff --git a/DP3TApp/Logic/Tracing/UIState/UIStateModel.swift b/DP3TApp/Logic/Tracing/UIState/UIStateModel.swift index e67749e7a..6147d41c2 100644 --- a/DP3TApp/Logic/Tracing/UIState/UIStateModel.swift +++ b/DP3TApp/Logic/Tracing/UIState/UIStateModel.swift @@ -48,6 +48,7 @@ struct UIStateModel: Equatable { var syncProblemOtherError: Bool = false var canRetrySyncError: Bool = true var backgroundUpdateProblem: Bool = false + var errorTitle: String? var errorCode: String? var errorMessage: String? } diff --git a/DP3TApp/Screens/Homescreen/Homescreen/Meldung/NSMeldungModuleView.swift b/DP3TApp/Screens/Homescreen/Homescreen/Meldung/NSMeldungModuleView.swift index bd168c207..76bf19c4c 100644 --- a/DP3TApp/Screens/Homescreen/Homescreen/Meldung/NSMeldungModuleView.swift +++ b/DP3TApp/Screens/Homescreen/Homescreen/Meldung/NSMeldungModuleView.swift @@ -79,6 +79,7 @@ class NSMeldungView: NSModuleBaseView { views.append(noPushView) } else if uiState.syncProblemOtherError { if uiState.canRetrySyncError { + unexpectedErrorWithRetryView.model?.title = uiState.errorTitle ?? "unexpected_error_title".ub_localized unexpectedErrorWithRetryView.model?.text = uiState.errorMessage ?? "unexpected_error_title".ub_localized unexpectedErrorWithRetryView.errorCode = uiState.errorCode views.append(unexpectedErrorWithRetryView) diff --git a/DP3TApp/Screens/Onboarding/NSOnboardingStepModel.swift b/DP3TApp/Screens/Onboarding/NSOnboardingStepModel.swift index 1c470c113..ff1fc683f 100644 --- a/DP3TApp/Screens/Onboarding/NSOnboardingStepModel.swift +++ b/DP3TApp/Screens/Onboarding/NSOnboardingStepModel.swift @@ -19,15 +19,6 @@ struct NSOnboardingStepModel { // MARK: - Factory - static let step0 = NSOnboardingStepModel(heading: "onboarding_legal_heading".ub_localized, - headingColor: .ns_blue, - foregroundImage: UIImage(named: "onboarding-outro")!, - title: "onboarding_legal_title".ub_localized, - textGroups: [ - (UIImage(named: "ic-error")!, "onboarding_legal_text1".ub_localized), - (UIImage(named: "ic-error")!, "onboarding_legal_text2".ub_localized), - ]) - static let step1 = NSOnboardingStepModel(heading: "onboarding_prinzip_heading".ub_localized, headingColor: .ns_blue, foregroundImage: UIImage(named: "onboarding-prinzip")!, @@ -55,7 +46,7 @@ struct NSOnboardingStepModel { (UIImage(named: "ic-bt")!, "onboarding_begegnungen_text2".ub_localized), ]) - static let step5 = NSOnboardingStepModel(heading: "onboarding_meldung_heading".ub_localized, + static let step6 = NSOnboardingStepModel(heading: "onboarding_meldung_heading".ub_localized, headingColor: .ns_blue, foregroundImage: UIImage(named: "onboarding-meldung")!, title: "onboarding_meldung_title".ub_localized, diff --git a/DP3TApp/Screens/Onboarding/NSOnboardingViewController.swift b/DP3TApp/Screens/Onboarding/NSOnboardingViewController.swift index 92715dcca..73919302e 100644 --- a/DP3TApp/Screens/Onboarding/NSOnboardingViewController.swift +++ b/DP3TApp/Screens/Onboarding/NSOnboardingViewController.swift @@ -17,33 +17,33 @@ class NSOnboardingViewController: NSViewController { private let splashVC = NSSplashViewController() - private let step0VC = NSOnboardingStepViewController(model: NSOnboardingStepModel.step0) private let step1VC = NSOnboardingStepViewController(model: NSOnboardingStepModel.step1) private let step2VC = NSOnboardingStepViewController(model: NSOnboardingStepModel.step2) private let step3VC = NSOnboardingStepViewController(model: NSOnboardingStepModel.step3) - private let step4VC = NSOnboardingPermissionsViewController(type: .gapple) - private let step5VC = NSOnboardingStepViewController(model: NSOnboardingStepModel.step5) - private let step6VC = NSOnboardingPermissionsViewController(type: .push) - private let step7VC = NSOnboardingFinishViewController() + private let step4VC = NSOnboardingDisclaimerViewController() + private let step5VC = NSOnboardingPermissionsViewController(type: .gapple) + private let step6VC = NSOnboardingStepViewController(model: NSOnboardingStepModel.step6) + private let step7VC = NSOnboardingPermissionsViewController(type: .push) + private let step8VC = NSOnboardingFinishViewController() private var stepViewControllers: [NSOnboardingContentViewController] { - [step0VC, step1VC, step2VC, step3VC, step4VC, step5VC, step6VC, step7VC] - } - - private var legalStepIndex: Int { - return stepViewControllers.firstIndex(of: step0VC)! + [step1VC, step2VC, step3VC, step4VC, step5VC, step6VC, step7VC, step8VC] } private var tracingPermissionStepIndex: Int { - return stepViewControllers.firstIndex(of: step4VC)! + return stepViewControllers.firstIndex(of: step5VC)! } private var pushPermissionStepIndex: Int { - return stepViewControllers.firstIndex(of: step6VC)! + return stepViewControllers.firstIndex(of: step7VC)! + } + + private var disclaimerStepIndex: Int { + return stepViewControllers.firstIndex(of: step4VC)! } private var finalStepIndex: Int { - return stepViewControllers.firstIndex(of: step7VC)! + return stepViewControllers.firstIndex(of: step8VC)! } private var stepsWithoutContinue: [Int] { @@ -56,21 +56,18 @@ class NSOnboardingViewController: NSViewController { private var currentStep: Int = 0 - @UBOptionalUserDefault(key: "isPilotUser") - private(set) var isPilotUser: Bool? - override func viewDidLoad() { super.viewDidLoad() setupButtons() - step4VC.permissionButton.touchUpCallback = { [weak self] in + step5VC.permissionButton.touchUpCallback = { [weak self] in TracingManager.shared.requestTracingPermission { _ in self?.animateToNextStep() } } - step6VC.permissionButton.touchUpCallback = { + step7VC.permissionButton.touchUpCallback = { UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .badge, .sound]) { _, _ in DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { @@ -79,7 +76,7 @@ class NSOnboardingViewController: NSViewController { } } - step7VC.finishButton.touchUpCallback = finishAnimation + step8VC.finishButton.touchUpCallback = finishAnimation setupSwipeRecognizers() addStepViewControllers() @@ -106,8 +103,6 @@ class NSOnboardingViewController: NSViewController { UIView.animate(withDuration: 0.5) { self.splashVC.view.alpha = 0 } - - self.showLegalBlockerIfRequired() } } @@ -125,6 +120,8 @@ class NSOnboardingViewController: NSViewController { showContinueButton() } + continueButton.title = stepViewControllers[step].continueButtonText + if isLast { finishButton.alpha = 0 finishButton.transform = CGAffineTransform(translationX: 300, y: 0) @@ -178,6 +175,9 @@ class NSOnboardingViewController: NSViewController { private func showContinueButton() { UIView.animate(withDuration: 0.5, delay: 0, options: .beginFromCurrentState, animations: { self.continueContainer.transform = .identity + if self.currentStep != 0 { + self.view.bringSubviewToFront(self.continueContainer) + } }, completion: nil) } @@ -218,33 +218,8 @@ class NSOnboardingViewController: NSViewController { continueButton.contentEdgeInsets = UIEdgeInsets(top: NSPadding.medium, left: 2 * NSPadding.large, bottom: NSPadding.medium, right: 2 * NSPadding.large) continueButton.touchUpCallback = { [weak self] in guard let self = self else { return } - if self.currentStep == self.legalStepIndex { - self.showLegalPopup() - } else { - self.setOnboardingStep(self.currentStep + 1, animated: true) - } - } - } - - private func showLegalPopup() { - let alert = UIAlertController(title: "onboarding_legal_alert_title".ub_localized, message: "onboarding_legal_alert_message".ub_localized, preferredStyle: .alert) - alert.addAction(UIAlertAction(title: "onboarding_legal_alert_no".ub_localized, style: .cancel, handler: { [weak self] _ in - guard let self = self else { return } - self.isPilotUser = false - self.showLegalBlockerIfRequired() - })) - alert.addAction(UIAlertAction(title: "onboarding_legal_alert_yes".ub_localized, style: .default, handler: { [weak self] _ in - guard let self = self else { return } - self.isPilotUser = true self.setOnboardingStep(self.currentStep + 1, animated: true) - })) - present(alert, animated: true, completion: nil) - } - - private func showLegalBlockerIfRequired() { - guard isPilotUser == false else { return } - let alert = UIAlertController(title: "onboarding_legal_blocker_title".ub_localized, message: "onboarding_legal_blocker_message".ub_localized, preferredStyle: .alert) - present(alert, animated: true, completion: nil) + } } override func viewSafeAreaInsetsDidChange() { @@ -291,13 +266,11 @@ class NSOnboardingViewController: NSViewController { if currentStep == finalStepIndex { // Completely disable swipe on last screen return } - if currentStep == legalStepIndex { // Disaple swipe on permission screen - return - } switch recognizer.direction { case .left: - if currentStep == pushPermissionStepIndex || currentStep == tracingPermissionStepIndex { // Disable swipe forward on permission screens + if [pushPermissionStepIndex, tracingPermissionStepIndex, disclaimerStepIndex].contains(currentStep) { + // Disable swipe forward on permission screens return } setOnboardingStep(currentStep + 1, animated: true) @@ -305,9 +278,6 @@ class NSOnboardingViewController: NSViewController { if currentStep == pushPermissionStepIndex + 1 || currentStep == tracingPermissionStepIndex + 1 { // Disable swipe back to permission screens return } - if currentStep == legalStepIndex + 1 { // Disable swipe back to legal screen - return - } setOnboardingStep(currentStep - 1, animated: true) default: break diff --git a/DP3TApp/Supporting Files/Info.plist b/DP3TApp/Supporting Files/Info.plist index 6f8844dd8..fb84b24a1 100644 --- a/DP3TApp/Supporting Files/Info.plist +++ b/DP3TApp/Supporting Files/Info.plist @@ -19,7 +19,7 @@ CFBundlePackageType $(PRODUCT_BUNDLE_PACKAGE_TYPE) CFBundleShortVersionString - 1.0.4 + 1.0.5 CFBundleVersion $(CURRENT_PROJECT_VERSION) ITSAppUsesNonExemptEncryption diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 7468dae09..a58921e63 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -2,8 +2,8 @@ opt_out_usage default_platform(:ios) platform :ios do - desc "Sets up signing" - lane :sign_and_build do + desc "Build and Sign app" + lane :build_and_sign do create_keychain( name: "githubactionci", @@ -28,40 +28,19 @@ platform :ios do ) build_number = getCustomBundleVersion() - - add_badge(shield: ENV["BADGE_TITLE"]+"-blue", no_badge: true) unless ENV["SKIP_ADD_BADGE"] - - increment_build_number( - build_number: build_number - ) + add_badge(shield: ENV["BADGE_TITLE"]+ "-" + ENV['GITHUB_RUN_NUMBER'] + "-167cff", no_badge: true) unless ENV["SKIP_ADD_BADGE"] build_app( - scheme: ENV["APP_SCHEME"] - ) - end - - desc "Push a new build to Testflight" - lane :upload_and_distribute do - - gitlog = changelog_from_git_commits(commits_count: 10, pretty: "• %s", merge_commit_filtering: 'exclude_merges') - branch_name = ENV["GITHUB_REF"] || "unknown" - changelog = "Branch: " + branch_name + "\n" + gitlog - - pilot( - ipa: ENV["IPA_OUTPUT_PATH"], - changelog: changelog, - groups: ["Ubique Internal"], - beta_app_review_info: { - contact_email: ENV["REVIEW_CONTACT_EMAIL"], - contact_first_name: "Nicolas", - contact_last_name: "Maerki", - contact_phone: ENV["REVIEW_CONTACT_PHONE"] - } + scheme: ENV["APP_SCHEME"], + output_directory: "build/", + output_name: "SwissCovid.ipa", + archive_path: "build/SwissCovid.xcarchive", + buildlog_path: "build/build.log", + xcargs: "BUILD_NUMBER=#{build_number}" ) end def getCustomBundleVersion() - # Produces Unique Build Numbers using current timestamp datestring_now = DateTime.now.strftime('%y%m%d.%H%M') bundle_version = "#{datestring_now}.#{ENV['GITHUB_RUN_NUMBER']}" return bundle_version