title: Call Swift function from Objective-C class
body: <p>I have an old Objective-C project and I want to call new Swift function and object, I have create the file &quot;<code>&lt;ProjectName&gt;-Bridging-Header.h</code>&quot; and &quot;<code>&lt;ProjectName&gt;-Swift.h</code>&quot;</p>
  <p>was easy for me call the function from Swift to Objective-C but I have a problem for reverse.</p>
  <p>So I have create a simple class &quot;System.Swift&quot;</p>
  <pre><code>import Foundation
  
  @objc class System : NSObject {
  
      @objc func printSome() {
          println(&quot;Print line System&quot;);
      }
      
  }
  </code></pre>
  <p>now I have try to follow the documentation <a href="https://developer.apple.com/library/prerelease/ios/documentation/Swift/Conceptual/BuildingCocoaApps/MixandMatch.html#//apple_ref/doc/uid/TP40014216-CH10-XID_84" rel="noreferrer">here</a> and inside the <code>&lt;...&gt;-Swift.h</code> file I have write this</p>
  <pre><code>@class System;
  
  @interface System : NSObject
  
  -(void)printSome;
  
  @end
  </code></pre>
  <p>and I have import it inside my Objective-C Class. At this point inside my Objective C class (currently UIViewController) of my Objective-C code I have try to call &quot;printSome&quot; method:</p>
  <pre><code>- (void)viewDidLoad
  {
      [super viewDidLoad];
      System * sis = [[System alloc] init];
      [sis printSome];
      //any additional setup after loading the view from its nib.
  }
  </code></pre>
  <p>now I have the following Error:</p>
  <blockquote>
  <p>Undefined symbols for architecture i386:   &quot;<em>OBJC_CLASS</em>$_System&quot;,
  referenced from:
  objc-class-ref in &quot;ObjectiveC_Class_That_Call_Swift_Object&quot;.o ld: symbol(s) not found for architecture i386 clang: error: linker
  command failed with exit code 1 (use -v to see invocation)</p>
  </blockquote>