I updated my xcode 9.4 to 10.1 and swift 3.3 to 4.2. I have the following code in my app, which iterates over a while loop and waits till flag (isReceivedAdTagResponse) becomes true.
while self.isReceivedAdTagResponse == false
{
continue
}
This code works fine in debug mode, but crashes in release mode. Strange is that the same code works in release mode too if I just add print statement.
while self.isReceivedAdTagResponse == false
{
print("hi")
continue
}
Somewhere I found the solution to change the "Optimization Level" build setting to None [-O0] and it works.
I want to release the app to the store. Will my app crash if I will keep run mode as debug mode and archive the release build?
Or do I must have to change the "Optimization Level" build setting to None [-O0] before releasing it. Is it a good practice?
I am little confused. Please guide.