I wanted to check if any warning showing in my project for implicit BOOL conversions at compile time where I can fix for Apple Silicon support. Apple mentioned in below document for enabling the compiler option -Wobjc-signed-char-bool-implicit-int-conversion to see those warnings. Can you help me where I can enable this option? I don’t find such option in project settings or scheme settings.
Question posted in Xcode
Whether you're new to Xcode or an experienced developer, our archive has everything you need to know about this integrated development environment (IDE). From basic functionalities to advanced features, our archive covers a wide range of Xcode-related questions and answers. Browse our archive now and find solutions to your Xcode questions, and take your app development skills to the next level
Whether you're new to Xcode or an experienced developer, our archive has everything you need to know about this integrated development environment (IDE). From basic functionalities to advanced features, our archive covers a wide range of Xcode-related questions and answers. Browse our archive now and find solutions to your Xcode questions, and take your app development skills to the next level
2
Answers
You can do this per target, but also for the whole project. The targets inherit from the project but can be customised as well. Anyhow, select your project (the top node in the tree view) and then select Build Settings.
Now you will see something like this if you scroll down and search enough. You can either set it as a custom flag (similar to the -Wno-unused-getter-return-value in the image) or you can set it if it is available as one of the Warnings just below the custom flags, it seems to be the Implicit Boolean Conversions warning.
You can achieve this via build settings as stated by skaak.
If you would prefer pragma declarations you can define:
#pragma clang diagnostic error "-Wobjc-signed-char-bool-implicit-int-conversion"