AppState will change between one of 'active', 'background', or (iOS) 'inactive' when the app is closed or put into the background.