In a custom framework containing both Objective-C and Swift code, the Swift compiler throws the following error:
[build_pat
For me - access level was public but it also fails on umbrella not found. I did move the "Headers" section of the "Build phases" to the top and it started to work. Script to podfile:
post_install do |installer|
installer.pods_project.targets.each do |target|
phase_name = 'Headers'
target.build_phases.each do |phase|
if (phase.display_name.include? phase_name)
target.build_phases.unshift(phase).uniq! unless target.build_phases.first == phase
end
end
end
Have no clue why it is happening. Tried on dummy projects - not happening. Only on big ones with multiple dependencies. Something with compiling BEFORE copying umbrella headers.
This usually happens after a project rename or something like that. The problem is that the umbrella header is no longer listed as a Public header. Check the attached image to see how to fix this.
In Xcode 7 Beta, with Swift 2, it will also happen if your Framework Header is not declared as "Public"
For instance, I had a Cocoa Touch Framework with a "Project" visibility for the header file, and the error "Umbrella Header ... not found" for all Swift files in my project, once I had the header "Public", the error went away
I solved this by renaming my module.modulemap to moduleXYZ.modulemap and changing the modulemap file name in the project settings