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
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:
<MyFramework/MyFramework.h>
: Classic. Accept No Substitutes. Exclusive for iOS, and<MyFrameworkMac/MyFrameworkMac.h>
: Now Available on the Mac too! - From the People Who Brought You MyFramework
Adding XCFramework to framework project gives error: Include of non-modular header inside framework module
The folks at ACRCloud got this working. Here's what I had to do:
- In Xcode select File > New > Project > iOS > Framework
- Set Language to Swift and create it
- Drag and drop the ACRCloudSDK.xcframework into the project
- In Finder, open the xcframework > ios-arm64_armv7 > Headers and drag and drop those two files into your project alongside the xcframework
- In the MyFramework.h file, import those two header files
#import "ACRCloudConfig.h"
#import "ACRCloudRecognition.h"
- In your framework target's Build Phases > Link Binary With Libraries, make sure ACRCloudSDK.xcframework is Required
- Expand the Headers section in Build Phases and move the header files from Project to Public
You should now be able to build the framework without error and use ACRCloudRecognition without issue.
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
Error: Could not build Objective-C module 'Firebase'
There is only one way to solve this issue.
- Quit Xcode.
- Delete project's temp files located at
~/Library/Developer/Xcode/DerivedData
- Delete
ProjectName.xcworkspace
- Delete
Podfile.lock
file andPods
folder - Run
pod install
. - Open the newly created
ProjectName.xcworkspace
file and build.
Related Topics
Accessing iOS Safari Web Inspector from Windows MAChine
Black Screen After Presenting Modal View Controller in Current Context from Uitabbarcontroller
App Crashes on Enabling Camera Access from Settings iOS 8
Flutter iOS Build Failed an Error of Pod Files: Podfile Is Out of Date
Why Does Uicollectionview Log an Error When the Cells Are Fullscreen
Service Workers and iOS/Safari
Right Aligned Uitextfield Spacebar Does Not Advance Cursor in iOS 7
Change Uidatepicker Font Color
How to Select Range of Values When Using Arc4Random()
Uiview. Why Does a Subviews Outside Its Parent's Extent Not Receive Touches
Swiftui - Navigationlink Cell in a Form Stays Highlighted After Detail Pop
How to Get Visible Viewcontroller from App Delegate When Using Storyboard
Determine Mime Type from Nsdata
Wanted: How to Reliably, Consistently Select an Mkmapview Annotation
Uicollectionview Registerclass: Forcellwithreuseidentifier Method Breaks Uicollectionview
Rendering PDF in Uiwebview iOS 8, Causes a Black Border Around PDF