amplitude/Amplitude-iOS — pull request #8 by michaelpetrov (2013-12-16 21:43:58+00:00)
Title: Fixing background task bug when app is minimized and maximized quickly a...

... few times causing a dangling task to never be ended.

This makes sure to end the background task on enterForeground and also end any existing background task within enterBackground. I can usually get this problem reproduced by quickly minimizing and maximizing the app a few times and then seeing iOS force close it 180 seconds later.