Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

no umbrella header found for target

Tags:

xcode

ios

swift

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

like image 921
user2727195 Avatar asked Jan 06 '23 10:01

user2727195


2 Answers

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.

like image 191
user2727195 Avatar answered Jan 09 '23 00:01

user2727195


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.

like image 38
matt Avatar answered Jan 08 '23 22:01

matt