skip to Main Content

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.

https://developer.apple.com/documentation/apple_silicon/addressing_architectural_differences_in_your_macos_code

2

Answers


  1. 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.

    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.

    Login or Signup to reply.
  2. 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"

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search