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

@ -21,6 +21,7 @@ final class PushNotificationManager: NSObject, UNUserNotificationCenterDelegate
private let tokenDefaultsKey = "apns_device_token"
private let uploadedTokenDefaultsKey = "apns_uploaded_token"
///
override init() {
super.init()
}
@ -99,6 +100,7 @@ final class PushNotificationManager: NSObject, UNUserNotificationCenterDelegate
route(from: payload)
}
/// userCenter
nonisolated func userNotificationCenter(
_ center: UNUserNotificationCenter,
willPresent notification: UNNotification,
@ -111,6 +113,7 @@ final class PushNotificationManager: NSObject, UNUserNotificationCenterDelegate
completionHandler([.banner, .list, .sound, .badge])
}
/// userCenter
nonisolated func userNotificationCenter(
_ center: UNUserNotificationCenter,
didReceive response: UNNotificationResponse,
@ -123,6 +126,7 @@ final class PushNotificationManager: NSObject, UNUserNotificationCenterDelegate
}
}
///
private func route(from payload: PushPayload) {
guard let router else { return }
@ -142,6 +146,7 @@ final class PushNotificationManager: NSObject, UNUserNotificationCenterDelegate
}
}
/// HomeRoute
private func navigateHomeRoute(_ route: HomeRoute) {
guard let router else { return }
router.select(.home)

View File

@ -9,6 +9,7 @@ import Foundation
/// APNs token Data
enum APNsDeviceToken {
///
static func hexString(from data: Data) -> String {
data.map { String(format: "%02x", $0) }.joined()
}
@ -16,6 +17,7 @@ enum APNsDeviceToken {
/// payload extras/data
struct PushPayload: Sendable {
///
enum Route: Sendable, Equatable {
case payment
case order
@ -64,6 +66,7 @@ struct PushPayload: Sendable {
return .messageCenter
}
/// mergeJSON
nonisolated private static func mergeJSON(_ value: Any, into result: inout [String: String]) {
if let dict = value as? [String: Any] {
for (key, value) in dict {
@ -84,6 +87,7 @@ struct PushPayload: Sendable {
}
}
///
nonisolated private static func stringValue(_ value: Any?) -> String {
switch value {
case let string as String: