Investors have been hearing talk of a potential recession for nearly a year now. While the global economy still faces an array of challenges that present hurdles for companies across virtually every industry, certain companies continue to prove their resilience. 

Two such resilient companies are Apple and Chewy, and their shares make excellent buy-and-hold investments now, regardless of whether another bear market appears on the horizon in 2023. 

1. Apple 

Apple (AAPL -0.49%) maintained its dominant position in the world of consumer tech through a fair number of economic cycles. While smartphones remain its top source of revenue and profits, it has consistently demonstrated that the versatility of its business model can lend it resilience in a wide range of market environments. Even though shifting consumer spending patterns have resulted in decelerating growth on its top and bottom lines, Apple still has a rock-solid balance sheet.

Over the trailing three-year period, Apple's annual revenue increased by 44%, while its operating income rose by 80%. Meanwhile, it boosted its cash on hand by 51%. In its most recently reported quarter, net sales totaled $95 billion and net income came to $24 billion. Both those figures were down slightly on a year-over-year basis, but were up 63% and 115%, respectively, on a three-year basis.

Currently, smartphones account for a little over half of Apple's net sales, while more than one-fifth is attributable to its services segment, which includes the App Store, as well as a wide variety of subscription-based offerings such as Apple TV+ and Apple Music. It also includes its financial products, like its recently launched "buy now, pay later" service and its advertising segment.  

Besides the fact that Apple has proven to be a cash and profit machine time and time again throughout the years, I love the fact that it's a business with a proven ability to maintain its strong financial position from its flagship products while dipping into fragmented, lucrative industries.

Take its advertising business, for example. VP of Advertising Todd Veresi stated last year that Apple's goal is to take this business to $10 billion annually in the coming years. Meanwhile, market research firm Insider Intelligence estimates that Apple already rakes in $4 billion in revenue annually from advertising, and investment bank Evercore pegs the company's annual ad revenue potential at $30 billion by 2026.  

The tech giant hit another all-time high for its installed base of devices in the most recent quarter. Patient investors can still expect a lot of upside from this stock. 

2. Chewy 

Chewy (CHWY 0.52%) has come a long way from its early days as an online pet goods retailer. It's now a behemoth that boasts a footprint across many lucrative areas of the pet care market. While many retailers have found the current economic environment difficult to swallow, Chewy benefits from the reality that much of the spending by owners on their pets and animals is not discretionary in nature. 

From food to bedding to medicines to pet health insurance plans to easy access to licensed vets through Chewy's telehealth service, the company is rapidly evolving into a one-stop shop designed to meet the needs of pet owners in the digital age. Management noted on the company's fiscal first-quarter earnings call that spending on healthcare, consumables, and nondiscretionary items accounted for the majority of its sales for the period.  

In fact, these categories accounted for more than 84% of Chewy's net sales in its fiscal first quarter, which ended April 30. Recurring sales are the driving force behind Chewy's overall net sales growth. The company reported $2.8 billion in net sales for fiscal Q1, up 15% on a year-over-year basis. Sales derived from Chewy's Autoship program were responsible for about 75% of that total -- more than $2 billion.   

Not only are customers buying from Chewy regularly, they are also, on average, spending more with the company. In fiscal Q1, net sales per active customer (NSPAC) over the preceding four quarters hit $512. This was an increase of nearly 15% from the previous year. Both the Autoship sales figure and the NSPAC figure set records for Chewy.

Chewy is slowly but surely building a track record of profitability. Fiscal 2022 was the first year the company turned a profit on an annual basis, and it booked $22 million in net income in its most recent quarter. There's a lot to like about this business, and with its recent announcement that it plans to expand into its first international market (Canada) later this year, the best may be yet to come.