Apple (AAPL -2.19%) shares have climbed about 33% year to date despite two consecutive quarters of revenue declines. The company's history of consistent stock growth and dominance in consumer tech earned it patience from investors who believe in its long-term potential.

U.S. inflation has eased for 10 months in a row, but it remains elevated -- the Consumer Price Index was up 4.9% year over year in April. However, that was its smallest increase in two years. The challenging economic environment affects countless companies, and Apple has not gone unscathed. However, it continues to have excellent prospects once macroeconomic headwinds subside, thanks to its reliable iPhone business and its expansion into services. 

Here's why now is an exciting time to buy Apple stock. 

The power of the iPhone

The International Data Corporation reported last month that smartphone shipments fell by about 15% in the first quarter of 2023. Companies such as Samsung and Xiaomi suffered the brunt of the market contraction, with their shipments falling 19% and 23.5%, respectively. However, in Apple's fiscal Q2 2023, which ended in March, iPhone sales grew 2% year over year to $51.3 billion, beating analysts' expectations by $2.5 billion. Apple's other product segments didn't fare as well in the quarter, but the iPhone results are key considering the device provides more than half of the company's total revenue. 

Moreover, the iPhone has a leading market share in smartphones, which significantly boosts Apple's other efforts. Its unified ecosystem gives iPhone owners an incentive to pick Apple's other devices over those produced by competitors, which helps explain how the company won the largest market shares in tablets, smartwatches, and headphones. 

With that in mind, there's reason to have high hopes for Apple's expected entry into the virtual/augmented reality (VR/AR) market later this year with the launch of a new headset. That device could win it a market-leading share in a $31 billion industry that's projected to grow to $52 billion by 2027.

Expanding outside of products 

Apple's smartphone dominance helped it become the leader in multiple areas of consumer tech, attaining nearly unrivaled brand loyalty. And consumers' devotion to its devices brought millions of people to its services. 

The services segment includes platforms such as Apple TV+, Apple Music, iCloud, Apple Arcade, Apple News+, and Apple Fitness+, which reported the most growth in Q2 2023 at 5% year over year and earned the second-largest portion of revenue. Digital services are an increasingly lucrative business, reflected in the segment's profit margins of 71% compared to products' profit margins of 37%. Apple's venture into services strengthened its business through diversification, allowing it to lean less on product sales amid economic hurdles.

In addition to content services, Apple is making moves in the financial sector. After launching its first credit card in 2019, the company began offering savings accounts last month. Those accounts garnered nearly $1 billion in deposits in their first four days. The company's brand dominance has seen it achieve success in nearly every new market it has entered, increasing the reliability of its stock. 

Is Apple stock a buy, sell, or hold?

Apple's stock is trading at about 29 times its earnings, making it slightly expensive. However, its share price has soared by 266% over the last five years and 966% over the last decade. That history of consistent growth makes the stock a compelling buy at almost any time.

For instance, Warren Buffett's Berkshire Hathaway first bought Apple stock in 2016, and its shares have grown by more than 550% since then. Yet the conglomerate has continued to add to its stake, buying more shares as recently as Q4 2022.

Moreover, Apple's expected venture into VR/AR and continuously growing services business give the iPhone company an excellent outlook over the next year. So, if you're looking for a reliable stock to hold over the next decade, Apple is an incredibly compelling option right now.