Does anybody know how I can grab an environment variable in Swift?
Swift 3 and up:
import Foundation if let value = ProcessInfo.processInfo.environment["KEY"] { ... }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With