title: Include C++ and Objective C into Swift Framework
body: <p>I'm trying to build a Swift framework that includes C++ and OpenCV Framework for iOS</p>
  
  <p>As far as I understand we can't have a bridging header in framework, we have to deal with umbrella header.</p>
  
  <p>My issue is that XCode is not processing C++ file as C++, with that kind of compiler error :<br>
  <code>Unknown type name 'class'; did you mean 'Class'?</code>
  It also cannot find <code>&lt;iostream&gt;</code>  </p>
  
  <p>I currently have my umbrella that is including a objc wrapper for my C++ files.<br>
  What is the right way to do it ?   </p>
  
  <p><em>Below my framework umbrella header</em> </p>
  
  <pre><code>#ifdef __OBJC__
      #import &lt;UIKit/UIKit.h&gt;
      #import &lt;Foundation/Foundation.h&gt;
  #else
      #ifndef FOUNDATION_EXPORT
          #if defined(__cplusplus)
              #include &lt;iostream&gt;
              #define FOUNDATION_EXPORT extern "C"
          #else
              #define FOUNDATION_EXPORT extern
          #endif
      #endif
  #endif
  
  #import "AGImageDescriptor.h"
  #import "AGKitLib.h"
  #import "Detector.h"
  #import "Observable.h"
  #import "Shooter.h"
  #import "DocumentDetectedState.hpp"
  #import "DocumentMatchState.hpp"
  #import "GoodPerspectiveState.hpp"
  #import "GoodPositionState.hpp"
  #import "InactiveState.h"
  #import "ReadyState.hpp"
  #import "StartState.h"
  #import "State.h"
  #import "States.h"
  #import "TextDetectedState.hpp"
  #import "Tools.hpp"
  #import "OpenCVWrapper.h"
  #import "UIImage+OpenCV.h"
  
  FOUNDATION_EXPORT double AGKitScanVersionNumber;
  FOUNDATION_EXPORT const unsigned char AGKitScanVersionString[];
  </code></pre>
  
  <p>I am really not an C++ expert nor a C expert so I am probably missing something here.</p>