marcoarment / BugshotKit

iOS in-app bug reporting for developers and testers, with annotated screenshots and the console log.
MIT License
1.36k stars 138 forks source link

Allow user to confirm their design to bring up BugshotKit UI. #20

Closed epatey closed 10 years ago

epatey commented 10 years ago

We've found, particularly with the shake gesture, that users get confused by the BugshotKit UI. They don't know what they did to induce it, and some of them don't know what it is for.

This pull request adds the optional ability for the application to confirm with the user their intent to bring up the UI.

It also provides a opportunity to teach the user what BugshotKit is for. In our case, we put up a simple alert that says something like "Would you like to report a bug or provide feedback? Yes/No". If they shook the phone by mistake, the user now understands what happened. Plus, they now know what to do in the future if they do want to report a bug.

Here's our application code that uses this feature.

BugshotKit.sharedManager.confirmationBlock = ^(void (^confirmedBlock)(BOOL shouldShow)) {
  [UIAlertView alertViewWithTitle:nil
                          message:@"Would you like to report a bug or provide feedback?"
                cancelButtonTitle:@"No"
                otherButtonTitles:@[@"Yes"]
                        onDismiss:^(int buttonIndex) {
                            confirmedBlock(YES);
                        }
                         onCancel:^{
                             confirmedBlock(NO);
                         }];
  };
marcoarment commented 10 years ago

I'm not sure this is a good idea. BugshotKit is only intended for development and beta testing, and the idea is that you'd include some description of how and why to invoke it in your tester instructions/documentation.

Having a confirmation alert (or a method of confirming invocations that's most likely to just contain an alert in most cases) is a pretty clunky solution and should be avoided if possible.

I'd rather delay this for now and see if tester confusion becomes a widespread issue.

epatey commented 10 years ago

No problem. Just sharing.