2

I want to know if it is possible to add a Bridging-Header.h inside a .framework.

My goal is to have my framework compliance for swift.

Cœur
  • 37,241
  • 25
  • 195
  • 267
anté75
  • 167
  • 1
  • 1
  • 8
  • I think, here is answer on your question http://stackoverflow.com/questions/24875745/xcode-6-beta-4-using-bridging-headers-with-framework-targets-is-unsupported – Andrey Gagan Nov 26 '14 at 15:45
  • It is not exact the same question. I don't want to use SWIFT in my framework but want that people who have SWIFT code can integrate easily my framework. – anté75 Nov 26 '14 at 15:51
  • It may not be necessary. Try creating a Swift project, add a reference to your framework, then add an import statement for your framework to the project's bridging header (not the framework's). See if the project can use your framework. – Mike Taverne Nov 26 '14 at 21:33
  • If I do this that will work, but I need to create a documentation a little more complicate for the developper who use my framework. Most of time that not iOS developper but cross-platforme developper that why I want to have the most easy way for them. If they are not other possibility I will do this. Thanks – anté75 Nov 27 '14 at 08:55

1 Answers1

1

I don't have find solution to add bridging header file inside my framework but have find other solution. That is to explain how to create a bridging header file without import Objective-C file.

For people who want to do this be careful when you indicate the path in Objective-C Bridging Header under Swift Compiler - Code Generation to your bridging header file. It is important to to this in your Target build setting and not in your project build setting else you will be have an error.

anté75
  • 167
  • 1
  • 1
  • 8