Traking position in background and foreground in ios, and upload this data to your api.