Reputation: 12787
My app crashes on iPad simulator in alternate builds, crash then run then crash, etc.
objc[1116]: Class Protocol is implemented in both /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/usr/lib/libobjc.A.dylib and /Users/NGA24iMAC3/Library/Application Support/iPhone Simulator/4.2/Applications/C0FFA7D7-7684-4854-B641-62BD11CFD226/Innovations.app/Innovations. One of the two will be used. Which one is undefined.
2011-02-09 11:53:01.446 Innovations[1116:207] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "PadLoginScreen" nib but the view outlet was not set.'
*** Call stack at first throw:
(
0 CoreFoundation 0x01286be9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x013db5c2 objc_exception_throw + 47
2 CoreFoundation 0x0123f628 +[NSException raise:format:arguments:] + 136
3 CoreFoundation 0x0123f59a +[NSException raise:format:] + 58
4 UIKit 0x004a2b75 -[UIViewController _loadViewFromNibNamed:bundle:] + 295
5 UIKit 0x004a0709 -[UIViewController loadView] + 120
6 UIKit 0x004a05e3 -[UIViewController view] + 56
7 UIKit 0x0049ea57 -[UIViewController contentScrollView] + 42
8 UIKit 0x004af201 -[UINavigationController _computeAndApplyScrollContentInsetDeltaForViewController:] + 48
9 UIKit 0x004ad831 -[UINavigationController _layoutViewController:] + 43
10 UIKit 0x004aeb4c -[UINavigationController _startTransition:fromViewController:toViewController:] + 524
11 UIKit 0x004a9606 -[UINavigationController _startDeferredTransitionIfNeeded] + 266
12 UIKit 0x004b083e -[UINavigationController pushViewController:transition:forceImmediate:] + 932
13 UIKit 0x004a94a0 -[UINavigationController pushViewController:animated:] + 62
14 Innovations 0x00006172 -[SplashScreenController switchView] + 303
15 Foundation 0x001887a5 __NSFireTimer + 125
16 CoreFoundation 0x01267fe3 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 19
17 CoreFoundation 0x01269594 __CFRunLoopDoTimer + 1220
18 CoreFoundation 0x011c5cc9 __CFRunLoopRun + 1817
19 CoreFoundation 0x011c5240 CFRunLoopRunSpecific + 208
20 CoreFoundation 0x011c5161 CFRunLoopRunInMode + 97
21 GraphicsServices 0x01b52268 GSEventRunModal + 217
22 GraphicsServices 0x01b5232d GSEventRun + 115
23 UIKit 0x0040142e UIApplicationMain + 1160
24 Innovations 0x00002e70 main + 102
25 Innovations 0x00002e01 start + 53
)
terminate called after throwing an instance of 'NSException'
Program received signal: “SIGABRT”.
But all outlet set correctly in IB.Please help me.Thanx in advance.
Upvotes: 2
Views: 975
Reputation: 2949
Upvotes: 0
Reputation: 10011
@Ishu i think that something is wrong with your connections in IB.I know you checked your IB but can you make your .xib file once again.
Upvotes: 3
Reputation: 574
I also faced same problem in my Universal app .
I did something like this that solved my problem -
- (id)initWithNibName:(NSString *)n bundle:(NSBundle *)b
{
return [self init];
}
- (id)init
{
BOOL iPad = NO;
#ifdef UI_USER_INTERFACE_IDIOM
iPad = (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad);
#endif
if (iPad)
{
// iPad specific code here
NSLog(@"Device is iPad");
[super initWithNibName:@"ContactUsViewController~ipad" bundle:nil];
} else
{
// iPhone/iPod specific code here
NSLog(@"Device is iPhone");
[super initWithNibName:@"ContactUsViewController" bundle:nil];
}
return self;
}
when you are adding/pushing viewController just call its init method and then push viewcontroller.
Upvotes: 0
Reputation: 58087
I suggest cleaning your project. Command + Shift + K
Next, open your XIB file and verify that the view outlet of the "File's Owner" is connected to your view. Of not connect and it and save.
Rebuild your project.
Upvotes: 0