SAN FRANCISCO — Apple’s earnings climbed 12 percent to $8.7 billion in the company’s latest quarter amid rising demand for iPhones, iPads and Mac computers.

Revenue for the period 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.