title: When & where to initialize extern variables from arbitrary message return values?
body: <p>The project I am working on stores some constant strings like this:<br>
  (.h)</p>
  
  <pre><code>extern NSURL *kURLLocationComputer;
  </code></pre>
  
  <p>And I need to initialize them as follows:<br>
  (.mm)</p>
  
  <pre><code>NSURL *kURLLocationComputer;
  
  ... {
        kURLLocationComputer = [[NSURL alloc] initWithString:@"computer:///"];
  ... }
  </code></pre>
  
  <p>The problem is that they are used from many various places in the project, and they need to be initialized first. But since some of the initializations are complex (not constant), they can't be done inline.</p>
  
  <p><strong>How should I ensure that they are initialized before being used?</strong> I was thinking of adding a dummy class and initializing the variables in <code>+load</code>, but I don't think one is allowed to assume that the Cocoa library classes are working by that point.</p>