title: Undefined symbols for architecture in Xcode / Objective-C
body: <p>I wanted to refactor my iOS app written in Objective-C. I created a new class Utility (files Utility.h and Utility.m). </p>
  
  <p>This is my header Utility.h (Type: Default C Header)</p>
  
  <pre><code>//  Utility.h
  #import &lt;Foundation/Foundation.h&gt;
  #import &lt;UIKit/UIKit.h&gt; 
  NSAttributedString *attributedTitle(NSString *title);
  </code></pre>
  
  <p>This is my implementation file Utility.m (Type: Default - Objective-C Source)</p>
  
  <pre><code> // Utility.m
   #import "Utility.h"
   NSAttributedString *attributedTitle(NSString *title) {
      NSAttributedString *attributedTitle = [[NSAttributedString alloc] initWithString:title];
      return attributedTitle;
  }
  </code></pre>
  
  <p>This file is a member of my target and is added in the "Build Phases -> Compile Source" (first file in fact). Foundation and UIKit are also linked.</p>
  
  <p>I'm using this method in a different Objective-C file:</p>
  
  <pre><code>// OtherClass.m
  #import "OtherClass.h"
  #import "Utility.h"
  @implementation OtherClass
  - (id)init {
      self = [super init];
      if (self) {
           NSAttributedString *string = attributedTitle(@"hello");
           NSLog(@"%@", string);
      }
      return self;
  }
  @end
  </code></pre>
  
  <p>This .m file is also a member of my target. The error I'm receiving is </p>
  
  <pre><code>Undefined symbols for architecture x86_64 "_attributedTitle", referenced from:
            -[OtherClass.m init] in OtherClass.o
  </code></pre>