Skip to content

Instantly share code, notes, and snippets.

@juliuscanute
Created May 30, 2020 05:32
Show Gist options
  • Save juliuscanute/10ff5082b1c7283f86546cfc1ebce477 to your computer and use it in GitHub Desktop.
Save juliuscanute/10ff5082b1c7283f86546cfc1ebce477 to your computer and use it in GitHub Desktop.
iOS MultiConfig Get
final class ConfigurationData: ObservableObject {
/*...*/
func setData(environment: String? = nil) {
/*...*/
let config: ConfigurationGetter = Environment.multiConfig!.getConfig()
let text = config.getConfigString(userKey: "C")
let visibility = config.getConfigBoolean(userKey: "A")
let size = Int(config.getConfigInt(userKey: "B"))
let currentChoice: KotlinPair = config.getConfigPair(userKey: "D")
let choiceNo: Int = Int(currentChoice.second as! Int32)
/*...*/
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment