Post not yet marked as solved
Post marked as unsolved with 3 replies, 6,200 views
Hello,hopefully, this is a real beginer question, so hopefully it is easy to answer …I want to create a new framework for an existing Objective-C app. And because Swift is all shiny, and we already are using Swift in other parts of the app, I am writing the framework in Swift.However, when I #include "${MODULENAME}-Swift.h" in my umbrella header, Xcode tells me on a clean compile: ‘'${MODULENAME}-Swift.h' file not found'If I comment that line, build, then uncomment it and build again, Xcode will find it. This, however, is unacceptable for, say, build servers.Questions:1) It appears, that when I am importing the Framework as a module (i.e. @import ${MODULENAME} ), I don't need to #include "${MODULENAME}-Swift.h" in my umbrella header.Is this true? Is it not necessary to explicitly expose the -Swift.h headers when importing the Framework as a module?2) This leads me to the next question:Do Swift Frameworks have to be imported as modules? The app is an old codebase and currently sets CLANG_ENABLE_MODULES to NO. Is it necessary to set this to YES when using a Swift Framework?3) Am I doing something wrong with the #import? If I can use the Framework not as a module, but #import <Framework/Umbrella.h> is good, what do I have to do to have{MODULENAME}-Swift.h available even on a clean compile?Again, hopefully these are simple questions, and someone can easily answer them 😉