Adding a Debug Mode to an iPhone/iPad Domino Application (Notes / iNotes Notebook)
As you may know, we're selling NotesBook, an App for iPhone and iPad that takes the content of your Lotus Notes or iNotes Notebook to your iPhone or iPad. It's available in the Appstore right now.
NotesBook runs perfect for most customers, but here and there we get support calls about issues like login problems or synchronization problems. And in every case it's hard for us to determine what's going wrong on the device of the customer.
For our Lotus Notes or XPages Apps, we have logfiles, debug mode or we can look on the computer of the customer with TeamViewer. With these options, we can solve problems fast. But how should we debug an App on a customer's iPhone or iPad?
Luckily, NotesBook is developed with our Domino To Go solution. And Domino To Go already supported logging to the console, logging to a file and a debug mode.
So in the NotesBook code, we have logging like this:
With YN.log() one can log a message that's always displayed or only when a certain debug level is set.
Then we can decide if we want to enable debug mode and if we want to log to a logfile with
to disable the debug mode or
to enable debug mode level 1 with logging to file.
So we already had a good infrastructure to debug problems on the customer's side - we only needed an option to actually enable the debug mode from the App's settings and to mail the most recent logfile to our support staff. Implementing that was pretty easy:
In the App settings dialog I added a new section with a switch to enable debug mode. And if it's enabled, the button "Send logfile" becomes active.
So when there is a problem, the user only needs to enable debug mode, re-try the action that makes problems, come back to the settings dialog, hit the "Send logfile" button, review the automatically created mail and click the "Send" button to actually send the mail.
Then the logfile is mailed to our support and we can see what's happening behind the scenes. Easy to handle for the customer, and makes it much much much more easier for the support staff to help.
Every Domino To Go mobile App can do it easily the same way.