Skip to content

Commit 76a7821

Browse files
authored
Add Crash me (#198)
Allow users to crash the app and test crash reporting
1 parent d7d1c98 commit 76a7821

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Sample/Instabug Demo/ViewController.m

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ - (instancetype)initWithCoder:(NSCoder *)aDecoder {
2727
@"Invoke with different modes...",
2828
@"Set primary color",
2929
@"Show intro message",
30-
@"Show unread messages count"
30+
@"Show unread messages count",
31+
@"Crash me"
3132
];
3233
}
3334

@@ -66,6 +67,8 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
6667
[Instabug showIntroMessage];
6768
} else if (indexPath.row == 6) {
6869
[self showUnreadMessagesCount];
70+
} else if (indexPath.row == 7) {
71+
[self crashMe];
6972
}
7073

7174
[tableView deselectRowAtIndexPath:indexPath animated:YES];
@@ -180,4 +183,8 @@ - (void)showUnreadMessagesCount {
180183
[self presentViewController:alertController animated:YES completion:nil];
181184
}
182185

186+
- (void)crashMe {
187+
[[[NSArray alloc] init] objectAtIndex:100];
188+
}
189+
183190
@end

0 commit comments

Comments
 (0)