title: How do I call Swift code from Objective-C in a Framework target?
body: <p>When you add a Swift file to an Objective-C project, Xcode will generate a Swift-to-ObjC header, as described here: <a href="http://ericasadun.com/2014/08/21/swift-calling-swift-functions-from-objective-c/" rel="nofollow">http://ericasadun.com/2014/08/21/swift-calling-swift-functions-from-objective-c/</a></p>
  
  <p>Without this header it is not possible to call Swift code from Objc-C. However Xcode is not auto-generating this header for my framework target.</p>
  
  <p>If I create an Objective-C <em>app</em> and drop a Swift file into it, then it does auto-generate one, so I suspect it's because I'm building a framework and not an app. Without one its not possible to use the Swift code from the Obj-C code.</p>
  
  <p>I tried using the one which was generated for the app (after renaming it and putting it in the appropriate DerivedData folder ) but Xcode didn't update it and actually it will eventually delete it, so manually creating or trying to maintain this file is not feasible.</p>
  
  <p><strong>How can I make Xcode generate this header for a framework target</strong>, so that I can call my Swift code from my Obj-C code?</p>
  
  <p>And remember folks: the question is about calling Swift from Obj-C not calling Obj-C from Swift.</p>