user2727195
user2727195

Reputation: 7340

no umbrella header found for target

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

Upvotes: 4

Views: 6238

Answers (2)

matt
matt

Reputation: 536027

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.

Upvotes: 4

user2727195
user2727195

Reputation: 7340

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.

Upvotes: 5

Related Questions