Using HP AppPulse With iOS
Written by Benjamin Garrigues   
Thursday, 28 January 2016
Article Index
Using HP AppPulse With iOS
User-centric error reporting

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.

The App

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.

User interactions

The tutorial will provide error diagnostic examples based on the following simple user interactions:  

  • To-do description update. We purposely left the "Close" button enabled even when the text was empty, and show an alert box asking the user to fill in some text.  

  • 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.

 

Picture1

 

Picture2

 

Picture3 

 

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.


Picture4


Here's how AppPulse Mobile would automatically associate the error to the user action and report it on the main dashboard: 

Picture5

 

From there, you can click on the line to see additional details:

 

Picture6


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.



Last Updated ( Tuesday, 02 February 2016 )