From 59e0a68da55af6266301aa43cdeb6a2eab062928 Mon Sep 17 00:00:00 2001 From: Lukas Korba Date: Thu, 10 Aug 2023 08:20:31 +0200 Subject: [PATCH] [#747] CrashReporterClient as isolated package (#799) - CrashReporter is now an independent module - all crash reporter TODOs removed - the crash reporter code commented out is now back in action - package.resolved file updated - adopted latest SDK - test crash reporter added back to debug menu - typo in comments fixed --- modules/Package.resolved | 345 ++++++++++++++++++ modules/Package.swift | 16 +- .../CrashReporterInterface.swift | 32 ++ .../CrashReporter/CrashReporterLiveKey.swift | 43 +++ .../CrashReporter/CrashReporterTestKey.swift | 27 ++ modules/Sources/Features/Root/RootDebug.swift | 3 +- .../Features/Root/RootInitialization.swift | 7 +- modules/Sources/Features/Root/RootStore.swift | 4 +- modules/Sources/Features/Root/RootView.swift | 4 + .../Features/Settings/SettingsStore.swift | 15 +- modules/Sources/Generated/L10n.swift | 2 + .../Generated/Resources/Localizable.strings | 1 + .../xcshareddata/swiftpm/Package.resolved | 92 ++++- ...PhraseValidationFlowFeatureFlagTests.swift | 1 + .../RootTests/AppInitializationTests.swift | 3 + 15 files changed, 576 insertions(+), 19 deletions(-) create mode 100644 modules/Package.resolved create mode 100644 modules/Sources/Dependencies/CrashReporter/CrashReporterInterface.swift create mode 100644 modules/Sources/Dependencies/CrashReporter/CrashReporterLiveKey.swift create mode 100644 modules/Sources/Dependencies/CrashReporter/CrashReporterTestKey.swift diff --git a/modules/Package.resolved b/modules/Package.resolved new file mode 100644 index 00000000..6fa6c4d9 --- /dev/null +++ b/modules/Package.resolved @@ -0,0 +1,345 @@ +{ + "pins" : [ + { + "identity" : "abseil-cpp-binary", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/abseil-cpp-binary.git", + "state" : { + "revision" : "bfc0b6f81adc06ce5121eb23f628473638d67c5c", + "version" : "1.2022062300.0" + } + }, + { + "identity" : "combine-schedulers", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/combine-schedulers", + "state" : { + "revision" : "ec62f32d21584214a4b27c8cee2b2ad70ab2c38a", + "version" : "0.11.0" + } + }, + { + "identity" : "firebase-ios-sdk", + "kind" : "remoteSourceControl", + "location" : "https://github.com/firebase/firebase-ios-sdk", + "state" : { + "revision" : "df2171b0c6afb9e9d4f7e07669d558c510b9f6be", + "version" : "10.13.0" + } + }, + { + "identity" : "googleappmeasurement", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/GoogleAppMeasurement.git", + "state" : { + "revision" : "03b9beee1a61f62d32c521e172e192a1663a5e8b", + "version" : "10.13.0" + } + }, + { + "identity" : "googledatatransport", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/GoogleDataTransport.git", + "state" : { + "revision" : "aae45a320fd0d11811820335b1eabc8753902a40", + "version" : "9.2.5" + } + }, + { + "identity" : "googleutilities", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/GoogleUtilities.git", + "state" : { + "revision" : "c38ce365d77b04a9a300c31061c5227589e5597b", + "version" : "7.11.5" + } + }, + { + "identity" : "grpc-binary", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/grpc-binary.git", + "state" : { + "revision" : "f1b366129d1125be7db83247e003fc333104b569", + "version" : "1.50.2" + } + }, + { + "identity" : "grpc-swift", + "kind" : "remoteSourceControl", + "location" : "https://github.com/grpc/grpc-swift.git", + "state" : { + "revision" : "0970e57cd2c196cf31eec55417b76b30caca1f35", + "version" : "1.18.0" + } + }, + { + "identity" : "gtm-session-fetcher", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/gtm-session-fetcher.git", + "state" : { + "revision" : "d415594121c9e8a4f9d79cecee0965cf35e74dbd", + "version" : "3.1.1" + } + }, + { + "identity" : "leveldb", + "kind" : "remoteSourceControl", + "location" : "https://github.com/firebase/leveldb.git", + "state" : { + "revision" : "0706abcc6b0bd9cedfbb015ba840e4a780b5159b", + "version" : "1.22.2" + } + }, + { + "identity" : "mnemonicswift", + "kind" : "remoteSourceControl", + "location" : "https://github.com/zcash-hackworks/MnemonicSwift", + "state" : { + "revision" : "716a2c32ac2bbd8a1499ac834077df42b75edc85", + "version" : "2.2.4" + } + }, + { + "identity" : "nanopb", + "kind" : "remoteSourceControl", + "location" : "https://github.com/firebase/nanopb.git", + "state" : { + "revision" : "819d0a2173aff699fb8c364b6fb906f7cdb1a692", + "version" : "2.30909.0" + } + }, + { + "identity" : "promises", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/promises.git", + "state" : { + "revision" : "e70e889c0196c76d22759eb50d6a0270ca9f1d9e", + "version" : "2.3.1" + } + }, + { + "identity" : "sqlite.swift", + "kind" : "remoteSourceControl", + "location" : "https://github.com/stephencelis/SQLite.swift.git", + "state" : { + "revision" : "7a2e3cd27de56f6d396e84f63beefd0267b55ccb", + "version" : "0.14.1" + } + }, + { + "identity" : "swift-atomics", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-atomics.git", + "state" : { + "revision" : "6c89474e62719ddcc1e9614989fff2f68208fe10", + "version" : "1.1.0" + } + }, + { + "identity" : "swift-case-paths", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swift-case-paths", + "state" : { + "revision" : "fc45e7b2cfece9dd80b5a45e6469ffe67fe67984", + "version" : "0.14.1" + } + }, + { + "identity" : "swift-clocks", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swift-clocks", + "state" : { + "revision" : "0fbaebfc013715dab44d715a4d350ba37f297e4d", + "version" : "0.4.0" + } + }, + { + "identity" : "swift-collections", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-collections", + "state" : { + "revision" : "937e904258d22af6e447a0b72c0bc67583ef64a2", + "version" : "1.0.4" + } + }, + { + "identity" : "swift-composable-architecture", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swift-composable-architecture", + "state" : { + "revision" : "4cf2104cf14d57ec3dfb8cbd90d29f2b81a32028", + "version" : "0.58.0" + } + }, + { + "identity" : "swift-concurrency-extras", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swift-concurrency-extras", + "state" : { + "revision" : "479750bd98fac2e813fffcf2af0728b5b0085795", + "version" : "0.1.1" + } + }, + { + "identity" : "swift-crypto", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-crypto.git", + "state" : { + "revision" : "60f13f60c4d093691934dc6cfdf5f508ada1f894", + "version" : "2.6.0" + } + }, + { + "identity" : "swift-custom-dump", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swift-custom-dump", + "state" : { + "revision" : "4a87bb75be70c983a9548597e8783236feb3401e", + "version" : "0.11.1" + } + }, + { + "identity" : "swift-dependencies", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swift-dependencies", + "state" : { + "revision" : "16fd42ae04c6e7f74a6a86395d04722c641cccee", + "version" : "0.6.0" + } + }, + { + "identity" : "swift-identified-collections", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swift-identified-collections", + "state" : { + "revision" : "d01446a78fb768adc9a78cbb6df07767c8ccfc29", + "version" : "0.8.0" + } + }, + { + "identity" : "swift-log", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-log.git", + "state" : { + "revision" : "32e8d724467f8fe623624570367e3d50c5638e46", + "version" : "1.5.2" + } + }, + { + "identity" : "swift-nio", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-nio.git", + "state" : { + "revision" : "a2e487b77f17edbce9a65f2b7415f2f479dc8e48", + "version" : "2.57.0" + } + }, + { + "identity" : "swift-nio-extras", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-nio-extras.git", + "state" : { + "revision" : "0e0d0aab665ff1a0659ce75ac003081f2b1c8997", + "version" : "1.19.0" + } + }, + { + "identity" : "swift-nio-http2", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-nio-http2.git", + "state" : { + "revision" : "a8ccf13fa62775277a5d56844878c828bbb3be1a", + "version" : "1.27.0" + } + }, + { + "identity" : "swift-nio-ssl", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-nio-ssl.git", + "state" : { + "revision" : "e866a626e105042a6a72a870c88b4c531ba05f83", + "version" : "2.24.0" + } + }, + { + "identity" : "swift-nio-transport-services", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-nio-transport-services.git", + "state" : { + "revision" : "41f4098903878418537020075a4d8a6e20a0b182", + "version" : "1.17.0" + } + }, + { + "identity" : "swift-parsing", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swift-parsing", + "state" : { + "revision" : "27c941bbd22a4bbc53005a15a0440443fd892f70", + "version" : "0.12.1" + } + }, + { + "identity" : "swift-protobuf", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-protobuf.git", + "state" : { + "revision" : "ce20dc083ee485524b802669890291c0d8090170", + "version" : "1.22.1" + } + }, + { + "identity" : "swift-url-routing", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swift-url-routing", + "state" : { + "revision" : "2f4f0404b3de0a0711feb7190f724d8a80bc1cfd", + "version" : "0.5.0" + } + }, + { + "identity" : "swiftgenplugin", + "kind" : "remoteSourceControl", + "location" : "https://github.com/SwiftGen/SwiftGenPlugin", + "state" : { + "revision" : "879b85a470cacd70c19e22eb7e11a3aed66f4068", + "version" : "6.6.2" + } + }, + { + "identity" : "swiftui-navigation", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swiftui-navigation", + "state" : { + "revision" : "2aa885e719087ee19df251c08a5980ad3e787f12", + "version" : "0.8.0" + } + }, + { + "identity" : "xctest-dynamic-overlay", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/xctest-dynamic-overlay", + "state" : { + "revision" : "50843cbb8551db836adec2290bb4bc6bac5c1865", + "version" : "0.9.0" + } + }, + { + "identity" : "zcash-light-client-ffi", + "kind" : "remoteSourceControl", + "location" : "https://github.com/zcash-hackworks/zcash-light-client-ffi", + "state" : { + "revision" : "7718b764027c2a4b9f654ed0b712b87ce881348f" + } + }, + { + "identity" : "zcashlightclientkit", + "kind" : "remoteSourceControl", + "location" : "https://github.com/zcash/ZcashLightClientKit", + "state" : { + "revision" : "4d95f2cb9df23be534540b569597df8bd16717a6" + } + } + ], + "version" : 2 +} diff --git a/modules/Package.swift b/modules/Package.swift index 636f45ad..9e4a2128 100644 --- a/modules/Package.swift +++ b/modules/Package.swift @@ -14,6 +14,7 @@ let package = Package( .library(name: "AudioServices", targets: ["AudioServices"]), .library(name: "BalanceBreakdown", targets: ["BalanceBreakdown"]), .library(name: "CaptureDevice", targets: ["CaptureDevice"]), + .library(name: "CrashReporter", targets: ["CrashReporter"]), .library(name: "DatabaseFiles", targets: ["DatabaseFiles"]), .library(name: "Date", targets: ["Date"]), .library(name: "Deeplink", targets: ["Deeplink"]), @@ -60,8 +61,9 @@ let package = Package( .package(url: "https://github.com/pointfreeco/swift-case-paths", from: "0.14.1"), .package(url: "https://github.com/pointfreeco/swift-url-routing", from: "0.5.0"), .package(url: "https://github.com/SwiftGen/SwiftGenPlugin", from: "6.6.0"), - .package(url: "https://github.com/zcash/ZcashLightClientKit", revision: "b9524ae1abfa54bbcaac802dbccb9e4eecc847cc"), - .package(url: "https://github.com/zcash-hackworks/MnemonicSwift", from: "2.2.4") + .package(url: "https://github.com/zcash-hackworks/MnemonicSwift", from: "2.2.4"), + .package(url: "https://github.com/zcash/ZcashLightClientKit", revision: "4d95f2cb9df23be534540b569597df8bd16717a6"), + .package(url: "https://github.com/firebase/firebase-ios-sdk", from: "10.11.0") ], targets: [ .target( @@ -113,6 +115,14 @@ let package = Package( ], path: "Sources/Dependencies/CaptureDevice" ), + .target( + name: "CrashReporter", + dependencies: [ + .product(name: "ComposableArchitecture", package: "swift-composable-architecture"), + .product(name: "FirebaseCrashlytics", package: "firebase-ios-sdk") + ], + path: "Sources/Dependencies/CrashReporter" + ), .target( name: "DatabaseFiles", dependencies: [ @@ -338,6 +348,7 @@ let package = Package( .target( name: "Root", dependencies: [ + "CrashReporter", "DatabaseFiles", "Deeplink", "DerivationTool", @@ -429,6 +440,7 @@ let package = Package( name: "Settings", dependencies: [ "AppVersion", + "CrashReporter", "ExportLogs", "Generated", "LocalAuthenticationHandler", diff --git a/modules/Sources/Dependencies/CrashReporter/CrashReporterInterface.swift b/modules/Sources/Dependencies/CrashReporter/CrashReporterInterface.swift new file mode 100644 index 00000000..7abe380a --- /dev/null +++ b/modules/Sources/Dependencies/CrashReporter/CrashReporterInterface.swift @@ -0,0 +1,32 @@ +// +// CrashReporterInterface.swift +// secant-testnet +// +// Created by Francisco Gindre on 2/2/23. +// + +import ComposableArchitecture +import Foundation + +extension DependencyValues { + public var crashReporter: CrashReporterClient { + get { self[CrashReporterClient.self] } + set { self[CrashReporterClient.self] = newValue } + } +} + +public struct CrashReporterClient { + /// Configures the crash reporter if possible. + /// if it can't be configured this will fail silently + public var configure: (Bool) -> Void + + /// this will test the crash reporter + /// - Note: depending of the crash reporter this may or may not crash your app. + public var testCrash: () -> Void + + /// this will tell the crash reporter that the user has decided to opt-in crash reporting + public var optIn: () -> Void + + /// this will tell the crash reporter that the user has decided to opt-out of crash reporting + public var optOut: () -> Void +} diff --git a/modules/Sources/Dependencies/CrashReporter/CrashReporterLiveKey.swift b/modules/Sources/Dependencies/CrashReporter/CrashReporterLiveKey.swift new file mode 100644 index 00000000..c6c6b664 --- /dev/null +++ b/modules/Sources/Dependencies/CrashReporter/CrashReporterLiveKey.swift @@ -0,0 +1,43 @@ +// +// CrashReporterLiveKey.swift +// secant-testnet +// +// Created by Francisco Gindre on 2/2/23. +// + +import ComposableArchitecture +import Foundation +import Firebase +import FirebaseCrashlytics + +extension CrashReporterClient: DependencyKey { + public static let liveValue = CrashReporterClient( + configure: { canConfigure in + let fileName = "GoogleService-Info.plist" + + // checks whether the crash reporter's config file is a dummy_file purposedly placed by the build job or the real one. + // this does not check the integrity of the Plist file for Firebase. + // that's a problem for the library itself. + guard + let configFile = Bundle.main.url(forResource: fileName, withExtension: nil), + let properties = NSDictionary(contentsOf: configFile), + properties["IS_DUMMY_FILE"] == nil, + canConfigure + else { + return + } + + FirebaseApp.configure() + Crashlytics.crashlytics().setCrashlyticsCollectionEnabled(true) + }, + testCrash: { + fatalError("Crash was triggered to test the crash reporter") + }, + optIn: { + Crashlytics.crashlytics().setCrashlyticsCollectionEnabled(true) + }, + optOut: { + Crashlytics.crashlytics().setCrashlyticsCollectionEnabled(false) + } + ) +} diff --git a/modules/Sources/Dependencies/CrashReporter/CrashReporterTestKey.swift b/modules/Sources/Dependencies/CrashReporter/CrashReporterTestKey.swift new file mode 100644 index 00000000..98b3cdd1 --- /dev/null +++ b/modules/Sources/Dependencies/CrashReporter/CrashReporterTestKey.swift @@ -0,0 +1,27 @@ +// +// CrashReporterTestKey.swift +// secant-testnet +// +// Created by Francisco Gindre on 2/2/23. +// + +import ComposableArchitecture +import XCTestDynamicOverlay + +extension CrashReporterClient: TestDependencyKey { + public static let testValue = Self( + configure: XCTUnimplemented("\(Self.self).configure"), + testCrash: XCTUnimplemented("\(Self.self).testCrash"), + optIn: XCTUnimplemented("\(Self.self).optIn"), + optOut: XCTUnimplemented("\(Self.self).optOut") + ) +} + +extension CrashReporterClient { + public static let noOp = Self( + configure: { _ in }, + testCrash: { }, + optIn: { }, + optOut: { } + ) +} diff --git a/modules/Sources/Features/Root/RootDebug.swift b/modules/Sources/Features/Root/RootDebug.swift index 5459d5f2..f3659714 100644 --- a/modules/Sources/Features/Root/RootDebug.swift +++ b/modules/Sources/Features/Root/RootDebug.swift @@ -38,8 +38,7 @@ extension RootReducer { Reduce { state, action in switch action { case .debug(.testCrashReporter): - // TODO: [#747] crashReporter needs a bit of extra work, see https://github.com/zcash/secant-ios-wallet/issues/747 - //crashReporter.testCrash() + crashReporter.testCrash() return .none case .debug(.rescanBlockchain): diff --git a/modules/Sources/Features/Root/RootInitialization.swift b/modules/Sources/Features/Root/RootInitialization.swift index 54b3dc2d..896e9ac4 100644 --- a/modules/Sources/Features/Root/RootInitialization.swift +++ b/modules/Sources/Features/Root/RootInitialization.swift @@ -250,10 +250,9 @@ extension RootReducer { return EffectTask(value: .initialization(.createNewWallet)) case .initialization(.configureCrashReporter): - // TODO: [#747] crashReporter needs a bit of extra work, see https://github.com/zcash/secant-ios-wallet/issues/747 -// crashReporter.configure( -// !userStoredPreferences.isUserOptedOutOfCrashReporting() -// ) + crashReporter.configure( + !userStoredPreferences.isUserOptedOutOfCrashReporting() + ) return .none case .updateStateAfterConfigUpdate(let walletConfig): diff --git a/modules/Sources/Features/Root/RootStore.swift b/modules/Sources/Features/Root/RootStore.swift index 275d3d2c..4e06a182 100644 --- a/modules/Sources/Features/Root/RootStore.swift +++ b/modules/Sources/Features/Root/RootStore.swift @@ -16,6 +16,7 @@ import ExportLogs import OnboardingFlow import Sandbox import Home +import CrashReporter public typealias RootStore = Store public typealias RootViewStore = ViewStore @@ -90,8 +91,7 @@ public struct RootReducer: ReducerProtocol { case welcome(WelcomeReducer.Action) } - // TODO: [#747] crashReporter needs a bit of extra work, see https://github.com/zcash/secant-ios-wallet/issues/747 - //@Dependency(\.crashReporter) var crashReporter + @Dependency(\.crashReporter) var crashReporter @Dependency(\.databaseFiles) var databaseFiles @Dependency(\.deeplink) var deeplink @Dependency(\.derivationTool) var derivationTool diff --git a/modules/Sources/Features/Root/RootView.swift b/modules/Sources/Features/Root/RootView.swift index eb65836a..7c446a7a 100644 --- a/modules/Sources/Features/Root/RootView.swift +++ b/modules/Sources/Features/Root/RootView.swift @@ -178,6 +178,10 @@ private extension RootView { } .disabled(viewStore.exportLogsState.exportLogsDisabled) + Button(L10n.Root.Debug.Option.testCrashReporter) { + viewStore.send(.debug(.testCrashReporter)) + } + #if DEBUG Button(L10n.Root.Debug.Option.appReview) { viewStore.send(.debug(.rateTheApp)) diff --git a/modules/Sources/Features/Settings/SettingsStore.swift b/modules/Sources/Features/Settings/SettingsStore.swift index 9548f814..d11547af 100644 --- a/modules/Sources/Features/Settings/SettingsStore.swift +++ b/modules/Sources/Features/Settings/SettingsStore.swift @@ -14,6 +14,7 @@ import WalletStorage import SDKSynchronizer import UserPreferencesStorage import ExportLogs +import CrashReporter public typealias SettingsStore = Store public typealias SettingsViewStore = ViewStore @@ -73,8 +74,7 @@ public struct SettingsReducer: ReducerProtocol { @Dependency(\.logsHandler) var logsHandler @Dependency(\.walletStorage) var walletStorage @Dependency(\.userStoredPreferences) var userStoredPreferences - // TODO: [#747] crashReporter needs a bit of extra work, see https://github.com/zcash/secant-ios-wallet/issues/747 - //@Dependency(\.crashReporter) var crashReporter + @Dependency(\.crashReporter) var crashReporter public init() {} @@ -106,12 +106,11 @@ public struct SettingsReducer: ReducerProtocol { return .none case .binding(\.$isCrashReportingOn): - // TODO: [#747] crashReporter needs a bit of extra work, see https://github.com/zcash/secant-ios-wallet/issues/747 -// if state.isCrashReportingOn { -// crashReporter.optOut() -// } else { -// crashReporter.optIn() -// } + if state.isCrashReportingOn { + crashReporter.optOut() + } else { + crashReporter.optIn() + } return .run { [state] _ in await userStoredPreferences.setIsUserOptedOutOfCrashReporting(state.isCrashReportingOn) diff --git a/modules/Sources/Generated/L10n.swift b/modules/Sources/Generated/L10n.swift index 460cd213..3bcc717c 100644 --- a/modules/Sources/Generated/L10n.swift +++ b/modules/Sources/Generated/L10n.swift @@ -365,6 +365,8 @@ public enum L10n { public static let rescanBlockchain = L10n.tr("Localizable", "root.debug.option.rescanBlockchain", fallback: "Rescan Blockchain") /// Restart the App public static let restartApp = L10n.tr("Localizable", "root.debug.option.restartApp", fallback: "Restart the App") + /// Test Crash Reporter + public static let testCrashReporter = L10n.tr("Localizable", "root.debug.option.testCrashReporter", fallback: "Test Crash Reporter") } } public enum Destination { diff --git a/modules/Sources/Generated/Resources/Localizable.strings b/modules/Sources/Generated/Resources/Localizable.strings index 89e9ae45..9f9151ba 100644 --- a/modules/Sources/Generated/Resources/Localizable.strings +++ b/modules/Sources/Generated/Resources/Localizable.strings @@ -242,6 +242,7 @@ "root.debug.option.nukeWallet" = "[Be careful] Nuke Wallet"; "root.debug.option.exportLogs" = "Export Logs"; "root.debug.option.appReview" = "Rate the App"; +"root.debug.option.testCrashReporter" = "Test Crash Reporter"; "root.debug.featureFlags" = "Feature flags"; "root.debug.dialog.rescan.title" = "Rescan"; "root.debug.dialog.rescan.message" = "Select the rescan you want"; diff --git a/secant.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/secant.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 17b17384..cf43b4ca 100644 --- a/secant.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/secant.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,5 +1,14 @@ { "pins" : [ + { + "identity" : "abseil-cpp-binary", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/abseil-cpp-binary.git", + "state" : { + "revision" : "bfc0b6f81adc06ce5121eb23f628473638d67c5c", + "version" : "1.2022062300.0" + } + }, { "identity" : "combine-schedulers", "kind" : "remoteSourceControl", @@ -9,6 +18,51 @@ "version" : "0.10.0" } }, + { + "identity" : "firebase-ios-sdk", + "kind" : "remoteSourceControl", + "location" : "https://github.com/firebase/firebase-ios-sdk", + "state" : { + "revision" : "df2171b0c6afb9e9d4f7e07669d558c510b9f6be", + "version" : "10.13.0" + } + }, + { + "identity" : "googleappmeasurement", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/GoogleAppMeasurement.git", + "state" : { + "revision" : "03b9beee1a61f62d32c521e172e192a1663a5e8b", + "version" : "10.13.0" + } + }, + { + "identity" : "googledatatransport", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/GoogleDataTransport.git", + "state" : { + "revision" : "aae45a320fd0d11811820335b1eabc8753902a40", + "version" : "9.2.5" + } + }, + { + "identity" : "googleutilities", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/GoogleUtilities.git", + "state" : { + "revision" : "c38ce365d77b04a9a300c31061c5227589e5597b", + "version" : "7.11.5" + } + }, + { + "identity" : "grpc-binary", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/grpc-binary.git", + "state" : { + "revision" : "f1b366129d1125be7db83247e003fc333104b569", + "version" : "1.50.2" + } + }, { "identity" : "grpc-swift", "kind" : "remoteSourceControl", @@ -18,6 +72,24 @@ "version" : "1.16.0" } }, + { + "identity" : "gtm-session-fetcher", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/gtm-session-fetcher.git", + "state" : { + "revision" : "d415594121c9e8a4f9d79cecee0965cf35e74dbd", + "version" : "3.1.1" + } + }, + { + "identity" : "leveldb", + "kind" : "remoteSourceControl", + "location" : "https://github.com/firebase/leveldb.git", + "state" : { + "revision" : "0706abcc6b0bd9cedfbb015ba840e4a780b5159b", + "version" : "1.22.2" + } + }, { "identity" : "mnemonicswift", "kind" : "remoteSourceControl", @@ -27,6 +99,24 @@ "version" : "2.2.4" } }, + { + "identity" : "nanopb", + "kind" : "remoteSourceControl", + "location" : "https://github.com/firebase/nanopb.git", + "state" : { + "revision" : "819d0a2173aff699fb8c364b6fb906f7cdb1a692", + "version" : "2.30909.0" + } + }, + { + "identity" : "promises", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/promises.git", + "state" : { + "revision" : "e70e889c0196c76d22759eb50d6a0270ca9f1d9e", + "version" : "2.3.1" + } + }, { "identity" : "sqlite.swift", "kind" : "remoteSourceControl", @@ -238,7 +328,7 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/zcash/ZcashLightClientKit", "state" : { - "revision" : "b9524ae1abfa54bbcaac802dbccb9e4eecc847cc" + "revision" : "4d95f2cb9df23be534540b569597df8bd16717a6" } } ], diff --git a/secantTests/RecoveryPhraseValidationTests/RecoveryPhraseValidationFlowFeatureFlagTests.swift b/secantTests/RecoveryPhraseValidationTests/RecoveryPhraseValidationFlowFeatureFlagTests.swift index a7c07572..e2b95a59 100644 --- a/secantTests/RecoveryPhraseValidationTests/RecoveryPhraseValidationFlowFeatureFlagTests.swift +++ b/secantTests/RecoveryPhraseValidationTests/RecoveryPhraseValidationFlowFeatureFlagTests.swift @@ -204,6 +204,7 @@ class RecoveryPhraseValidationFlowFeatureFlagTests: XCTestCase { store.dependencies.walletStorage.areKeysPresent = { true } store.dependencies.walletConfigProvider = .noOp store.dependencies.sdkSynchronizer = .noOp + store.dependencies.crashReporter = .noOp // Root of the test, the app finished the launch process and triggers the checks and initializations. await store.send(.initialization(.appDelegate(.didFinishLaunching))) diff --git a/secantTests/RootTests/AppInitializationTests.swift b/secantTests/RootTests/AppInitializationTests.swift index f8bb1b8c..3a0c80eb 100644 --- a/secantTests/RootTests/AppInitializationTests.swift +++ b/secantTests/RootTests/AppInitializationTests.swift @@ -110,6 +110,7 @@ class AppInitializationTests: XCTestCase { store.dependencies.walletStorage.areKeysPresent = { true } store.dependencies.walletConfigProvider = .noOp store.dependencies.sdkSynchronizer = .noOp + store.dependencies.crashReporter = .noOp // Root of the test, the app finished the launch process and triggers the checks and initializations. await store.send(.initialization(.appDelegate(.didFinishLaunching))) @@ -160,6 +161,7 @@ class AppInitializationTests: XCTestCase { store.dependencies.walletStorage = .noOp store.dependencies.mainQueue = .immediate store.dependencies.walletConfigProvider = .noOp + store.dependencies.crashReporter = .noOp // Root of the test, the app finished the launch process and triggers the checks and initializations. await store.send(.initialization(.appDelegate(.didFinishLaunching))) @@ -193,6 +195,7 @@ class AppInitializationTests: XCTestCase { store.dependencies.mainQueue = .immediate store.dependencies.walletStorage = .noOp store.dependencies.walletConfigProvider = .noOp + store.dependencies.crashReporter = .noOp // Root of the test, the app finished the launch process and triggers the checks and initializations. await store.send(.initialization(.appDelegate(.didFinishLaunching)))