Apple's earnings climbed 12 percent to $8.7 billion in the company's latest quarter amid rising demand for iPhones while the iPad snapped out of nearly four-year sales slump.

Revenue increased 7 percent from last year to $45.4 billion.

The fiscal third-quarter results announced Tuesday exceeded analysts' projections for the period spanning from April to July 1.

Just as importantly, Apple predicted revenue for its current quarter ending in September will range from $49 billion to $52 billion. That's better than Apple's performance last year when its popular line of iPhone 7 phones came out.

The upbeat forecast is likely to ease concerns that production problems might delay the release of Apple's next-generation iPhone, which typically comes out in late September. That model is expected to boast a higher-quality screen and several other new features.

If the release of the next iPhone was going to be delayed until October or even later, analysts were expecting Apple to lower its revenue projections for the current quarter to below $45 billion.

Luca Maestri, Apple's chief financial officer, declined to comment on the timing of the next iPhone during an interview with The Associated Press.

Besides a bigger and better screen, the next iPhone is expected to include wireless charging and facial recognition technology to unlock the device, based on software coding that Apple mistakenly leaked.

People are still snapping up the iPhone 7 and iPhone 7 Plus [pictured above] that came out last September, according to Maestri. He said those models are the main reason Apple sold 41 million iPhones in the past quarter, a 2 percent uptick from last year.

In a long-awaited turnaround, Apple sold 11.4 million iPads in the quarter, a 15 percent increase from last year. It's the first time Apple's quarterly sales of iPads have improved from the previous year since the final three months of 2013. Maestri cited Apple's efforts to sell more iPads in classrooms as the main reason for the comeback.