brush51
brush51

Reputation: 5781

Crash on iOS6 presentViewController: but not on iOS5

This code is crashing when i run my app on iOS6 Simulator with Xcode 4.5 GM Seeds:

if ([[[UIDevice currentDevice] systemVersion] isEqualToString:@"6.0"]) {
    XLog(@"hier checken");

    self.tabBarController = [[UITabBarController alloc] init];

    self.window.rootViewController = self.tabBarController;
    [self.window makeKeyAndVisible];

}

[...]

self.loginController = [[[LoginController alloc] initWithNibName:@"LoginController_iPhone" bundle:nil] autorelease];

self.loginController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;

//this line occurs a crash on iOS 6 (simulator, device not tested)
[self.tabBarController presentViewController:self.loginController
                                        animated:YES
                                      completion:nil];  

The crash is a SIGABRT. no more information about the crash.

what is occuring this crash on iOS6?

Upvotes: 1

Views: 2145

Answers (2)

Carina
Carina

Reputation: 2260

initWithNibName:bundle: is the designated initializer for a UIViewController,and there is something new in iOS6 .

You can try to modify your LoginController_iPhone.xib and remove its controller :

enter image description here ----> enter image description here

It works for me . hope this helps.

Upvotes: 3

Nitin Alabur
Nitin Alabur

Reputation: 5812

An app i was working on, would crash without any trace when I was trying to access the address book. ABAddressBookRef or ABAddressBookCreate with the permission for your app to access Contacts turned off, will crash the app. Hope this helps!

Upvotes: -1

Related Questions