3

We've been mixing swift with our mostly Obj-C project and it has been working fine. But when I need to add a .m file to the build phases of my extension that is importing "ProjectName-Swift.h", the extension cannot find that file. How can I fix this?

Nyne99
  • 31
  • 1
  • 3
  • I think you mean `ProjectName-Swift.h` right? – vigneshv Nov 21 '15 at 00:32
  • Are you importing `ProjectName-Swift.h` in an Obj-C header file or a .m file? – vigneshv Nov 21 '15 at 00:34
  • @vigneshv yes, thank you. in a the .m file. – Nyne99 Nov 21 '15 at 00:45
  • even tried creating a bridging header for the extension, which also created a new Objective-C Generated Interface Header Name : "ProjectName___Extension-Swift.h", but that can't be found either because im running it with the normal target, not the extension target. – Nyne99 Nov 21 '15 at 00:52

1 Answers1

4

You should double check your target settings, to make sure it's configured to generate the header and that the name of the header is supplied. You can find these settings quickly if you enter "header" in the search bar in the "Build Settings":

headers

Also, that header isn't generated until you compile, so do a "Product" - "Clean" and "Product" - "Build".

Rob
  • 415,655
  • 72
  • 787
  • 1,044