0

我面临一个问题,例如应用程序在启动时崩溃,我试图导航到 RootViewController 但应用程序不断崩溃,请查看下面的崩溃报告,特别是应用程序仅在 iOS 10 中崩溃

  • 任何建议

无法在包中加载 NIB:“NSBundle(已加载)”,名称为“RootViewController”2016-10-21 18:59:45.588010 Dragon Inn[796:175032] 完整跟踪:0 Dragon Inn 0x00000001000518f0 -[StackTracer generateTraceWithMaxEntries:] + 104 1 Dragon Inn 0x00000001000A5AC4 Handle Exception + 120 2 CoreFoundation 0x000000018975C540 + 644 3 Libobjc.a.dylib 0x00000188194838 + 112 4 Libc ++ abi.dylib 0x000000000100 abi_18888888881881881881881818181818166c + 165.18818366cc.dylib 0x000000018819471c objc_exception_rethrow + 44 7 CoreFoundation 0x00000001896360bc CFRunLoopRunSpecific + 560 8 GraphicsServices 0x000000018b0b9198 GSEventRunModal + 180 9 UIKit 0x000000018f610628 + 684 10 UIKit 0x000000018f60b360 UIApplicationMain + 208 11 Dragon Inn 0x000000010007ff14 main + 124 12 libdyld.dylib 0x00 2016-10-21 18:59:51.327601 Dragon Inn[796:175032] Condensed Intelligent Trace: handleException __cxa_rethrow objc_exception_rethrow CFRunLoopRunSpecific GSEventRunModal UIApplicationMain main libc++abi.dylib: terminate_handler unexpectedly throw an exceptionterminate_handler 意外抛出异常terminate_handler 意外抛出异常175032] 精简智能跟踪:handleException __cxa_rethrow objc_exception_rethrow CFRunLoopRunSpecific GSEventRunModal UIApplicationMain main libc++abi.dylib:terminate_handler 意外抛出异常175032] 精简智能跟踪:handleException __cxa_rethrow objc_exception_rethrow CFRunLoopRunSpecific GSEventRunModal UIApplicationMain main libc++abi.dylib:terminate_handler 意外抛出异常

APPDELEGATE.m

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

    appUrl = @"";

    strCurrentCity = @"";
    dBI = [[databaseInteraction alloc]init];
    [databaseInteraction check_Create_DB];
    isRootPushed = NO;
    self.checkForNewVersion = TRUE;

    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];


    LoadingViewController *masterViewController = [[LoadingViewController alloc] initWithNibName:@"LoadingViewController" bundle:nil];
    self.navigationController = [[UINavigationController alloc] initWithRootViewController:masterViewController];
    [self.navigationController setNavigationBarHidden:YES animated:NO];
    self.window.rootViewController = self.navigationController;
    [self.window makeKeyAndVisible];



    //Crash Report

    [[CrashManager sharedInstance] manageCrashes];
    [[CrashManager sharedInstance] setCrashDelegate:self selector:@selector(notifyException:stackTrace:)];
    NSString* errorReport = [CrashManager sharedInstance].errorReport;
    if(nil != errorReport) {
        NSDictionary *dic = [NSDictionary dictionaryWithObjects:[NSArray arrayWithObject:[NSString stringWithFormat:@"Dragon Inn : %@", errorReport]] forKeys:[NSArray arrayWithObject:@"errorText"]];

        NSString *post = [dic JSONRepresentation];
        isJson = TRUE;
        setLoderDown = FALSE;
        req = [[Request alloc] initWithURLByPost:NSLocalizedString(@"crash-report", nil) PostString:post withMethod:@"POST" withDelegate:self withTag:100];
    }

    //=================

    if(devicetoken == nil || devicetoken == NULL) {
        devicetoken = @"";
    }

    //====================



    locationManager = [[CLLocationManager alloc] init];
    [locationManager setDistanceFilter:kCLDistanceFilterNone];
    [locationManager setDesiredAccuracy:kCLLocationAccuracyKilometer];
    [locationManager startUpdatingLocation];
    [locationManager setDelegate:self];

    if([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0) {
        [locationManager requestWhenInUseAuthorization];
        //[locationManager requestAlwaysAuthorization];
    }



    if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0)
    {
        [[UIApplication sharedApplication] registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes:(UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge) categories:nil]];
        [[UIApplication sharedApplication] registerForRemoteNotifications];
    }
    else
    {
        [[UIApplication sharedApplication] registerForRemoteNotificationTypes:
         (UIUserNotificationTypeBadge | UIUserNotificationTypeSound | UIUserNotificationTypeAlert)];
    }

    [UIApplication sharedApplication].applicationIconBadgeNumber = 0;

    return YES;

}

4

0 回答 0