Files
e-party-iOS/yana/Configs/AppConfig.swift
edwinQQQ a0200c8859 feat: 添加项目基础文件和依赖管理
新增.gitignore、Podfile和Podfile.lock文件以管理项目依赖,添加README.md文件提供项目简介和安装步骤,创建NIMSessionManager、ClientConfig、LogManager和NetworkManager等管理类以支持网络请求和日志记录功能,更新AppDelegate和ContentView以集成NIM SDK和实现用户登录功能。
2025-05-29 16:14:28 +08:00

36 lines
823 B
Swift
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

enum Environment {
case development
case production
}
struct AppConfig {
static var current: Environment = {
#if DEBUG
return .development
#else
return .production
#endif
}()
static var baseURL: String {
switch current {
case .development:
return "http://beta.api.molistar.xyz"
case .production:
return "https://api.hfighting.com"
}
}
//
static var analyticsKey: String {
switch current {
case .development: return "dev_analytics_key"
case .production: return "prod_analytics_key"
}
}
//
static func switchEnvironment(to env: Environment) {
current = env
}
}