AppDebugMode-iOS icon indicating copy to clipboard operation
AppDebugMode-iOS copied to clipboard

Ukladanie settingov cez exit(0)

Open andrej-jasso opened this issue 7 months ago • 0 comments

          Cele toto spravanie s crashovanim appky cez exit(0) sa mi strasne nepaci, ze treba kvoli zmene servera restartovat appku. Hlavne to je trackovane potom do Crashlytics, kedze to zachyti ako crash. Na to by sme mali vymysliet nejaky handler, co refreshne tu network session, aj kvoli setupu proxy do buducna 😄 

kazdopadne drobne navrhovane upravy:

    func saveMemorySettingsFooter() -> some View {
        VStack(spacing: 10) {
            ButtonFilled(text: "Save memory settings") {
                saveMemorySettings()
            }

            #warning("TODO: treba crashovat appku aj kvoli memory settingom?")
            Text("The app will be terminated to properly change memory sanitizer settings.")
                .multilineTextAlignment(.center)
                .foregroundColor(AppDebugColors.textSecondary)
                .font(.caption)
                .frame(maxWidth: .infinity)
        }
        .padding(16)
        .background(Glass().edgesIgnoringSafeArea(.bottom))
    }

    func saveMemorySettings() {
        memorySettingsManager.enabled = enabled
        memorySettingsManager.style = style
        memorySettingsManager.visibility = visibility

        exit(0)
    }

Originally posted by @plajdo in https://github.com/GoodRequest/AppDebugMode-iOS/pull/36#discussion_r1675691398

andrej-jasso avatar Jul 12 '24 12:07 andrej-jasso