Support runtime customisation of the rageshake URL. (#4267)

This commit is contained in:
Doug
2025-06-30 10:18:25 +01:00
committed by GitHub
parent 53d16e7528
commit 17596f3de1
10 changed files with 143 additions and 19 deletions
@@ -46,6 +46,15 @@ enum BugReportServiceError: LocalizedError {
}
}
enum RageshakeConfiguration {
/// Rageshakes should be sent to the provided URL
case url(URL)
/// Rageshakes are disabled.
case disabled
/// No customisations are made, use the default configuration.
case `default`
}
// sourcery: AutoMockable
protocol BugReportServiceProtocol: AnyObject {
var isEnabled: Bool { get }
@@ -53,6 +62,8 @@ protocol BugReportServiceProtocol: AnyObject {
var lastCrashEventID: String? { get set }
func applyConfiguration(_ configuration: RageshakeConfiguration)
func submitBugReport(_ bugReport: BugReport,
progressListener: CurrentValueSubject<Double, Never>) async -> Result<SubmitBugReportResponse, BugReportServiceError>
}