添加 iOS 基础架构与 SPM 依赖

This commit is contained in:
2026-07-06 14:59:55 +08:00
parent 4346b255e5
commit 3611547abe
6 changed files with 341 additions and 152 deletions

View File

@ -0,0 +1,74 @@
//
// NotificationName.swift
// suixinkan
//
import Foundation
/// `NotificationCenter`
///
enum NotificationName {
private static let prefix = "com.yuanzhixiang.suixinkan."
private static func name(_ suffix: String) -> Notification.Name {
Notification.Name(prefix + suffix)
}
// MARK: - Session
///
static let userDidLogin = name("userDidLogin")
/// 退
static let userDidLogout = name("userDidLogout")
/// Token
static let sessionDidExpire = name("sessionDidExpire")
// MARK: - Scenic
///
static let scenicDidChange = name("scenicDidChange")
// MARK: - User Profile
///
static let userProfileDidUpdate = name("userProfileDidUpdate")
// MARK: - Message
///
static let unreadMessageCountDidChange = name("unreadMessageCountDidChange")
// MARK: - Order
///
static let orderDidUpdate = name("orderDidUpdate")
// MARK: - Task
///
static let taskDidUpdate = name("taskDidUpdate")
// MARK: - Scenic Queue
///
static let scenicQueueDidUpdate = name("scenicQueueDidUpdate")
// MARK: - Voice Call
///
static let voiceCallStateDidChange = name("voiceCallStateDidChange")
}
/// `Notification.userInfo`
enum NotificationUserInfoKey {
static let scenicId = "scenicId"
static let scenicName = "scenicName"
static let orderId = "orderId"
static let taskId = "taskId"
static let unreadCount = "unreadCount"
static let voiceCallState = "voiceCallState"
}