Advance UIKit rewrite with AMap integration and core UI modules.

Integrate高德 SDK with simulator-safe build flags, add map views for operating area and punch points, refactor main tabs and key feature screens to UIKit with Diffable lists, and document Swift concurrency defaults in AGENTS.md.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-26 15:16:12 +08:00
parent 9edf993432
commit d99a5b1bf8
124 changed files with 5195 additions and 1536 deletions

View File

@ -14,6 +14,7 @@ final class RootViewController: UIViewController {
private var currentChild: UIViewController?
private let restoringView = UIView()
///
init(services: AppServices = .shared) {
self.services = services
super.init(nibName: nil, bundle: nil)
@ -24,6 +25,7 @@ final class RootViewController: UIViewController {
fatalError("init(coder:) has not been implemented")
}
///
override func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = .systemBackground
@ -38,11 +40,13 @@ final class RootViewController: UIViewController {
configurePushNotifications()
}
/// Toast Loading window
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
attachGlobalOverlays()
}
///
private func bootstrapSession() {
Task {
await services.globalLoading.withLoading {
@ -62,16 +66,19 @@ final class RootViewController: UIViewController {
}
}
///
private func configurePushNotifications() {
services.configurePushNotifications()
}
/// Toast Loading window
private func attachGlobalOverlays() {
guard let window = view.window else { return }
services.toastCenter.attachToWindow(window)
services.globalLoading.attachToWindow(window)
}
///
private func handleSessionPhaseChange() {
mountChild(for: services.appSession.phase)
@ -82,6 +89,7 @@ final class RootViewController: UIViewController {
}
Task { await reloadScenicSpotContextIfNeeded() }
case .loggedOut:
//
services.accountContext.reset()
services.permissionContext.reset()
services.scenicSpotContext.reset()
@ -93,6 +101,7 @@ final class RootViewController: UIViewController {
}
}
/// ID
private func reloadScenicSpotContextIfNeeded() async {
guard services.appSession.isLoggedIn else {
services.scenicSpotContext.reset()
@ -104,6 +113,7 @@ final class RootViewController: UIViewController {
)
}
/// Tab
private func mountChild(for phase: AuthPhase) {
let nextChild: UIViewController
switch phase {
@ -130,6 +140,7 @@ final class RootViewController: UIViewController {
currentChild = nextChild
}
///
private func restoringViewController() -> UIViewController {
let controller = UIViewController()
controller.view.backgroundColor = .systemBackground