skip to Main Content

Getting this error when trying to run the iOS Project from Flutter and Xcode. My Xcode version is 14.3

3

Answers


  1. This issue is happening due to Xcode version update to 14.3. May be for some reasons compiler is not understanding the semantics of Obj-c files which are created automatically while working on flutter project.

    A workaround and swift solution to this problem is to revert to Xcode 14.2 and it will be working. May be you can also wait for another Xcode update but for now I will say to revert to 14.2 as currently no such solution is available at Apple Forums as well.

    Login or Signup to reply.
  2. I’ve not dug into this issue all that much, but a few workarounds that just helped me build a large project that was hitting this (Hammerspoon):

    • turn off ‘Treat Warnings as Errors’ (aka -Werror)
    • turn off ‘Pedantic Warnings’ (aka -pedantic)
    • turn off ‘-Weverything’
    • and/or add ‘-Wno-error=declaration-after-statement’

    As always your milage may differ, but HTH.

    Login or Signup to reply.
  3. I have attempted to follow what Gidney has suggested, however, it looks like the -Weverything and -Wno-error=declaration-after-statement flags are not available from within the project file, so perhaps the compiler is now interpreting the warning as an error and it won’t compile. I have an example that I am seeing
    mixing_declarations_c99

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