- 新增 Android SDK 使用文档,包含模块结构、集成方式和快速开始指南 - 添加 SDK API 重设计规范,统一初始化和登录接口设计 - 补充安全设计规范,完善 UserSig 鉴权和敏感数据处理方案 - 创建平台 REST API 规范,定义服务端到服务端的调用接口 - 添加离线推送架构设计,集成各大厂商推送服务与 IM 联动方案
41 行
859 B
Swift
41 行
859 B
Swift
import Foundation
|
|
|
|
public struct SDKConfig: Sendable {
|
|
public let appKey: String
|
|
public let appSecret: String
|
|
public let debug: Bool
|
|
|
|
public init(
|
|
appKey: String,
|
|
appSecret: String,
|
|
debug: Bool = false
|
|
) {
|
|
self.appKey = appKey
|
|
self.appSecret = appSecret
|
|
self.debug = debug
|
|
}
|
|
}
|
|
|
|
public extension SDKConfig {
|
|
static func development(
|
|
appKey: String,
|
|
appSecret: String,
|
|
debug: Bool = false
|
|
) -> SDKConfig {
|
|
SDKConfig(
|
|
appKey: appKey,
|
|
appSecret: appSecret,
|
|
debug: debug
|
|
)
|
|
}
|
|
}
|
|
|
|
extension SDKConfig {
|
|
var appId: String { appKey }
|
|
}
|
|
|
|
enum SDKEndpoints {
|
|
static let apiBaseURL = URL(string: "https://dev.xuqinmin.com")!
|
|
static let imWebSocketURL = URL(string: "wss://dev.xuqinmin.com/ws/im")!
|
|
}
|