Step 1: Click Project->targets->build settings to search for modules and set
1.enable modules
2.link frameworks automatically to YES
Compile and run, if the problem still exists then go to the second step.
Step 2: Check whether the .mm file exists in the project, if it exists, the possible reason is that you use Objective-C++. modules are not applicable to c++. So you have two options, 1. Replace @import with #import. 2. Do not use objective-c++
Step 1: Click Project->targets->build settings to search for modules and set
1.enable modules
2.link frameworks automatically to YES
Compile and run, if the problem still exists then go to the second step.
Step 2: Check whether the .mm file exists in the project, if it exists, the possible reason is that you use Objective-C++. modules are not applicable to c++. So you have two options, 1. Replace @import with #import. 2. Do not use objective-c++