Posts

Post not yet marked as solved
1 Replies
I figured this out on my own. What's going on is there is a compiler optimizer that runs in release mode that was causing one of the while loops to be skipped. I can't help but wonder if this is a bug in the optimizer. To fix it, I went into build settings/Swift Compiler - Code Generation and set the optimizer to No Optimization [-Onone] for the release build. Now, the code is working everywhere. On a side note, you can run your code in release mode inside XCode by editing the scheme and choosing release. This will allow you to see how your code will behave in prod or Test Flight without deploying it.
Post not yet marked as solved
1 Replies
It turns out I misspelled the "MacOS" folder as "MacOs" and that seems to have been causing the problem.