Apple says staggering consumer demand for new iPhones has helped the company report record-smashing earnings for its latest quarter and primed its stock for a rally.