Apple is building a new iPhone factory in India as it shifts some production there from China.