fork download
  1. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  2. {
  3. self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
  4. // Override point for customization after application launch.
  5. if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
  6. self.viewController = [[ViewController alloc] initWithNibName:@"ViewController_iPhone" bundle:nil];
  7. } else {
  8. self.viewController = [[ViewController alloc] initWithNibName:@"ViewController_iPad" bundle:nil];
  9. }
  10. self.window.rootViewController = self.viewController;
  11. [self.window makeKeyAndVisible];
  12. return YES;
  13. }
  14.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.m:1:1: error: unknown type name 'BOOL'
prog.m:1:1: error: unknown type name 'UIApplication'
prog.m:1:1: error: unknown type name 'NSDictionary'
prog.m:2:1: error: method definition not in @implementation context
prog.m:3:5: error: 'self' undeclared here (not in a function)
prog.m:3:21: error: 'UIWindow' undeclared here (not in a function)
prog.m:3:53: error: 'UIScreen' undeclared here (not in a function)
prog.m:5:8: error: 'UIDevice' undeclared here (not in a function)
prog.m:5:55: error: 'UIUserInterfaceIdiomPhone' undeclared here (not in a function)
prog.m:6:30: error: 'ViewController' undeclared here (not in a function)
prog.m:6:6: error: cannot find interface declaration for 'NSConstantString'
prog.m:6:100: error: 'nil' undeclared here (not in a function)
prog.m:8:30: error: 'ViewController' undeclared here (not in a function)
prog.m:8:98: error: 'nil' undeclared here (not in a function)
prog.m:12:12: error: 'YES' undeclared here (not in a function)
prog.m:12: confused by earlier errors, bailing out
stdout
Standard output is empty