Blog coding and discussion of coding about JavaScript, PHP, CGI, general web building etc.

Sunday, February 14, 2016

Swift Framework: Umbrella header '[...].h' not found

Swift Framework: Umbrella header '[...].h' not found


In a custom framework containing both Objective-C and Swift code, the Swift compiler throws the following error:

[build_path]/unextended-module.modulemap:2:19: error: umbrella header 'bugtest.h' not found    umbrella header "bugtest.h"                    ^  :0: error: could not build Objective-C module 'bugtest'  

Answer by Tim Bodeit for 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

Answer by Shadow_x99 for Swift Framework: Umbrella header '[...].h' not found


In XCode 7 Beta, with Swift2, 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

Answer by Vojtech Vrbka for Swift Framework: Umbrella header '[...].h' not found


In my Case it was caused by Enable Modules (C and Objective-C) - NO

Changing to YES fixed the problem.

Answer by Sashah for Swift Framework: Umbrella header '[...].h' not found


In my case I did the exact opposite of Vojtech Vrbka's answer and changed Enable Modules to NO on both my debug target as well as my test target.

Answer by Sourabh Verma for Swift Framework: Umbrella header '[...].h' not found


For me setting 'Use Header Maps' to 'NO' resolved the issue

Answer by Marius Ursache for Swift Framework: Umbrella header '[...].h' not found


If you're using Xcode 7.1 and CocoaPods 0.39, there seems to be a swift compiler change that affects some CocoaPods (Nimble, Quick, etc.) Try some of the solutions specified in the this thread: https://github.com/CocoaPods/CocoaPods/issues/4420 however, if neither of them work, try using Xcode 7.0.1 or 7.2 beta. You can get both of them here: https://developer.apple.com/downloads/.

Edit: In my case, to fix the issue, I also had to downgrade CocoaPods to 0.38.2.

Later edit: It seems not to be related to Xcode 7.1. Just downgrading CocoaPods to 0.38.2 should help:

sudo gem uninstall cocoapods -v 0.39  sudo gem install cocoapods -v 0.38.2  

Answer by arturgrigor for Swift Framework: Umbrella header '[...].h' not found


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.

Fix

Answer by Andrei A. for Swift Framework: Umbrella header '[...].h' not found


Your header file needs to be in the [Build Phases/Headers/Public] section.

If your header file is already in the [Build Phases/Headers/Public] section, many times doing the fallowing solved my problem:

  1. clean the project
  2. move the header file to the "private" or "project" section
  3. move the header file back to the "public" section
  4. rebuild everything again

Answer by zulkis for Swift Framework: Umbrella header '[...].h' not found


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.

Answer by Rafael for Swift Framework: Umbrella header '[...].h' not found


None of the 9 answers helped me, so I tried to create a new project which I could send to Apple to file a bug. I was surprised that I couldn?t reproduce the issue. I checked the build settings and they were equivalent. Apparently this is some kind of bug.

If nothing else helps, try to create a new project and import at least some Objective C & Swift classes from your current project, compare your framework-related build settings to the default values from the new project, and eventually move all files over to the new project.


Fatal error: Call to a member function getElementsByTagName() on a non-object in D:\XAMPP INSTALLASTION\xampp\htdocs\endunpratama9i\www-stackoverflow-info-proses.php on line 72

0 comments:

Post a Comment

Popular Posts

Powered by Blogger.