Tools View & Crash Report & OOM Report

This commit is contained in:
世界
2026-04-23 08:12:52 +08:00
parent 73180f0230
commit b48f4ad97f
46 changed files with 4279 additions and 533 deletions
+2
View File
@@ -6,6 +6,7 @@ import UIKit
class ApplicationDelegate: NSObject, UIApplicationDelegate {
func application(_: UIApplication, didFinishLaunchingWithOptions _: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
NativeCrashReporter.installForCurrentProcess()
NSLog("Here I stand")
let options = LibboxSetupOptions()
options.basePath = FilePath.sharedDirectory.relativePath
@@ -28,6 +29,7 @@ class ApplicationDelegate: NSObject, UIApplicationDelegate {
}
options.commandServerListenPort = port
options.commandServerSecret = secret
options.crashReportSource = "Application"
var error: NSError?
LibboxSetup(options, &error)
LibboxSetLocale(Locale.current.identifier)
+11
View File
@@ -42,6 +42,17 @@
<key>NSApplicationServiceUsageDescription</key>
<string>Import sing-box profile from other devices</string>
</dict>
<dict>
<key>NSApplicationServiceIdentifier</key>
<string>sing-box:report-transfer</string>
<key>NSApplicationServicePlatformSupport</key>
<array>
<string>iOS</string>
<string>iPadOS</string>
</array>
<key>NSApplicationServiceUsageDescription</key>
<string>Export crash reports to other devices</string>
</dict>
</array>
</dict>
<key>UIBackgroundModes</key>
+7 -1
View File
@@ -28,7 +28,13 @@ struct MainView: View {
.focusSection()
}
.tag(page)
.tabItem { page.label }
.tabItem {
if page == .tools, environments.totalUnreadReportCount > 0 {
Label("\(page.title) (\(environments.totalUnreadReportCount))", systemImage: "terminal.fill")
} else {
page.label
}
}
}
}
.onAppear {