Add a crash reporting opt out

This commit is contained in:
Garth Vander Houwen 2025-07-09 10:08:25 -07:00
parent 12c8cd9566
commit fc958d6b7d
5 changed files with 20 additions and 2 deletions

View file

@ -22993,6 +22993,9 @@
}
}
}
},
"Provide anonymous usage statistics and crash reports." : {
},
"Provide Confirmation" : {
@ -33157,6 +33160,9 @@
}
}
}
},
"Usage and Crash Data" : {
},
"Use a PWM output (like the RAK Buzzer) for tunes instead of an on/off output. This will ignore the output, output duration and active settings and use the device config buzzer GPIO option instead." : {
"localizations" : {

View file

@ -74,6 +74,7 @@ extension UserDefaults {
case environmentEnableWeatherKit
case enableAdministration
case mapReportingOptIn
case usageDataAndCrashReporting
case testIntEnum
}
@ -155,6 +156,9 @@ extension UserDefaults {
@UserDefault(.mapReportingOptIn, defaultValue: false)
static var mapReportingOptIn: Bool
@UserDefault(.usageDataAndCrashReporting, defaultValue: true)
static var usageDataAndCrashReporting: Bool
@UserDefault(.testIntEnum, defaultValue: .one)
static var testIntEnum: TestIntEnum

View file

@ -41,7 +41,7 @@ struct MeshtasticAppleApp: App {
env: environment,
site: .us5
),
trackingConsent: .granted
trackingConsent: UserDefaults.usageDataAndCrashReporting ? .granted : .notGranted
)
RUM.enable(

View file

@ -16,6 +16,7 @@ struct AppSettings: View {
@AppStorage("purgeStaleNodeDays") private var purgeStaleNodeDays: Double = 0
@AppStorage("environmentEnableWeatherKit") private var environmentEnableWeatherKit: Bool = true
@AppStorage("enableAdministration") private var enableAdministration: Bool = false
@AppStorage("usageDataAndCrashReporting") private var usageDataAndCrashReporting: Bool = true
var body: some View {
VStack {
Form {
@ -33,6 +34,13 @@ struct AppSettings: View {
Text("PKI based node administration, requires firmware version 2.5+")
.foregroundStyle(.secondary)
.font(.caption)
Toggle(isOn: $usageDataAndCrashReporting) {
Label("Usage and Crash Data", systemImage: "pencil.and.list.clipboard")
}
.toggleStyle(SwitchToggleStyle(tint: .accentColor))
Text("Provide anonymous usage statistics and crash reports.")
.foregroundStyle(.secondary)
.font(.caption)
}
Section(header: Text("environment")) {
VStack(alignment: .leading) {

@ -1 +1 @@
Subproject commit 27fac39141d99fe727a0a1824c5397409b1aea75
Subproject commit 816595c8bbdfc3b4388e11348ccd043294d58705