25 lines
670 B
Swift
25 lines
670 B
Swift
import Foundation
|
|
|
|
struct Const {
|
|
// Network
|
|
#if DEBUG
|
|
static let baseUrl = "staging.some.com/api"
|
|
#else
|
|
static let baseUrl = "prod.some.com/api"
|
|
#endif
|
|
static let requestTimeout = 15.0
|
|
static let networkLogging = true
|
|
|
|
// App
|
|
static var appVersion: String {
|
|
let info = Bundle.main.infoDictionary
|
|
let appVersion = info?["CFBundleShortVersionString"] as? String ?? "Unknown"
|
|
let appBuild = info?[kCFBundleVersionKey as String] as? String ?? "Unknown"
|
|
return "v \(appVersion)(\(appBuild))"
|
|
}
|
|
|
|
static var appName: String {
|
|
Bundle.main.bundleIdentifier ?? "Snikket iOS"
|
|
}
|
|
}
|