tillerstarr
tillerstarr

Reputation: 2636

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?

Upvotes: 1

Views: 128

Answers (1)

tillerstarr
tillerstarr

Reputation: 2636

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.

Upvotes: 1

Related Questions