Obj-C modules do not work in the workspace

I have several classes that use the new @import module @import , and it works fine in my non-workspace project, but as soon as I transfer these files to the project in the workspace, I get the Unexpected '@' in program error similar to this question: @import "Unexpected" @ in the program " However, I have the Enable Modules build settings marked yes. This static library is also included in my workspace project. I am also tired of cleaning the assembly, no luck. Are there other settings who am I missing?

+6
source share
2 answers

Make sure you check the inclusion modules both in your project and in the goal of your static library and main project.

+3
source

Are you using Objective-C ++? @import does not work in .mm files.

+3
source

Source: https://habr.com/ru/post/956094/


All Articles