-1

I am new to Xcode, I have tried to create a simple program, there is no issues in the code and it builds as normal, but the iOS Simulator displays only black screen and is redirecting me to the AppDelegate.h File and it point the error in this line...

#import <UIKit/UIKit.h>

@class ViewController;

@interface AppDelegate : UIResponder <UIApplicationDelegate>

@property (strong, nonatomic) UIWindow *window; // Thread 1. Breakpoint 1.2

@property (strong, nonatomic) ViewController *viewController;

@end

Can anyone explain me the meaning of this error?

The error message...

I have enabled the NSZombie as you said and i had Thread 1. signal SIGABRT error. And i have this error also shown below the XCode.

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "ViewController" nib but the view outlet was not set.'

Linus Caldwell
  • 10,908
  • 12
  • 46
  • 58
caribbean
  • 748
  • 1
  • 9
  • 29
  • 2
    can you share the exact error statement – Lithu T.V Jun 10 '13 at 06:30
  • that's it. Thread 1. Breakpoint 1.2 as shown in the above code. – caribbean Jun 10 '13 at 06:32
  • enable `NSZombie` and re-run the App. Real details will be shown – Raptor Jun 10 '13 at 06:37
  • I have enabled the NSZombie as you said and i had **Thread 1. signal SIGABRT** error. And i have this error also shown below the XCode.. **Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "ViewController" nib but the view outlet was not set.'** – caribbean Jun 10 '13 at 06:44

2 Answers2

1

The error message shows that you have a nib file with a view controller in it but you haven't set the class of the "File's Owner" to the correct class of your UIViewController subclass.

In the nib file, select "File's Owner" and in the properties panel set the class (top text field in there).

Change it from "UIViewController" to "ViewController".

Then make sure the view is connected up correctly.

Fogmeister
  • 76,236
  • 42
  • 207
  • 306
0

That error means that in your xib file the file owner's (you should have it set to ViewController) view outlet was not set. You need to have the view outlet wired to a view in your xib.

e1985
  • 6,239
  • 1
  • 24
  • 39