Description
I have a problem with environment variables. When I build my app and it's running, everything goes fine, but when I press "stop" or I archive it for app store, the environment variable returns nil (or an empty string, I'm not quite sure yet).
How to reproduce:
- Build the app
- Run it on the simulator ("Hello world" will appear)
- Stop the app
- In the simulator, go back in the app ("Hello word" won't appear)
Minimal reproduction:
class ViewController: UIViewController {
@IBOutlet weak var label: UILabel!
override func viewDidLoad() {
super.viewDidLoad()
label.text = ProcessInfo.processInfo.environment["testVariable"]
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
}
}
The label Outlet references a simple storyboard
And here is the config for my env variables
Finally, here is a minimal reproduction of the problem on a github repo https://github.com/MasterBroki/test-environment-variable
Thanks for your answers!