4

There are answers on the stack overflow but none of them are working for me.

It's a Swift 2.0 project and I'm using Xcode 7.2.1

Steps to reproduce the problem

  1. Create a Single View Project
  2. Go to Targets in Project Navigator
  3. Add a Framework Module called Common
  4. Add another Framework Module called Logger
  5. Compile

You'll see a warning.

Warning: no umbrella header found for target 'Logger', module map will not be generated

Please advise

Test Project Link -> https://www.dropbox.com/s/cvgjls70ielnriy/Test.zip?dl=0

user2727195
  • 7,122
  • 17
  • 70
  • 118
  • see this once may be helps you http://stackoverflow.com/questions/30704268/no-umbrella-header-found-for-target-module-map-will-not-be-generated – Anbu.Karthik Mar 18 '16 at 12:47
  • this didn't solve either, can you please create an empty project (SingleView Application) at your end with two targets (Frameworks) and compile – user2727195 Mar 18 '16 at 12:53
  • @Anbu.Karthik I've uploaded a test project, can you please compile at your end. https://www.dropbox.com/s/cvgjls70ielnriy/Test.zip?dl=0 – user2727195 Mar 18 '16 at 13:23
  • Does this answer your question? [Swift Framework: Umbrella header '\[...\].h' not found](https://stackoverflow.com/questions/30355133/swift-framework-umbrella-header-h-not-found) – pkamb Dec 17 '19 at 22:56

2 Answers2

5

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.

user2727195
  • 7,122
  • 17
  • 70
  • 118
  • Absolutely right. What I see is that, following your instructions, what we end up with is that Common framework has both _Common.h_ and _Logger.h_ in its Build Phases headers, whereas Logger framework has no headers. Another way to see this: select _Logger.h_ and look at Target Membership in the File inspector: it's a member of the wrong target. – matt Mar 20 '16 at 04:01
  • This is a truly splendid bug and you have given wonderful instructions for reproducing it. I hope you will submit a bug report to Apple. Congratulations on fine work. Unfortunately I can only upvote you twice (once for the question and once for the answer). :) – matt Mar 20 '16 at 04:05
  • thanks for shedding more light on this the screenshot and I was wondering too why logger.h got added to the Common target. I've submitted the bug report as well. – user2727195 Mar 20 '16 at 04:38
  • Also thanks for approaching this problem through File inspector – user2727195 Mar 20 '16 at 04:45
4

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).

Actually there's no need to do that. Simply select Logger.h and use File Inspector:

enter image description here

As you can see, it has the wrong Target Membership; it has been added to the Common target. Simply uncheck Common and check Logger. Be sure to set the pop-up menu to Public.

matt
  • 515,959
  • 87
  • 875
  • 1,141