Apple has returned to growth as it sold more expensive iPhones, but the company's future is less certain than analysts thought. The company's stock popped in after-hours trade following its quarterly earnings report. The iPhone maker reported quarterly earnings and revenue that easily beat analysts' expectations on Tuesday, but gave future guidance on the lower end of expectations. - EPS:$3.36 vs. $3.21 expected by a Thomson Reuters consensus estimate - Revenue: $78.4 billion vs. $77.25 billion expected - iPhone shipments: 78.29 million vs. 77.42 million expected by StreetAccount estimates - Services revenue: $7.17 billion vs. $6.91 billion expected by StreetAccount - Fiscal Q2 guidance: Revenue of $51.5 billion to $53.5 billion, vs. $53.79 billion expected by Reuters That's better than comparable adjusted earnings of $3.28 per share on $75.9 billion in revenue in the year-ago period, breaking a losing streak for the company. Tim Cook, chief executive officer of Apple, left, holds an iPhone 7 Plus while speaking with dancer Maddie Ziegler during an event in San Francisco. This time last year, Apple reported a record quarter, with sales of iPhones at an all-time high. After that, it reported three straight quarters of lower year-over-year sales, adding up to its first yearly decline since 2001. CEO Tim Cook said on a conference call with investors there was especially strong demand for the iPhone 7 Plus —Apple's higher-end model — and that it made up a higher-than-expected share of sales. The average selling price of phones grew to $695 during the quarter, chief financial officer Luca Maestri said, up from $619 in the September quarter. The Mac also returned to growth, and posted its best sales ever, Cook said. "It was a dynamite quarter," CEO Cook told CNBC. "We are very excited about our pipeline." Shares rose more than 3 percent after hours. Apple's board of directors also declared a cash dividend of 57 cents per share. The world's biggest company had a massive cash pile of $246.09 billion during the quarter — larger than Sri Lanka's estimated 2016 gross domestic product — and $27 billion in operating cash flow. It's services revenue is now about the size of Facebook's revenue last quarter. Looking ahead, Apple is promising a sustained trend of year-over-year growth. Apple said on Tuesday it expects revenue of $51.5 billion to $53.5 billion, on the lower end of the expected range, though it is still above the $50.6 billion reported a year ago.Analysts polled by Thomson Reuters expected guidance of fiscal second quarter revenue of $53.79 billion, up 6.4 percent year-over-year. Cook has attributed the company's expected return to growth iPhone 7, but also to growth in services revenue and a "very bullish" long-term future in China, where sales fell 12 percent in the first fiscal quarter. "The U.S. and China need each other," Cook told CNBC. "The world needs the U.S. and China to win."