title: What is the best way to create constants in Objective-C
body: <p>I am creating a Reddit client for learning purposes. I need to have a file with constants in it. I was thinking about importing the file in the <code>Reddit-Prefix.pch</code> file to make the constants available to all the files. <strong>Is it a good way of doing things?</strong> Also, I've done my research and found several methods to create constants, but I don't know which one to use:</p>
  
  <ul>
  <li><code>#define</code> macro</li>
  <li><code>const</code></li>
  <li><code>static const</code></li>
  <li><code>extern const</code></li>
  <li><code>enum</code></li>
  </ul>
  
  <p><strong>So which way is the preferred way? What is the convention?</strong> I know that "it depends" but my question more specifically is: <strong>What are the use cases for each of those solutions?</strong></p>
  
  <p>Also, if using <code>extern const</code>, do I need to import the file, or the constants will be available globally without importing the file?</p>
  
  <p>One thing I could logically conclude is that <code>enum</code> is the best choice when defining something like custom error domains (am I actually right?). But what about the others?</p>