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.
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
3
Answers
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.
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):
As always your milage may differ, but HTH.
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