You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm trying to integrate your TurboController into my turbo ios app and I'm getting the error: Thread 1: Fatal error: Unexpectedly found nil while unwrapping an Optional value on line 224:
let environment = ProcessInfo.processInfo.environment["ENVIRONMENT"]! as String
When I ran your demo on my local machine no problems, so is this a configuration issue on my end or code compatibility with newer version of iOS? I noticed under Deployment target your demo is set to 14.5, while mine is 15.2, but even if I change mine to 14.5 I keep getting the error. Any help would be greatly appreciated!
Thanks!
The text was updated successfully, but these errors were encountered:
I believe that this environment flag is only set when the app is run via Xcode. So when you run it on a device by tapping the icon it won't be set. You could change that line to something like this to default to production when running outside of Xcode.
let environment = ProcessInfo.processInfo.environment["ENVIRONMENT"] as? String ?? "PRODUCTION"
Replacing "PRODUCTION" with whatever environment you'd like to use.
@joemasilotti Thank you! That fixed the issue, but what's interesting is I ran your demo via Xcode and it does not produce the same error, that's throwing me off a little bit.
Running via Xcode is what sets the environment variable. So if you ran the demo against a device (or opened the demo via tapping the app icon) it will crash.
Hi, I'm trying to integrate your TurboController into my turbo ios app and I'm getting the error: Thread 1: Fatal error: Unexpectedly found nil while unwrapping an Optional value on line 224:
let environment = ProcessInfo.processInfo.environment["ENVIRONMENT"]! as String
When I ran your demo on my local machine no problems, so is this a configuration issue on my end or code compatibility with newer version of iOS? I noticed under Deployment target your demo is set to 14.5, while mine is 15.2, but even if I change mine to 14.5 I keep getting the error. Any help would be greatly appreciated!
Thanks!
The text was updated successfully, but these errors were encountered: