简体   繁体   中英

Azure Mobile Services crash

Using the ios WindowsAzureMobileServices.framework (v1.2.3) I get an [NSArray insertObject:atIndex] exception (object cannot be nil) in code I don't control when I use the following code to present a MSLoginController.

MSLoginController *loginController =
    [self.client
     loginViewControllerWithProvider:provider
     completion:^(MSUser *user, NSError *error)
     {
         //some code
     }];
    [controller presentViewController:loginController animated:YES completion:nil];

Any one have ideas how to rectify? Or why this is occurring?

I expanded the stack trace when the crash occurs and discovered UIAppearance calls were in the stack when the UIViewController was presented. After some digging into our appearance customization code the following code causes the crash:

[[UIBarButtonItem appearance] setStyle:UIBarButtonItemStylePlain];

The Azure library uses the UIToolbar in a different manner than was used elsewhere in the app and produced the exception.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM