title: How to run a code for only once?
body: <p>I'm working on an iPhone app, and I'm wondering if I could run some code segment for only once (in other words: an initialization code, that I want it to be executed only at the very first run).
  Here's my code, that I execute it at <code>didFinishLaunchingwithOptions</code> method:</p>
  
  <pre><code>- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    
  
  // Override point for customization after application launch.
  
  // Add the tab bar controller's view to the window and display.
  [self.window addSubview:tabBarController.view];
  [self.tabBarController setSelectedIndex:2];
  [self.window makeKeyAndVisible];
  
  [self createPlist1];
  [self createPlist2];
  [self createPlist3];
  
  return YES;
  </code></pre>
  
  <p>}</p>
  
  <p>I want the last three messages to be executed only at the very first run. I thought I could use the UserDefaults and set a key after these messages executes (at the first run) and check for the value of that key at each run, but I'm feeling that there's a better idea -which I don't know.</p>
  
  <p>Thanks in advance.</p>