1

I am seeing following warning message, when I build target ABC.

ABC was compiled with optimization - stepping may behave oddly; variables may not be available.

I have made sure about optimization (GCC_OPTIMIZATION_LEVEL = 0), but still build is showing above message.

How to resolve this issue?

Tanmay
  • 1,091
  • 1
  • 9
  • 15

3 Answers3

1

In Xcode go to Product > Scheme > Edit Scheme...

and change the Build Configuration from "Release" to "Debug" (within the "Run" menu under "Info").

Schomes
  • 156
  • 6
1

Xcode generally throws this type of error when compiler optimisation level is set other than None in debug mode. To do it follow below steps.

Step 1: Go to your build settings

Step 2: Search for SWIFT_OPTIMIZATION_LEVEL

Step 3: Go to Optimization level in debug mode.

Step 4: Change it into None[-Onone].

enter image description here

Krishnarjun Banoth
  • 1,410
  • 1
  • 15
  • 30
0

Try turning off the 'Debug Executable' in scheme settings. But I do not know if this is recommended.

Allan Macatingrao
  • 2,071
  • 1
  • 20
  • 28