I'm struggeling with Modules in a project. Where I use @import I get "Use of '@import' when modules are disabled". But why are they disabled?
- In my build settings I have "Enable modules (C and Objective-C)" set to Yes for all targets.
- Setting "Link Frameworks Automatically" to Yes or No does not impact this (compile-time) error
- Although the project used to have Objective-C++ and some C++ code, it doesn't anymore. Are there any project-settings I can have missed that were set because of this?
- I have no more .pch files in the project, and the build settings have no mention of them
- I use CocoaPods (0.39.0) with "use_frameworks!" and the modules I wish @import are from there. But the same error happens if I replace the '#import ' or '#import ' with '@import Foundation;' and '@import UIKit', so I expect this is not related
- The project is from pre-iOS7 so I might have missed a setting that used to be on by default
- The project requires iOS 8 and builds against iOS 9.2.
I realize that loading third-party modules will probably slow down the apps loading time. I'm converting to CocoaPods with use_frameworks! so that I can measure by how much. If it's not too bad, I'd like to use as I'm planning to move multiple swift-only parts of the codebase into their own frameworks (as open source coocapods)
I believe that this is not be a duplicate of other questions on SO since I've gone through the ones I found (big thank-you to this one), followed the links, re-watched WWDC'13 session 404, and read the related posts on Apples forums, so I believe I've done my homework. :-)