Apple had a hit with iOS — and that’s why it had to rebuild it