Apple Inc. snapped out of three straight quarters of falling revenue as strong demand for the iPhone 7 raised investors’ hopes that the technology giant is emerging from its roughest period since it reinvented the market for mobile devices.

Sales of the new smartphone model, which Apple unveiled in September, propelled total iPhone shipments 5% higher to a record during the three months through December. iPhones, which account for two-thirds of Apple’s sales, helped boost total revenue 3% to a record $78.4 billion.

...