no umbrella header found for target, module map will not be generated
Add a CKCountdownButton.h
in framework fixed this issue.
I think the umbrella header means the header file with same name like Framework
no umbrella header found for target
so I learned about build phases and under header for Logger, i added logger.h in it's public interfaces.
Is it a bug or I don't know that Xcode didn't add any headers for the 3rd target/module automatically, it did add for the second one.
I added another target just for the test and header file is included, so this problem happens if you add a 3rd target/module (framework).
Hope it helps someone.
Umbrella Header Not Found When Changing Target Name or Product Name of Framework
It turns out the "umbrella header" is no other than the 'main' header for the framework that is created automatically by Xcode when you first create the project or framework target, and it must have the same name as the target (as explained, for example, here).
As to why both target and product must me named the same, I can only guess it has to do with keeping linking not too complicated (Apps are not 'linked against', so I guess there is no damage in the product name being anything you want).
I was trying to get away with a Single Header to Rule Them All (platforms), using TargetConditionals.h etc. to import either Cocoa.h or UIKit.h, which is impossible, because Xcode won't let you use the same name for both targets, and those have to match the name of their headers!
So, I settled for:
: Classic. Accept No Substitutes. Exclusive for iOS, and
: Now Available on the Mac too! - From the People Who Brought You MyFramework
Swift Framework: Umbrella header '[...].h' not found
This will happen, when the Always Search User Paths
setting is enabled for the Framework target.
Setting it to No
will resolve that error.
IMHO this is a bug in the Swift Compiler and I have filed a radar with Apple.
See rdar://21038443
ModuleMap: How can I set a relative path for the umbrella header?
My guess is you're modifying the generated modulemap. Create a modulemap file at /Users/Robert/Temp/MyProject/Sources/ModuleA/include/module.modulemap
containing:
module ModuleA {
umbrella header "ModuleA.h"
link "ModuleA"
export *
}
Run $ swift package clean
to remove the old generated modulemap in .build
directory and $ swift build
to confirm that the custom modulemap works.
Then delete the generated Xcode project and re-generate it.
Related Topics
iPhone Upload Multipart File Using Afnetworking
Ios: Keep an App Running Like a Service
iOS 8 - Can't Install Enterprise App
Swift 3.0 Error: Escaping Closures Can Only Capture Inout Parameters Explicitly by Value
In Swift, How to Avoid Both Optionals and Nil Object References
How to Create a Circular Progress Indicator for a Count Down Timer
In Swift, Array [String] Slicing Return Type Doesn't Seem to Be [String]
iOS 7 Sprite Kit Freeing Up Memory
Select Multiple Images (Uiimagepickercontroller or Photos.App Share Ui)
Swift 2.0 Calendar Components Error
Uilabel Layer Cornerradius Negatively Impacting Performance
How to Get Unique Id in iOS Device
Cleanest Way of Capturing Volume Up/Down Button Press on iOS 8
Sorting Nsarray of Dictionaries by Value of a Key in the Dictionaries
Ble Peripheral Disconnects When Navigating to Different Viewcontroller