Apple had never built anything so complex. But it was at a crossroads.