Page 1 of 2
HP AppPulse Mobile is performance monitoring software for mobile apps, which tracks user experience and reports it using relevant dashboards. It provides user-centric monitoring, without requiring a single new line of code. This iOS tutorial shows it in action.
Beyond regular crashes (which AppPulse Mobile also reports), this tutorial will focus on the various levels of error reporting that AppPulse Mobile provides, to help you monitor unexpected app behaviors.
To follow along you can register for an AppPulse Mobile trial account by clicking on this link.
For this tutorial, we will use a basic iOS application that lets you create To-do tasks, and mark them as “Done” when they're complete. In addition, this application will send a tweet using the Twitter API whenever you complete a task. It is coded using the Swift programming language.
The tutorial will provide error diagnostic examples based on the following simple user interactions:
Pressing the "Done" button. When a user presses the "Done" button for a given To-do task, the app tries to update statistics and a tweet. This action can trigger multiple types of errors (HTTP errors, account access error dialog boxes, etc.), which are all automatically reported under the same action in AppPulse Mobile.
App Launch. Although this type of user interaction seems pretty obvious for this app, some crashes may actually occur upon launching an app. In our case, since we're using the CoreData framework, we will throw an NSException if anything goes wrong when initializing the DB stack. Note that AppPulse Mobile automatically reports un-caught NSExceptions, but we'll take this opportunity to show how we can manually report NSExceptions to AppPulse Mobile by adding some code if we want to.
Errors on "Close"
AppPulse Mobile automatically detects when an error alert is shown to the user. When an alert is displayed, AppPulse Mobile sends its content (title and body) to its machine learning algorithms for text analysis, to classify if the message is an error or not. If the text looks like an error message, it is shown in the "Errors" panel.
In our case, pressing the "Close" button after editing a To-do task, while leaving the title blank, triggers an alert.
Here's how AppPulse Mobile would automatically associate the error to the user action and report it on the main dashboard:
From there, you can click on the line to see additional details:
Note that you can always tell AppPulse Mobile that this isn't really an error, by simply clicking "Not an error" (text in red). Once you've done that, those alert messages will no longer be considered errors.