Are Apple's China troubles finally in the rear-view mirror? 

Apple (AAPL - Get Report) shares were up 4.1% in after-hours trading Tuesday after it posted better-than-expected results on earnings per share ( $2.18 vs. $2.09 consensus) and revenue ($53.8 billion vs. $53.3 billion). Revenues returned to growth on an annual basis, albeit modestly, with its quarterly revenue improving by 1% compared to a year ago. 

Despite further declines in iPhone sales, which were down 12% year-over-year, Apple's revenue outcome was helped by some significant bright spots -- an improved sales picture in China, and strength in its wearables business. 

Revenue for Apple's wearables, home and accessories segment came in at $5.5 billion for the quarter, and Apple executives highlighted the Apple Watch as a top growth story for both the segment and for Apple generally. Some 75% of customers who bought an Apple Watch last quarter were buying their first one, they said. 

"Wearables is doing extremely well," said CEO Tim Cook. "We stuck with that when others perhaps didn't." 

In China, Apple's second-largest sales market, sales declined just 4.1% annually, compared to a 21% decline in the second quarter, and grew slightly on a constant currency basis. For investors who are weathering the storm of tariff threats and halting trade negotiations with China -- which is also Apple's main manufacturing base -- that was good news.

"The return to growth in mainland China was a very pleasant surprise," said D.A. Davidson analyst Tom Forte. "What would make me feel better is a productive outcome from the current U.S.-China conversations taking place in Shanghai. Independent of that, the performance in the June quarter was very encouraging." 

Cook attributed the China improvement to a confluence of factors: a government stimulus to boost the economy, a trade-in programs and other proactive pricing action by Apple, and "growing engagement with the broader Apple ecosystem." 

In response to a question about how sustainable the China sales picture looks, Cook sounded similarly optimistic. He said that trade-ins as a percentage of total sales was "significant," but pointed to the strength of retail sales as a particularly good sign. 

"Retail, Apple Stores led to growth in June...we feel very good about the trajectory," he said. 

For the September quarter, Apple's revenue guidance of $61 billion to $64 billion came in above a $60.9 billion consensus. Apple investors also have a number of launches coming up this fall, including an August launch of the Apple Card, fall launches of Apple TV+ and Apple Arcade, and a new lineup of iPhones expected in September. 

"iPhone sales were a bit light, though the June quarter is always tricky," added Jerry Braakman, chief investment officer at First American Trust, who said he's looking for signs of pent-up iPhone demand this quarter. "A good number of people skipped the last iPhone cycle, so does that mean there's some pent-up demand?"

Year-to-date, Apple's stock is up 32.8%.

Apple is a holding in Jim Cramer's Action Alerts PLUS Charitable Trust Portfolio. Want to be alerted before Cramer buys or sells these stocks? Learn more now.