Inside Apple’s 6-month race to make the first iPhone a reality