XuqmGroup-iOSSDK/Sources/XuqmSDK/Core/SDKConfig.swift

41 行
859 B
Swift

2026-04-21 22:07:29 +08:00
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")!
}