Added iOS sensor code