iOS: add another test case
iOS: fix a bug.
iOS: save events to file when application is going to terminate