satichchinni pitani satichchinni pitani - 1 year ago 49
iOS Question

Can we show alert when application gets crash in ios?

I need to check when application gets crash i want show one alert view instead of closing app. please tell me if any solution.

Answer Source

Just use error handling methods @try ,catch in catch block u can show error in alertView

UIAlertView *alert = [[UIAlertView alloc]
                  initWithTitle:@"Crashing....."
                  message:@"Error is"
                  delegate:self
                  cancelButtonTitle:@"Cancel"
                  otherButtonTitles:@"OK"];