title: Linking External Constants -- Objective C
body: <p>In <a href="https://stackoverflow.com/questions/538996/constants-in-objective-c">an earlier answer about external constants</a>, the preferred answer says</p>
  
  <blockquote>
    <p>"Constants.m should be added to your application/framework's target so
    that it is linked in to the final product."</p>
  </blockquote>
  
  <p>I am using Xcode 4 and can't see how this is done. Can someone help me with this?</p>
  
  <p>I'm trying to move my user interface constants to a single file so I can manage them from one place. (I'm not interested in using a singleton for this case.)</p>
  
  <hr>
  
  <p>Based on the answer provided below, I was able to make this work. The .h and .m files are very simple:</p>
  
  <p>Constants.h</p>
  
  <pre><code>#pragma mark - Calendar Settings
  extern const CGSize _kTileSize;
  </code></pre>
  
  <p>Constants.m</p>
  
  <pre><code>#import "Constants.h"
  
  #pragma mark - Calendar Settings
  const CGSize _kTileSize = { 46.f, 44.f };
  </code></pre>
  
  <p>Note that there is no interface and no implementation, Since it is not a class. I did add the files as instructed in the answer, except I selected new file... objective c class. Then I deleted the interface and implementation sections.</p>
  
  <p>Now that I have it working I will add more constants to the file.</p>