diff --git a/BrowserKit/Sources/Common/Logger/CrashManager.swift b/BrowserKit/Sources/Common/Logger/CrashManager.swift index 7977d8fb328c..9d235ce23325 100644 --- a/BrowserKit/Sources/Common/Logger/CrashManager.swift +++ b/BrowserKit/Sources/Common/Logger/CrashManager.swift @@ -9,7 +9,7 @@ import Sentry public protocol CrashManager { var crashedLastLaunch: Bool { get } func captureError(error: Error) - func setup(sendUsageData: Bool) + func setup(sendCrashReports: Bool) func send(message: String, category: LoggerCategory, level: LoggerLevel, @@ -102,8 +102,8 @@ public class DefaultCrashManager: CrashManager { return sentryWrapper.crashedInLastRun } - public func setup(sendUsageData: Bool) { - guard shouldSetup, sendUsageData, let dsn = sentryWrapper.dsn else { return } + public func setup(sendCrashReports: Bool) { + guard shouldSetup, sendCrashReports, let dsn = sentryWrapper.dsn else { return } sentryWrapper.startWithConfigureOptions(configure: { options in options.dsn = dsn diff --git a/BrowserKit/Sources/Common/Logger/DefaultLogger.swift b/BrowserKit/Sources/Common/Logger/DefaultLogger.swift index 5ea8872d0f50..b7eb74e60b18 100644 --- a/BrowserKit/Sources/Common/Logger/DefaultLogger.swift +++ b/BrowserKit/Sources/Common/Logger/DefaultLogger.swift @@ -25,8 +25,8 @@ public class DefaultLogger: Logger { self.crashManager = crashManager } - public func setup(sendUsageData: Bool) { - crashManager?.setup(sendUsageData: sendUsageData) + public func setup(sendCrashReports: Bool) { + crashManager?.setup(sendCrashReports: sendCrashReports) } // TODO: FXIOS-7819 need to rethink if this should go to Sentry diff --git a/BrowserKit/Sources/Common/Logger/Logger.swift b/BrowserKit/Sources/Common/Logger/Logger.swift index be500b69c791..cfd820bde4d0 100644 --- a/BrowserKit/Sources/Common/Logger/Logger.swift +++ b/BrowserKit/Sources/Common/Logger/Logger.swift @@ -7,7 +7,7 @@ import Foundation public protocol Logger { var crashedLastLaunch: Bool { get } - func setup(sendUsageData: Bool) + func setup(sendCrashReports: Bool) func configure(crashManager: CrashManager) func logCustomError(error: Error) diff --git a/BrowserKit/Tests/CommonTests/LoggerTests/CrashManagerTests.swift b/BrowserKit/Tests/CommonTests/LoggerTests/CrashManagerTests.swift index c8b6e39a3f28..33a4fbab38be 100644 --- a/BrowserKit/Tests/CommonTests/LoggerTests/CrashManagerTests.swift +++ b/BrowserKit/Tests/CommonTests/LoggerTests/CrashManagerTests.swift @@ -27,7 +27,7 @@ final class CrashManagerTests: XCTestCase { let subject = DefaultCrashManager(sentryWrapper: sentryWrapper, isSimulator: true, skipReleaseNameCheck: true) - subject.setup(sendUsageData: true) + subject.setup(sendCrashReports: true) XCTAssertEqual(sentryWrapper.startWithConfigureOptionsCalled, 0) XCTAssertEqual(sentryWrapper.configureScopeCalled, 0) @@ -38,7 +38,7 @@ final class CrashManagerTests: XCTestCase { let subject = DefaultCrashManager(sentryWrapper: sentryWrapper, isSimulator: false, skipReleaseNameCheck: true) - subject.setup(sendUsageData: false) + subject.setup(sendCrashReports: false) XCTAssertEqual(sentryWrapper.startWithConfigureOptionsCalled, 0) XCTAssertEqual(sentryWrapper.configureScopeCalled, 0) @@ -48,7 +48,7 @@ final class CrashManagerTests: XCTestCase { let subject = DefaultCrashManager(sentryWrapper: sentryWrapper, isSimulator: false, skipReleaseNameCheck: true) - subject.setup(sendUsageData: true) + subject.setup(sendCrashReports: true) XCTAssertEqual(sentryWrapper.startWithConfigureOptionsCalled, 0) XCTAssertEqual(sentryWrapper.configureScopeCalled, 0) @@ -59,7 +59,7 @@ final class CrashManagerTests: XCTestCase { let subject = DefaultCrashManager(sentryWrapper: sentryWrapper, isSimulator: false, skipReleaseNameCheck: true) - subject.setup(sendUsageData: true) + subject.setup(sendCrashReports: true) XCTAssertEqual(sentryWrapper.startWithConfigureOptionsCalled, 1) XCTAssertEqual(sentryWrapper.configureScopeCalled, 1) @@ -70,8 +70,8 @@ final class CrashManagerTests: XCTestCase { let subject = DefaultCrashManager(sentryWrapper: sentryWrapper, isSimulator: false, skipReleaseNameCheck: true) - subject.setup(sendUsageData: true) - subject.setup(sendUsageData: true) + subject.setup(sendCrashReports: true) + subject.setup(sendCrashReports: true) XCTAssertEqual(sentryWrapper.startWithConfigureOptionsCalled, 1) XCTAssertEqual(sentryWrapper.configureScopeCalled, 1) @@ -114,7 +114,7 @@ final class CrashManagerTests: XCTestCase { let subject = DefaultCrashManager(sentryWrapper: sentryWrapper, isSimulator: false, skipReleaseNameCheck: true) - subject.setup(sendUsageData: true) + subject.setup(sendCrashReports: true) subject.send(message: "A message", category: .setup, @@ -132,7 +132,7 @@ final class CrashManagerTests: XCTestCase { let subject = DefaultCrashManager(sentryWrapper: sentryWrapper, isSimulator: false, skipReleaseNameCheck: true) - subject.setup(sendUsageData: true) + subject.setup(sendCrashReports: true) subject.send(message: "A message", category: .setup, @@ -150,7 +150,7 @@ final class CrashManagerTests: XCTestCase { let subject = DefaultCrashManager(sentryWrapper: sentryWrapper, isSimulator: false, skipReleaseNameCheck: true) - subject.setup(sendUsageData: true) + subject.setup(sendCrashReports: true) subject.send(message: "A message", category: .setup, @@ -168,7 +168,7 @@ final class CrashManagerTests: XCTestCase { let subject = DefaultCrashManager(sentryWrapper: sentryWrapper, isSimulator: false, skipReleaseNameCheck: true) - subject.setup(sendUsageData: true) + subject.setup(sendCrashReports: true) subject.send(message: "A message", category: .setup, @@ -186,7 +186,7 @@ final class CrashManagerTests: XCTestCase { let subject = DefaultCrashManager(sentryWrapper: sentryWrapper, isSimulator: false, skipReleaseNameCheck: true) - subject.setup(sendUsageData: true) + subject.setup(sendCrashReports: true) subject.send(message: "A message", category: .setup, diff --git a/BrowserKit/Tests/CommonTests/LoggerTests/LoggerTests.swift b/BrowserKit/Tests/CommonTests/LoggerTests/LoggerTests.swift index 8e18aa78cc80..5a89b53a3da8 100644 --- a/BrowserKit/Tests/CommonTests/LoggerTests/LoggerTests.swift +++ b/BrowserKit/Tests/CommonTests/LoggerTests/LoggerTests.swift @@ -129,19 +129,19 @@ final class LoggerTests: XCTestCase { XCTAssertEqual(extra, ["example": "test", "errorDescription": "A description"]) } - func testCrashManagerLog_sendUsageDataNotCalled() { + func testCrashManagerLog_sendCrashReportsNotCalled() { let subject = DefaultLogger(swiftyBeaverBuilder: beaverBuilder) subject.configure(crashManager: crashManager) - XCTAssertNil(crashManager.savedSendUsageData) + XCTAssertNil(crashManager.savedSendCrashReports) } - func testCrashManagerLog_sendUsageDataCalled() throws { + func testCrashManagerLog_sendCrashReportsCalled() throws { let subject = DefaultLogger(swiftyBeaverBuilder: beaverBuilder) subject.configure(crashManager: crashManager) - subject.setup(sendUsageData: true) + subject.setup(sendCrashReports: true) - let savedSendUsageData = try XCTUnwrap(crashManager.savedSendUsageData) - XCTAssertTrue(savedSendUsageData) + let savedSendCrashReports = try XCTUnwrap(crashManager.savedSendCrashReports) + XCTAssertTrue(savedSendCrashReports) } } @@ -201,9 +201,9 @@ class MockSwiftyBeaver: SwiftyBeaverWrapper { class MockCrashManager: CrashManager { var crashedLastLaunch = false - var savedSendUsageData: Bool? - func setup(sendUsageData: Bool) { - savedSendUsageData = sendUsageData + var savedSendCrashReports: Bool? + func setup(sendCrashReports: Bool) { + savedSendCrashReports = sendCrashReports } var message: String? diff --git a/firefox-ios/Client/Application/AppLaunchUtil.swift b/firefox-ios/Client/Application/AppLaunchUtil.swift index 816a210a953d..00ac9ad0010b 100644 --- a/firefox-ios/Client/Application/AppLaunchUtil.swift +++ b/firefox-ios/Client/Application/AppLaunchUtil.swift @@ -14,6 +14,7 @@ class AppLaunchUtil { // private var adjustHelper: AdjustHelper private var profile: Profile private let introScreenManager: IntroScreenManager + private let termsOfServiceManager: TermsOfServiceManager init(logger: Logger = DefaultLogger.shared, profile: Profile) { @@ -21,6 +22,7 @@ class AppLaunchUtil { self.profile = profile // self.adjustHelper = AdjustHelper(profile: profile) self.introScreenManager = IntroScreenManager(prefs: profile.prefs) + self.termsOfServiceManager = TermsOfServiceManager(prefs: profile.prefs) } func setUpPreLaunchDependencies() { @@ -35,9 +37,12 @@ class AppLaunchUtil { TelemetryWrapper.shared.setup(profile: profile) recordStartUpTelemetry() - // Need to get "settings.sendUsageData" this way so that Sentry can be initialized before getting the Profile. - let sendUsageData = NSUserDefaultsPrefs(prefix: "profile").boolForKey(AppConstants.prefSendUsageData) ?? true - logger.setup(sendUsageData: sendUsageData) + // Need to get "settings.sendCrashReports" this way so that Sentry can be initialized before getting the Profile. + let sendCrashReports = NSUserDefaultsPrefs(prefix: "profile").boolForKey(AppConstants.prefSendCrashReports) ?? true + + // For this phase, we should handle terms of service as accepted, in case of app updates. + logger.setup(sendCrashReports: sendCrashReports && (termsOfServiceManager.isAccepted || + !introScreenManager.shouldShowIntroScreen)) setUserAgent() @@ -56,6 +61,8 @@ class AppLaunchUtil { // i.e. this must be run before initializing those systems. LegacyFeatureFlagsManager.shared.initializeDeveloperFeatures(with: profile) + logger.setup(sendCrashReports: sendCrashReports && !termsOfServiceManager.isFeatureEnabled) + // Start initializing the Nimbus SDK. This should be done after Glean // has been started. initializeExperiments() diff --git a/firefox-ios/Client/Coordinators/Launch/LaunchCoordinator.swift b/firefox-ios/Client/Coordinators/Launch/LaunchCoordinator.swift index b619629332c8..63b468b37efe 100644 --- a/firefox-ios/Client/Coordinators/Launch/LaunchCoordinator.swift +++ b/firefox-ios/Client/Coordinators/Launch/LaunchCoordinator.swift @@ -4,6 +4,7 @@ import Common import Foundation +import Shared protocol LaunchCoordinatorDelegate: AnyObject { func didFinishTermsOfService(from coordinator: LaunchCoordinator) @@ -49,10 +50,13 @@ class LaunchCoordinator: BaseCoordinator, // MARK: - Terms of Service private func presentTermsOfService(with manager: TermsOfServiceManager, isFullScreen: Bool) { - let viewController = TermsOfServiceViewController(windowUUID: windowUUID) + let viewController = TermsOfServiceViewController(profile: profile, windowUUID: windowUUID) viewController.didFinishFlow = { [weak self] in manager.setAccepted() guard let self = self else { return } + let sendCrashReports = profile.prefs.boolForKey(AppConstants.prefSendCrashReports) ?? true + self.profile.prefs.setBool(sendCrashReports, forKey: AppConstants.prefSendCrashReports) + self.logger.setup(sendCrashReports: sendCrashReports) self.parentCoordinator?.didFinishTermsOfService(from: self) } viewController.modalPresentationStyle = .fullScreen diff --git a/firefox-ios/Client/Frontend/Autofill/LoginListViewModel.swift b/firefox-ios/Client/Frontend/Autofill/LoginListViewModel.swift index 8004a0440420..283fb87cd052 100644 --- a/firefox-ios/Client/Frontend/Autofill/LoginListViewModel.swift +++ b/firefox-ios/Client/Frontend/Autofill/LoginListViewModel.swift @@ -61,7 +61,7 @@ class MockLogger: Logger { var savedLevel: LoggerLevel? var savedCategory: LoggerCategory? - func setup(sendUsageData: Bool) {} + func setup(sendCrashReports: Bool) {} func configure(crashManager: Common.CrashManager) {} func copyLogsToDocuments() {} func logCustomError(error: Error) {} diff --git a/firefox-ios/Client/Frontend/Onboarding/Views/PrivacyPreferencesViewController.swift b/firefox-ios/Client/Frontend/Onboarding/Views/PrivacyPreferencesViewController.swift index a778be2844a2..f62ef32fab5a 100644 --- a/firefox-ios/Client/Frontend/Onboarding/Views/PrivacyPreferencesViewController.swift +++ b/firefox-ios/Client/Frontend/Onboarding/Views/PrivacyPreferencesViewController.swift @@ -18,6 +18,7 @@ final class PrivacyPreferencesViewController: UIViewController, } // MARK: - Properties + private var profile: Profile var windowUUID: WindowUUID var themeManager: ThemeManager var themeObserver: (any NSObjectProtocol)? @@ -46,16 +47,20 @@ final class PrivacyPreferencesViewController: UIViewController, private lazy var contentView: UIView = .build() - private lazy var crashReportsSwitch: SwitchDetailedView = .build() + private lazy var crashReportsSwitch: SwitchDetailedView = .build { [weak self] view in + view.setSwitchValue(isOn: self?.profile.prefs.boolForKey(AppConstants.prefSendCrashReports) ?? true) + } private lazy var technicalDataSwitch: SwitchDetailedView = .build() // MARK: - Initializers init( + profile: Profile, windowUUID: WindowUUID, themeManager: ThemeManager = AppContainer.shared.resolve(), notificationCenter: NotificationProtocol = NotificationCenter.default ) { + self.profile = profile self.windowUUID = windowUUID self.themeManager = themeManager self.notificationCenter = notificationCenter @@ -154,8 +159,11 @@ final class PrivacyPreferencesViewController: UIViewController, } private func setupCallbacks() { - // TODO: FXIOS-10675 Firefox iOS: Manage Privacy Preferences during Onboarding - Logic - crashReportsSwitch.switchCallback = { _ in } + crashReportsSwitch.switchCallback = { [weak self] value in + self?.profile.prefs.setBool(value, forKey: AppConstants.prefSendCrashReports) + } + + // TODO: FXIOS-10675 Firefox iOS: Manage Technical Data during Onboarding and Settings technicalDataSwitch.switchCallback = { _ in } // TODO: FXIOS-10739 Firefox iOS: Use the correct links for Learn more buttons, in Manage Privacy Preferences screen diff --git a/firefox-ios/Client/Frontend/Onboarding/Views/SwitchDetailedView.swift b/firefox-ios/Client/Frontend/Onboarding/Views/SwitchDetailedView.swift index cc7da8b5ee8f..d84a5d10697a 100644 --- a/firefox-ios/Client/Frontend/Onboarding/Views/SwitchDetailedView.swift +++ b/firefox-ios/Client/Frontend/Onboarding/Views/SwitchDetailedView.swift @@ -139,6 +139,10 @@ final class SwitchDetailedView: UIView, ThemeApplicable { actionDescriptionLabel.attributedText = linkedDescription } + func setSwitchValue(isOn: Bool) { + actionSwitch.isOn = isOn + } + // MARK: - Button actions @objc private func switchValueChanged(_ sender: UISwitch) { diff --git a/firefox-ios/Client/Frontend/Onboarding/Views/TermsOfServiceViewController.swift b/firefox-ios/Client/Frontend/Onboarding/Views/TermsOfServiceViewController.swift index 4d0904a2c6d5..b83ee0c9ef69 100644 --- a/firefox-ios/Client/Frontend/Onboarding/Views/TermsOfServiceViewController.swift +++ b/firefox-ios/Client/Frontend/Onboarding/Views/TermsOfServiceViewController.swift @@ -28,6 +28,7 @@ class TermsOfServiceViewController: UIViewController, Themeable { } // MARK: - Properties + private let profile: Profile var windowUUID: WindowUUID var themeManager: ThemeManager var themeObserver: NSObjectProtocol? @@ -69,10 +70,12 @@ class TermsOfServiceViewController: UIViewController, Themeable { // MARK: - Initializers init( + profile: Profile, windowUUID: WindowUUID, themeManager: ThemeManager = AppContainer.shared.resolve(), notificationCenter: NotificationProtocol = NotificationCenter.default ) { + self.profile = profile self.windowUUID = windowUUID self.themeManager = themeManager self.notificationCenter = notificationCenter @@ -245,7 +248,7 @@ class TermsOfServiceViewController: UIViewController, Themeable { @objc private func presentManagePreferences(_ gesture: UIGestureRecognizer) { - let managePreferencesVC = PrivacyPreferencesViewController(windowUUID: windowUUID) + let managePreferencesVC = PrivacyPreferencesViewController(profile: profile, windowUUID: windowUUID) if UIDevice.current.userInterfaceIdiom != .phone { managePreferencesVC.modalPresentationStyle = .formSheet } diff --git a/firefox-ios/Client/Frontend/Settings/Main/AppSettingsTableViewController.swift b/firefox-ios/Client/Frontend/Settings/Main/AppSettingsTableViewController.swift index e5842ee90e5b..faa333cf3f8b 100644 --- a/firefox-ios/Client/Frontend/Settings/Main/AppSettingsTableViewController.swift +++ b/firefox-ios/Client/Frontend/Settings/Main/AppSettingsTableViewController.swift @@ -176,7 +176,7 @@ class AppSettingsTableViewController: SettingsTableViewController, // MARK: Data settings setup private func setupDataSettings() { - let isSentCrashReportsEnabled = featureFlags.isFeatureEnabled(.tosFeature, checking: .buildOnly) + let isTermsOfServiceFeatureEnabled = featureFlags.isFeatureEnabled(.tosFeature, checking: .buildOnly) let anonymousUsageDataSetting = SendDataSetting( prefs: profile.prefs, @@ -198,7 +198,7 @@ class AppSettingsTableViewController: SettingsTableViewController, } // Only add these toggles to the Settings if Terms Of Service feature flag is enabled - if isSentCrashReportsEnabled { + if isTermsOfServiceFeatureEnabled { let sendTechnicalDataSettings = SendDataSetting( prefs: profile.prefs, delegate: settingsDelegate, @@ -211,18 +211,6 @@ class AppSettingsTableViewController: SettingsTableViewController, } sendTechnicalDataSetting = sendTechnicalDataSettings - let sendCrashReportsSettings = SendDataSetting( - prefs: profile.prefs, - delegate: settingsDelegate, - theme: themeManager.getCurrentTheme(for: windowUUID), - settingsDelegate: parentCoordinator, - sendDataType: .crashReports - ) - sendCrashReportsSettings.shouldSendData = { value in - // TODO: FXIOS-10754 Firefox iOS: Manage Privacy Preferences in Settings - Logic - } - self.sendCrashReportsSetting = sendCrashReportsSettings - let sendDailyUsagePingSettings = SendDataSetting( prefs: profile.prefs, delegate: settingsDelegate, @@ -236,6 +224,15 @@ class AppSettingsTableViewController: SettingsTableViewController, sendDailyUsagePingSetting = sendDailyUsagePingSettings } + let sendCrashReportsSettings = SendDataSetting( + prefs: profile.prefs, + delegate: settingsDelegate, + theme: themeManager.getCurrentTheme(for: windowUUID), + settingsDelegate: parentCoordinator, + sendDataType: .crashReports + ) + self.sendCrashReportsSetting = sendCrashReportsSettings + sendAnonymousUsageDataSetting = anonymousUsageDataSetting studiesToggleSetting = studiesSetting } diff --git a/firefox-ios/Client/Frontend/Settings/Main/Support/SendDataSetting.swift b/firefox-ios/Client/Frontend/Settings/Main/Support/SendDataSetting.swift index 489094f4eae6..3da91516dcf0 100644 --- a/firefox-ios/Client/Frontend/Settings/Main/Support/SendDataSetting.swift +++ b/firefox-ios/Client/Frontend/Settings/Main/Support/SendDataSetting.swift @@ -84,29 +84,31 @@ class SendDataSetting: BoolSetting { attributedStatusText: statusText ) - setupSettingDidChange() + setupSettingDidChange(for: sendDataType) // We make sure to set this on initialization, in case the setting is turned off // in which case, we would to make sure that users are opted out of experiments Experiments.setTelemetrySetting(prefs.boolForKey(prefKey) ?? true) } - private func setupSettingDidChange() { + private func setupSettingDidChange(for sendDataType: SendDataType) { self.settingDidChange = { [weak self] value in - // AdjustHelper.setEnabled($0) - DefaultGleanWrapper.shared.setUpload(isEnabled: value) + if sendDataType != .crashReports { + // AdjustHelper.setEnabled($0) + DefaultGleanWrapper.shared.setUpload(isEnabled: value) - if !value { - self?.prefs?.removeObjectForKey(PrefsKeys.Usage.profileId) + if !value { + self?.prefs?.removeObjectForKey(PrefsKeys.Usage.profileId) - // set dummy uuid to make sure the previous one is deleted - if let uuid = UUID(uuidString: "beefbeef-beef-beef-beef-beeefbeefbee") { - GleanMetrics.Usage.profileId.set(uuid) + // set dummy uuid to make sure the previous one is deleted + if let uuid = UUID(uuidString: "beefbeef-beef-beef-beef-beeefbeefbee") { + GleanMetrics.Usage.profileId.set(uuid) + } } - } - Experiments.setTelemetrySetting(value) - self?.shouldSendData?(value) + Experiments.setTelemetrySetting(value) + self?.shouldSendData?(value) + } } } diff --git a/firefox-ios/Client/TermsOfServiceManager.swift b/firefox-ios/Client/TermsOfServiceManager.swift index 1d85b15692d2..f2c86855cf55 100644 --- a/firefox-ios/Client/TermsOfServiceManager.swift +++ b/firefox-ios/Client/TermsOfServiceManager.swift @@ -8,6 +8,14 @@ import Shared struct TermsOfServiceManager: FeatureFlaggable { var prefs: Prefs + var isFeatureEnabled: Bool { + featureFlags.isFeatureEnabled(.tosFeature, checking: .buildAndUser) + } + + var isAccepted: Bool { + prefs.intForKey(PrefsKeys.TermsOfServiceAccepted) == 1 + } + var shouldShowScreen: Bool { guard featureFlags.isFeatureEnabled(.tosFeature, checking: .buildAndUser) else { return false } diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Helpers/RatingPromptManagerTests.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Helpers/RatingPromptManagerTests.swift index 00743bbadb60..5cc205bfaae9 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Helpers/RatingPromptManagerTests.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Helpers/RatingPromptManagerTests.swift @@ -314,7 +314,7 @@ class CumulativeDaysOfUseCounterMock: CumulativeDaysOfUseCounter { // MARK: - CrashingMockLogger class CrashingMockLogger: Logger { - func setup(sendUsageData: Bool) {} + func setup(sendCrashReports: Bool) {} func configure(crashManager: CrashManager) {} func copyLogsToDocuments() {} func logCustomError(error: Error) {} diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Mocks/MockLogger.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Mocks/MockLogger.swift index c7063a9d2c23..413bf4fc37a6 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Mocks/MockLogger.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Mocks/MockLogger.swift @@ -10,7 +10,7 @@ class MockLogger: Logger { var savedLevel: LoggerLevel? var savedCategory: LoggerCategory? - func setup(sendUsageData: Bool) {} + func setup(sendCrashReports: Bool) {} func configure(crashManager: Common.CrashManager) {} func copyLogsToDocuments() {} func logCustomError(error: Error) {}