Apple gains push U.S. indices higher