Apple does not allow an app to run in the background unless the app falls into certain category (VoIP, GPS, etc). Thus, Carat cannot run in the background. So how the app can collect data from your phone? One possibility is when you open Carat (iOS will not give an app any network/CPU time while it is sleeping/tombstoned). But we cannot assume that a user would open it every day, or even once a week. This means that we can only collect a few skewed data points when you use Carat - this would inturn mean we cannot provide any meaningful suggestion.
Fortunately, for us, iOS provides a few notification services which an app can subscribe to. Some of these are significant location change, battery level change, battery state change etc. Thus, when any of these events happen, iOS wakes Carat from sleep, and gives it a little CPU time - this is when it collects data. We subscribe to all light-weight notifications.
However, there is a caveat - if Carat is not sleeping, then these notifications won't work. This essentially means that if Carat is killed, then there is no way it can collect data. Bottomline: Carat needs to be sleeping/tombstoned. We started thinking how can we automatically restart Carat if a user kills it. This is where the location change comes in. The significant location change API also launches an application if it is not running along with notifying of location change. This is the main reason why we are using location services API. Also, for highly mobile users, Carat can collect more data if we subscribe to this notification.