title: Return Type of -application:didFinishLaunchingWithOptions:
body: <p>When developing for iOS, the first entry point for your app is the <code>-[AppDelegate  application:didFinishLaunchingWithOptions:]</code>. The return type of this method is a <code>BOOL</code>. By default, the return type of this method is <code>YES</code>. Here is the code automatically generated by Xcode.</p>
  
  <pre><code>- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  {
      self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
      // Override point for customization after application launch.
      self.window.backgroundColor = [UIColor whiteColor];
      [self.window makeKeyAndVisible];
  
      return YES;
  }
  </code></pre>
  
  <p>As you can see, Xcode puts in the return statement for you, with the value of <code>YES</code>. When I change the value of the return statement to <code>NO</code>, and don't change anything else, <strong>nothing happens</strong>. The app doesn't quit or show any unusual behavior. This begs the question, <strong>what is the purpose of the method returning a BOOL, when the returned value doesn't matter?</strong> If the value returned doesn't matter, why doesn't the method just return void?<br>
  Note: Some of my expectations after changing the return to <code>NO</code> were either </p>
  
  <ul>
  <li>Application doesn't launch because it doesn't receive "permission" (<code>NO</code> is returned)</li>
  <li>Either compiler generates warning, or error is raised at runtime.<br>
  Why is it the case that <strong>neither of these things happen?</strong></li>
  </ul>