在iOS 10上发布应用崩溃

时间:2016-10-21 13:59:46

标签: ios xcode8 appdelegate nib rootviewcontroller

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

  • 任何建议

无法在bundle中加载NIB:'NSBundle(loaded)',名称为'RootViewController' 2016-10-21 18:59:45.588010 Dragon Inn [796:175032]完整追踪: 0 Dragon Inn 0x00000001000518f0 - [StackTracer generateTraceWithMaxEntries:] + 104 1 Dragon Inn 0x00000001000a5ac4 handleException + 120 2 CoreFoundation 0x000000018975c540 + 644 3 libobjc.A.dylib 0x0000000188194838 + 112 4 libc ++ abi.dylib 0x000000018818366c + 16 5 libc ++ abi.dylib 0x0000000188183234 __cxa_rethrow + 144 6 libobjc.A.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意外地抛出异常

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;

}

0 个答案:

没有答案