Apple (AAPL 1.76%) was slow to the digital assistant / talking speaker game, and iPad sales have slipped. The company lacks new hits and has struggled to gain market share with its set-top box and its premium tablets.

None of that has mattered as the company has consistently delivered strong results powered by iPhone sales. That happened during the first half of 2017, pushing shares in Apple even higher.

An Apple store

Apple posted record results in Q1. Image source: Apple.

What happened

The company started the year by posting its highest revenue ever, taking in $78.4 billion and delivering earnings per share of $3.36. Those improved upon the year-ago quarter, when Apple delivered earnings of $75.9 billion and $3.28 in EPS.

"We sold more iPhones than ever before and set all-time revenue records for iPhone, Services, Mac and Apple Watch," said CEO Tim Cook in the Q1 earnings release. "Revenue from Services grew strongly over last year, led by record customer activity on the App Store, and we are very excited about the products in our pipeline."

In Q2 the company followed up those record results with another increase in revenue, going from $50.6 billion in Q2 2016 to $52.9 billion this year. EPS jumped from $1.90 to $2.10. The company also added $50 billion to its share buyback program, committing to a new cumulative total of $300 billion by the end of March 2019.

So what

While it seems like Apple will at some point weaken in the face of intense competition, that day has not yet happened. Its growing revenue, EPS, and increased buyback program caused a big jump in its share price in the first half of 2017.

After closing 2016 at $115.82, shares jumped to $144.02 at the end of June. That's a 24% increase, according to data provided by S&P Global Market Intelligence.

Now what

A new iPhone looms, probably for release in September, though there have been rumors that supply problems with parts will limit availability at launch. Still, even if the timing is off, Apple looks to continue to grow until a rival wins market share from the iPhone. In addition, the new phone could lead to even better numbers, if it proves true that higher-end "pro" models will be sold at higher price points.