I have a project that uses CocoaPods and uses the 'SCLAlertView-Objective-C' pod. That pod uses the @import UIKit;
module style import. I've set "Enable Modules (C & Objective-C)" and the "Link Frameworks Automatically" to YES in both my target and project settings. I am still getting the "Use of '@import' when modules are disabled" error.
Is there anything that could prevent Xcode from being able to enable Modules such as the use of a .pch file, any linker flags, or anything else I haven't mentioned? I also tried to clean the project and the project build folder. That didn't have any effect.
Also worth noting is that my project has multiple targets and also has a deployment target of iOS 7.0. My Base SDK is set to iOS 8.3.
I guess your project contains XXX.mm files, however, the xcode only enable C and objective-c modules.
Please have a look at this answer for your reference: Using @import in objective C in conjunction with __cplusplus
my solution is modify the @import xxx into #import .
Good luck.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With