Customers waited overnight at Apple stores around the world to be among the first to purchase the next generation of the iPhone.