Abhishek Agarwal
NSBundle
BASE_URL
IS_DEBUG
Info.plist
//iosMain inside actual class private fun getBaseUrlFromBundle(): String { val bundle = NSBundle.Companion.mainBundle val baseUrl = bundle.objectForInfoDictionaryKey("BASE_URL") as? String return baseUrl ?: "" } private fun getEnvironmentFromBundle(): Environment { val bundle = NSBundle.Companion.mainBundle val isDebug = bundle.objectForInfoDictionaryKey("IS_DEBUG") as? String return if (isDebug?.lowercase() == "true") Environment.STAGE else Environment.PROD }
A modern programming language that makes developers happier.