[diagnostics]: Added switches for OperationLogging to use them for debugging/diagnostics on device

This commit is contained in:
Magesh K
2025-01-14 07:23:23 +05:30
parent abd3735ae4
commit 0da743e9a6
7 changed files with 485 additions and 82 deletions

View File

@@ -0,0 +1,277 @@
//
// SettingsView.swift
// AltStore
//
// Created by Magesh K on 14/01/25.
// Copyright © 2025 SideStore. All rights reserved.
//
import SwiftUI
import AltStoreCore
private final class DummyConformance: EnableJITContext
{
private init(){} // non instantiatable
var installedApp: AltStoreCore.InstalledApp?
var error: (any Error)?
}
struct OperationsLoggingControlView: View {
let TITLE = "Operations Logging"
let BACKGROUND_COLOR = Color(.settingsBackground)
var viewModel = OperationsLoggingControl()
var body: some View {
NavigationView {
ZStack {
// BACKGROUND_COLOR.ignoresSafeArea() // Force background to cover the entire screen
VStack{
Group{}.padding(12)
CustomList {
CustomSection(header: Text("Install Operations"))
{
CustomToggle("1. Authentication", isOn: Binding(
get: { self.viewModel.getFromDatabase(for: AuthenticationOperation.self) },
set: { value in
self.viewModel.updateDatabase(for: AuthenticationOperation.self, value: value)
}
))
CustomToggle("2. VerifyAppPledge", isOn: Binding(
get: { self.viewModel.getFromDatabase(for: VerifyAppPledgeOperation.self) },
set: { value in
self.viewModel.updateDatabase(for: VerifyAppPledgeOperation.self, value: value)
}
))
CustomToggle("3. DownloadApp", isOn: Binding(
get: { self.viewModel.getFromDatabase(for: DownloadAppOperation.self) },
set: { value in
self.viewModel.updateDatabase(for: DownloadAppOperation.self, value: value)
}
))
CustomToggle("4. VerifyApp", isOn: Binding(
get: { self.viewModel.getFromDatabase(for: VerifyAppOperation.self) },
set: { value in
self.viewModel.updateDatabase(for: VerifyAppOperation.self, value: value)
}
))
CustomToggle("5. RemoveAppExtensions", isOn: Binding(
get: { self.viewModel.getFromDatabase(for: RemoveAppExtensionsOperation.self) },
set: { value in
self.viewModel.updateDatabase(for: RemoveAppExtensionsOperation.self, value: value)
}
))
CustomToggle("6. FetchAnisetteData", isOn: Binding(
get: { self.viewModel.getFromDatabase(for: FetchAnisetteDataOperation.self) },
set: { value in
self.viewModel.updateDatabase(for: FetchAnisetteDataOperation.self, value: value)
}
))
CustomToggle("7. FetchProvisioningProfiles", isOn: Binding(
get: { self.viewModel.getFromDatabase(for: FetchProvisioningProfilesOperation.self) },
set: { value in
self.viewModel.updateDatabase(for: FetchProvisioningProfilesOperation.self, value: value)
}
))
CustomToggle("8. ResignApp", isOn: Binding(
get: { self.viewModel.getFromDatabase(for: ResignAppOperation.self) },
set: { value in
self.viewModel.updateDatabase(for: ResignAppOperation.self, value: value)
}
))
CustomToggle("9. SendApp", isOn: Binding(
get: { self.viewModel.getFromDatabase(for: SendAppOperation.self) },
set: { value in
self.viewModel.updateDatabase(for: SendAppOperation.self, value: value)
}
))
CustomToggle("10. InstallApp", isOn: Binding(
get: { self.viewModel.getFromDatabase(for: InstallAppOperation.self) },
set: { value in
self.viewModel.updateDatabase(for: InstallAppOperation.self, value: value)
}
))
}
CustomSection(header: Text("Refresh Operations"))
{
CustomToggle("1. RefreshApp", isOn: Binding(
get: { self.viewModel.getFromDatabase(for: RefreshAppOperation.self) },
set: { value in
self.viewModel.updateDatabase(for: RefreshAppOperation.self, value: value)
}
))
}
CustomSection(header: Text("AppIDs related Operations"))
{
CustomToggle("1. FetchAppIDs", isOn: Binding(
get: { self.viewModel.getFromDatabase(for: FetchAppIDsOperation.self) },
set: { value in
self.viewModel.updateDatabase(for: FetchAppIDsOperation.self, value: value)
}
))
}
CustomSection(header: Text("Sources related Operations"))
{
CustomToggle("1. FetchSource", isOn: Binding(
get: { self.viewModel.getFromDatabase(for: FetchSourceOperation.self) },
set: { value in
self.viewModel.updateDatabase(for: FetchSourceOperation.self, value: value)
}
))
CustomToggle("2. UpdateKnownSources", isOn: Binding(
get: { self.viewModel.getFromDatabase(for: UpdateKnownSourcesOperation.self) },
set: { value in
self.viewModel.updateDatabase(for: UpdateKnownSourcesOperation.self, value: value)
}
))
}
CustomSection(header: Text("Backup Operations"))
{
CustomToggle("1. BackupApp", isOn: Binding(
get: { self.viewModel.getFromDatabase(for: BackupAppOperation.self) },
set: { value in
self.viewModel.updateDatabase(for: BackupAppOperation.self, value: value)
}
))
CustomToggle("2. RemoveAppBackup", isOn: Binding(
get: { self.viewModel.getFromDatabase(for: RemoveAppBackupOperation.self) },
set: { value in
self.viewModel.updateDatabase(for: RemoveAppBackupOperation.self, value: value)
}
))
}
CustomSection(header: Text("Activate/Deactive Operations"))
{
CustomToggle("1. RemoveApp", isOn: Binding(
get: { self.viewModel.getFromDatabase(for: RemoveAppOperation.self) },
set: { value in
self.viewModel.updateDatabase(for: RemoveAppOperation.self, value: value)
}
))
CustomToggle("2. DeactivateApp", isOn: Binding(
get: { self.viewModel.getFromDatabase(for: DeactivateAppOperation.self) },
set: { value in
self.viewModel.updateDatabase(for: DeactivateAppOperation.self, value: value)
}
))
}
CustomSection(header: Text("Background refresh Operations"))
{
CustomToggle("1. BackgroundRefreshApps", isOn: Binding(
get: { self.viewModel.getFromDatabase(for: BackgroundRefreshAppsOperation.self) },
set: { value in
self.viewModel.updateDatabase(for: BackgroundRefreshAppsOperation.self, value: value)
}
))
}
CustomSection(header: Text("Enable JIT Operations"))
{
CustomToggle("1. EnableJIT", isOn: Binding(
get: { self.viewModel.getFromDatabase(for: EnableJITOperation<DummyConformance>.self) },
set: { value in
self.viewModel.updateDatabase(for: EnableJITOperation<DummyConformance>.self, value: value)
}
))
}
CustomSection(header: Text("Patrons Operations"))
{
CustomToggle("1. UpdatePatrons", isOn: Binding(
get: { self.viewModel.getFromDatabase(for: UpdatePatronsOperation.self) },
set: { value in
self.viewModel.updateDatabase(for: UpdatePatronsOperation.self, value: value)
}
))
}
CustomSection(header: Text("Cache Operations"))
{
CustomToggle("1. ClearAppCache", isOn: Binding(
get: { self.viewModel.getFromDatabase(for: ClearAppCacheOperation.self) },
set: { value in
self.viewModel.updateDatabase(for: ClearAppCacheOperation.self, value: value)
}
))
}
CustomSection(header: Text("Misc Logging"))
{
CustomToggle("1. Anisette Internal Logging", isOn: Binding(
// enable anisette internal logging by default since it was already printing before
get: { OperationsLoggingControl.getUpdatedFromDatabase(
for: ANISETTE_VERBOSITY.self, defaultVal: true
)},
set: { value in
self.viewModel.updateDatabase(for: ANISETTE_VERBOSITY.self, value: value)
}
))
}
}
}
}
.navigationTitle(TITLE)
}
.ignoresSafeArea(edges: .all)
}
private func CustomList<Content: View>(@ViewBuilder content: () -> Content) -> some View {
// ScrollView {
List {
content()
}
// .listStyle(.plain)
// .listStyle(InsetGroupedListStyle()) // Or PlainListStyle for iOS 15
// .background(Color.clear)
// .background(Color(.settingsBackground))
// .onAppear(perform: {
// // cache the current background color
// UITableView.appearance().backgroundColor = UIColor.red
// })
// .onDisappear(perform: {
// // reset the background color to the cached value
// UITableView.appearance().backgroundColor = UIColor.systemBackground
// })
}
private func CustomSection<Content: View>(header: Text, @ViewBuilder content: () -> Content) -> some View {
Section(header: header) {
content()
}
// .listRowBackground(Color.clear)
}
private func CustomToggle(_ title: String, isOn: Binding<Bool>) -> some View {
Toggle(title, isOn: isOn)
.padding(3)
// .foregroundColor(.white) // Ensures text color is always white
// .font(.headline)
}
}
struct SettingsView_Previews: PreviewProvider {
static var previews: some View {
OperationsLoggingControlView()
}
}

View File

@@ -22,7 +22,7 @@
<color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="separatorColor" white="1" alpha="0.25" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<stackView key="tableFooterView" opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalCentering" alignment="center" spacing="15" id="48g-cT-stR">
<rect key="frame" x="0.0" y="1760.3333377838135" width="402" height="125"/>
<rect key="frame" x="0.0" y="1818.3333377838135" width="402" height="125"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="900" text="Follow SideStore for updates" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="XFa-MY-7cV">
@@ -530,7 +530,7 @@
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" rowHeight="51" id="hFh-X1-ZAi" customClass="InsetGroupTableViewCell" customModule="SideStore" customModuleProvider="target">
<rect key="frame" x="0.0" y="856.33333587646484" width="402" height="51"/>
<rect key="frame" x="0.0" y="863.33333587646484" width="402" height="51"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="hFh-X1-ZAi" id="nCs-Ro-A6t">
<rect key="frame" x="0.0" y="0.0" width="402" height="51"/>
@@ -562,7 +562,7 @@
<tableViewSection headerTitle="" id="J90-vn-u2O">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" rowHeight="51" id="i4T-2q-jF3" customClass="InsetGroupTableViewCell" customModule="SideStore" customModuleProvider="target">
<rect key="frame" x="0.0" y="947.66666984558105" width="402" height="51"/>
<rect key="frame" x="0.0" y="954.66666984558105" width="402" height="51"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="i4T-2q-jF3" id="VTQ-H4-aCM">
<rect key="frame" x="0.0" y="0.0" width="402" height="51"/>
@@ -606,7 +606,7 @@
</userDefinedRuntimeAttributes>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" rowHeight="51" id="oHX-oR-nwJ" customClass="InsetGroupTableViewCell" customModule="SideStore" customModuleProvider="target">
<rect key="frame" x="0.0" y="998.66666984558105" width="402" height="51"/>
<rect key="frame" x="0.0" y="1005.6666698455811" width="402" height="51"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="oHX-oR-nwJ" id="hN4-i5-igu">
<rect key="frame" x="0.0" y="0.0" width="402" height="51"/>
@@ -650,7 +650,7 @@
</userDefinedRuntimeAttributes>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" rowHeight="51" id="0MT-ht-Sit" customClass="InsetGroupTableViewCell" customModule="SideStore" customModuleProvider="target">
<rect key="frame" x="0.0" y="1049.6666698455811" width="402" height="51"/>
<rect key="frame" x="0.0" y="1056.6666698455811" width="402" height="51"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="0MT-ht-Sit" id="OZp-WM-5H7">
<rect key="frame" x="0.0" y="0.0" width="402" height="51"/>
@@ -694,7 +694,7 @@
</userDefinedRuntimeAttributes>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" rowHeight="51" id="O5R-Al-lGj" customClass="InsetGroupTableViewCell" customModule="SideStore" customModuleProvider="target">
<rect key="frame" x="0.0" y="1100.6666698455811" width="402" height="51"/>
<rect key="frame" x="0.0" y="1071.6666698455811" width="402" height="51"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="O5R-Al-lGj" id="CrG-Mr-xQq">
<rect key="frame" x="0.0" y="0.0" width="402" height="51"/>
@@ -734,7 +734,7 @@
<tableViewSection headerTitle="" id="OMa-EK-hRI">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" rowHeight="51" id="FMZ-as-Ljo" customClass="InsetGroupTableViewCell" customModule="SideStore" customModuleProvider="target">
<rect key="frame" x="0.0" y="1192.0000038146973" width="402" height="51"/>
<rect key="frame" x="0.0" y="1163.0000038146973" width="402" height="51"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="FMZ-as-Ljo" id="JzL-Of-A3T">
<rect key="frame" x="0.0" y="0.0" width="402" height="51"/>
@@ -767,7 +767,7 @@
</userDefinedRuntimeAttributes>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" rowHeight="51" id="Qca-pU-sJh" customClass="InsetGroupTableViewCell" customModule="SideStore" customModuleProvider="target">
<rect key="frame" x="0.0" y="1243.0000038146973" width="402" height="51"/>
<rect key="frame" x="0.0" y="1214.0000038146973" width="402" height="51"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="Qca-pU-sJh" id="QtU-8J-VQN">
<rect key="frame" x="0.0" y="0.0" width="402" height="51"/>
@@ -803,7 +803,7 @@
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" rowHeight="51" id="VrV-qI-zXF" customClass="InsetGroupTableViewCell" customModule="SideStore" customModuleProvider="target">
<rect key="frame" x="0.0" y="1294.0000038146973" width="402" height="51"/>
<rect key="frame" x="0.0" y="1265.0000038146973" width="402" height="51"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="VrV-qI-zXF" id="w1r-uY-4pD">
<rect key="frame" x="0.0" y="0.0" width="402" height="51"/>
@@ -836,7 +836,7 @@
</userDefinedRuntimeAttributes>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" rowHeight="51" id="VNn-u4-cN8" customClass="InsetGroupTableViewCell" customModule="SideStore" customModuleProvider="target">
<rect key="frame" x="0.0" y="1345.0000038146973" width="402" height="51"/>
<rect key="frame" x="0.0" y="1316.0000038146973" width="402" height="51"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="VNn-u4-cN8" id="4bh-qe-l2N">
<rect key="frame" x="0.0" y="0.0" width="402" height="51"/>
@@ -869,7 +869,7 @@
</userDefinedRuntimeAttributes>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" rowHeight="51" id="e7s-hL-kv9" customClass="InsetGroupTableViewCell" customModule="SideStore" customModuleProvider="target">
<rect key="frame" x="0.0" y="1396.0000038146973" width="402" height="51"/>
<rect key="frame" x="0.0" y="1367.0000038146973" width="402" height="51"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="e7s-hL-kv9" id="yjL-Mu-HTk">
<rect key="frame" x="0.0" y="0.0" width="402" height="51"/>
@@ -902,7 +902,7 @@
</userDefinedRuntimeAttributes>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" rowHeight="51" id="XW5-Zc-nXH" customClass="InsetGroupTableViewCell" customModule="SideStore" customModuleProvider="target">
<rect key="frame" x="0.0" y="1447.0000038146973" width="402" height="51"/>
<rect key="frame" x="0.0" y="1418.0000038146973" width="402" height="51"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="XW5-Zc-nXH" id="AtM-bL-8pS">
<rect key="frame" x="0.0" y="0.0" width="402" height="51"/>
@@ -942,7 +942,7 @@
<tableViewSection headerTitle="" id="lLQ-K0-XSb">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" rowHeight="51" id="daQ-mk-yqC" customClass="InsetGroupTableViewCell" customModule="SideStore" customModuleProvider="target">
<rect key="frame" x="0.0" y="1538.3333377838135" width="402" height="51"/>
<rect key="frame" x="0.0" y="1509.3333377838135" width="402" height="51"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="daQ-mk-yqC" id="ZkW-ZR-twy">
<rect key="frame" x="0.0" y="0.0" width="402" height="51"/>
@@ -978,7 +978,7 @@
</userDefinedRuntimeAttributes>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" rowHeight="51" id="hRP-jU-2hd" customClass="InsetGroupTableViewCell" customModule="SideStore" customModuleProvider="target">
<rect key="frame" x="0.0" y="1589.3333377838135" width="402" height="51"/>
<rect key="frame" x="0.0" y="1560.3333377838135" width="402" height="51"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="hRP-jU-2hd" id="JhE-O4-pRg">
<rect key="frame" x="0.0" y="0.0" width="402" height="51"/>
@@ -1014,7 +1014,7 @@
</userDefinedRuntimeAttributes>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" rowHeight="51" id="JoN-Aj-XtZ" customClass="InsetGroupTableViewCell" customModule="SideStore" customModuleProvider="target">
<rect key="frame" x="0.0" y="1640.3333377838135" width="402" height="51"/>
<rect key="frame" x="0.0" y="1611.3333377838135" width="402" height="51"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="JoN-Aj-XtZ" id="v8Q-VQ-Q1h">
<rect key="frame" x="0.0" y="0.0" width="402" height="51"/>
@@ -1050,7 +1050,7 @@
</userDefinedRuntimeAttributes>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" rowHeight="51" id="QOO-bO-4M5" customClass="InsetGroupTableViewCell" customModule="SideStore" customModuleProvider="target">
<rect key="frame" x="0.0" y="1691.3333377838135" width="402" height="51"/>
<rect key="frame" x="0.0" y="1662.3333377838135" width="402" height="51"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="QOO-bO-4M5" id="VTT-z5-C89">
<rect key="frame" x="0.0" y="0.0" width="402" height="51"/>
@@ -1075,6 +1075,39 @@
</tableViewCellContentView>
<color key="backgroundColor" white="1" alpha="0.14999999999999999" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<edgeInsets key="layoutMargins" top="8" left="30" bottom="8" right="30"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="style">
<integer key="value" value="2"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="boolean" keyPath="isSelectable" value="YES"/>
</userDefinedRuntimeAttributes>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" rowHeight="51" id="xtI-eU-LFb" customClass="InsetGroupTableViewCell" customModule="SideStore" customModuleProvider="target">
<rect key="frame" x="0.0" y="1713.3333377838135" width="402" height="51"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="xtI-eU-LFb" id="bc9-41-6mE">
<rect key="frame" x="0.0" y="0.0" width="402" height="51"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" text="Operations Logging Control" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="LW3-gm-lj5">
<rect key="frame" x="30" y="15.333333333333334" width="137.66666666666666" height="20.333333333333329"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="17"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" image="Next" translatesAutoresizingMaskIntoConstraints="NO" id="zl4-ti-HTW">
<rect key="frame" x="354" y="16.666666666666668" width="18" height="18.000000000000004"/>
</imageView>
</subviews>
<constraints>
<constraint firstAttribute="trailingMargin" secondItem="zl4-ti-HTW" secondAttribute="trailing" id="2MC-2C-NDd"/>
<constraint firstItem="LW3-gm-lj5" firstAttribute="centerY" secondItem="bc9-41-6mE" secondAttribute="centerY" id="4Ft-s9-hPY"/>
<constraint firstItem="zl4-ti-HTW" firstAttribute="centerY" secondItem="bc9-41-6mE" secondAttribute="centerY" id="8Gt-oe-nd0"/>
<constraint firstItem="LW3-gm-lj5" firstAttribute="leading" secondItem="bc9-41-6mE" secondAttribute="leadingMargin" id="Pg6-I4-3d4"/>
</constraints>
</tableViewCellContentView>
<color key="backgroundColor" white="1" alpha="0.14999999999999999" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<edgeInsets key="layoutMargins" top="8" left="30" bottom="8" right="30"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="style">
<integer key="value" value="3"/>

View File

@@ -80,6 +80,7 @@ extension SettingsViewController
case exportResignedApp
case verboseOperationsLogging
case exportSqliteDB
case operationsLoggingControl
}
}
@@ -1091,6 +1092,13 @@ extension SettingsViewController
}
}
case .operationsLoggingControl:
// Instantiate SwiftUI View inside UIHostingController
let operationsLoggingControlView = OperationsLoggingControlView()
let operationsLoggingController = UIHostingController(rootView: operationsLoggingControlView)
let segue = UIStoryboardSegue(identifier: "operationsLoggingControl", source: self, destination: operationsLoggingController)
self.present(segue.destination, animated: true, completion: nil)
case .responseCaching, .exportResignedApp, .verboseOperationsLogging : break
}