Disregard. I figured it out. After rotating the first time, the sun was at the angle it was supposed to rotate to the next time it was called. Thus, the action won't do anything if it is already at the desired angle.
Post
Replies
Boosts
Views
Activity
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.
It turns out I misspelled the "MacOS" folder as "MacOs" and that seems to have been causing the problem.
It turns out I misspelled the "MacOS" folder as "MacOs" and that seems to have been causing the problem.