Familiarity breeds comfort.

At least, that's the case with the iPhone 7. Apple hardly changed the body of its flagship phone, yet consumers cozied up to the device like never before.

Apple sold more iPhones than ever before -- 78.3 million -- and snapped a three-quarter streak of iPhone unit sales declines. Analysts had expected the company to sell 78 million iPhones in the period, Apple's biggest of the year. The results fueled its highest-quarter revenue and per-share earnings ever.

"We sold more iPhones than ever before and set all-time revenue records for iPhone, Services, Mac and Apple Watch," Apple CEO Tim Cook said in a press 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."

Now playing: Watch this: iPhone 7 breaks Apple's sales records

Apple's fortunes, as always, swing with the iPhone. The company generates about two-thirds of sales from the device. And a lot of revenue not directly from the iPhone, like services, is also tied to the phone. But Apple, like other handset makers, is facing waning excitement over phones, something that led its iPhone sales to drop for the first time ever in 2016.

While the iPhone 7 isn't quite the blockbuster that the 2-year-old iPhone 6 was, it still offered some features that drew in the Apple faithful. The iPhone 7 and the 7 Plus added features like better cameras and water resistance, all in that familiar body.

Cook noted the company saw especially strong demand for the iPhone 7 Plus, the bigger version of the phone that also has a more advanced camera with two lenses. A higher percentage of the total iPhones sold came from the Plus model than in the past, he said during a call with analysts.

The iPhone 7 helped Apple take back the title of the world's top smartphone vendor in the December quarter, according to Strategy Analytics. Globally, 18 percent of phone shipments in the period came from Apple. Samsung, which faced a massive Note 7 recall due to faulty batteries, dropped to second place, the firm said.

"This was the iPhone's best performance for over a year, as Apple capitalized on Samsung's recent missteps," Strategy Analytics analyst Neil Mawston said.

There's hope the upcoming "iPhone 8," the 10th anniversary device, will make people excited about phones again.

"The smartphone is still in the early innings of the game," Cook said. "I think there's lots more to do... We've got some exciting things in the pipeline. I still feel really, really good about it."

Everything else

iPhone sales might have been strong, but iPad demand continued to falter. Apple sold 13.1 million iPads during the quarter, down from 16.1 million a year ago. Analysts expected Apple to sell 14.8 million iPads. This is the 12th straight quarter of lower iPad sales despite Apple's efforts to revitalize the market with its Pro models. The pricier iPad Pros work with optional styluses and keyboard cases.

Consumers bought 5.4 million Macs in the three months before and including December, compared with analysts' projections for 5.2 million. A year ago, Apple sold 5.3 million Macs. Apple in October made the first major changes to its MacBook Pro line in four years, adding a Touch Bar and other features to modernize the computers.

Revenue from Apple's services businesses, like iTunes and AppleCare, continued to jump in the quarter, up 18 percent to $7.2 billion.

Cook said he expects services revenue to be the size of a Fortune 100 company this year. Already, Apple has 150 million paid customer subscriptions for its own services and paid third party content, he said during a call with analysts. "The goal is to double the size of our services business in the next four years," Cook said.

The company doesn't break out Apple Watch sales and unit numbers, but Cook said both set a record in the quarter. Holiday demand was "so strong we couldn't make enough," he said.

Apple's net income slid to $17.9 billion from $18.4 billion. Per-share earnings, though, rose to $3.36 from $3.28 a year ago. Analysts polled by Yahoo Finance expected Apple to report earnings of $3.22 a share. Apple had fewer shares in the market, which boosted the per-share earnings.

Overall revenue climbed 3.3 percent to $78.4 billion. Wall Street anticipated revenue of $77.4 billion. (In October, Apple projected sales of $76 billion to $78 billion, above analysts' estimates at the time.)

Apple expects revenue between $51.5 billion and $53.5 billion for the current quarter.

Before Tuesday, analysts had projected a second-quarter of $54 billion, up 6.9 percent from a year ago.

"While March [quarter] guide is modestly below the Street... we think this was largely expected from investors and to some extent given upside to December [quarter], March [quarter] guide will be viewed as likely conservative," RBC Capital Markets analyst Amit Daryanani noted.

Apple shares rose 2.6 percent to $124.50 in after-hours trading.

First published Jan. 31, 1:40 p.m. PT.

Update, 1:55 p.m.: Adds analyst comment.

Update, 2:20 p.m.: Adds comments from earnings call.

Update, 3:15 p.m.: Adds smartphone market share data and Cook's comments on the smartphone market.

Does the Mac still matter? Apple execs tell why the MacBook Pro was over four years in the making, and why we should care.

Life, disrupted: In Europe, millions of refugees are still searching for a safe place to settle. Tech should be part of the solution. But is it? CNET investigates.