2013-05-07 54 views
0

我的應用程序崩潰了一個非常奇怪的錯誤消息。NSInternalInconsistencyException - 在AppDelegate

的錯誤消息是

*** Assertion failure in -[UIStoryboard nibForViewControllerWithIdentifier:], /SourceCache/UIKit_Sim/UIKit-2372/UIStoryboard.m:115 
2013-05-06 19:07:04.543 SocialApp[2427:c07] GoogleAnalytics 2.0b3 void GAIUncaughtExceptionHandler(NSException *) (GAIUncaughtExceptionHandler.m:41): Uncaught exception: Invalid parameter not satisfying: [identifier length] > 0 
2013-05-06 19:07:09.586 SocialApp[2427:c07] 

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: [identifier length] > 0' 

*** First throw call stack: 
(0x317e012 0x2c73e7e 0x317de78 0x2817f35 0x19522ba 0x19523d9 0x37f78 0x15ec817 0x15ec882 0x153ba25 0x153bdbf 0x153bf55 0x1544f67 0x355a4 0x15087b7 0x1508da7 0x1509fab 0x151b315 0x151c24b 0x150dcf8 0x385bdf9 0x385bad0 0x30f3bf5 0x30f3962 0x3124bb6 0x3123f44 0x3123e1b 0x15097da 0x150b65c 0x334d 0x3275) 
libc++abi.dylib: terminate called throwing an exception 

該應用程序最初墜毀在該行

id<GAITracker> tracker = [[GAI sharedInstance] trackerWithTrackingId:googleAnalyticsKey]; 

,但之後我註釋掉線,它現在在

[window makeKeyAndVisible]; 

崩潰錯誤消息是相同的。我一直在努力修復它,但沒有解決方案。

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 
{ 
    commonClassInstance = [[Common alloc] init]; 
    configFileDictionary = [commonClassInstance returnConfigFileDictionary]; 
    resourceFileDictionary = [commonClassInstance returnResourceFileDictionary]; 

    //NSString *googleAnalyticsKey = [[configFileDictionary valueForKey:@"Keys"] valueForKey:@"GoogleAnalyticsKey"]; 

    // Instance to track Uncaught Exception 
    [GAI sharedInstance].trackUncaughtExceptions = YES; 

    // Optional: set Google Analytics dispatch interval to e.g. 20 seconds. 
    [GAI sharedInstance].dispatchInterval = 20; 

    // Optional: set debug to YES for extra debugging information. 
    [GAI sharedInstance].debug = NO; 

    // Create tracker instance. 
    // id<GAITracker> tracker = [[GAI sharedInstance] trackerWithTrackingId:googleAnalyticsKey]; 
//#pragma unused(tracker) 

    sleep(3); 

    // Override point for customization after application launch. 
    [window addSubview:navigationController.view]; 
    [window addSubview:newsViewController.view]; 
    [window addSubview:blogViewController.view]; 
    [window addSubview:careerViewController.view]; 
    [window addSubview:videoViewController.view]; 
    [window addSubview:photosViewController.view]; 
    [window addSubview:contactViewController.view]; 
    [window addSubview:stocksViewController.view]; 
    [window addSubview:executiveViewController.view]; 
    [window addSubview:companyInfoViewController.view]; 
    [window makeKeyAndVisible]; 

    return YES; 
} 
+0

這是一個剛剛開始崩潰的應用程序嗎?它是否爲每個人或只有一個用戶而崩潰? – canhazbits 2013-05-07 02:18:37

+0

'睡(3);'....呃......嗚嗚?那是不對的。不是你的問題,但這是代碼出錯的肯定標誌。 – bbum 2013-05-07 02:26:39

+0

你爲什麼要添加如此多的視圖?你是否一次顯示所有這些視圖? – danielbeard 2013-05-07 02:32:48

回答

0

確保googleAnalyticsKey非零且具有有效值。

除此之外,你的問題沒有足夠的線索。發佈實際崩潰的回溯。

相關問題