I have an API key defined on my CI/CD platform like so:
export API_KEY="XXXXXXXXXX"
Is there a way I can somehow compile this variable with my build so that I can reference it in Swift and not have to worry about the variable being defined in the binary's environment at runtime? I can't use ProcessInfo.processInfo.environment
obviously, because the API key is only defined in my CI/CD environment. I want to have my binary compiled with the key so that when I distribute my app the key is available to use.
My use case is that I want to avoid putting an API key in my git repository, and instead fetch it from the CI/CD platform when the build is generated. If there is a way to inject an environment variable that then gets compiled as part of the binary, that would be ideal.