Apple has had its ups and downs in the ever-important Chinese market, but on Monday some good news reached the electronics giant.

The iPhone 7 Plus was the second-best selling phone in the populous nation last year, accounting for 2.8 percent of all smartphone sales, according to Counterpoint Research. It was bested only by the Oppo R9S, a phone from Chinese manufacturer Oppo that takes design cues from the iPhone, which grabbed 3 percent of the market share.

The smaller iPhone 7 also got plenty of love as the fifth-highest selling smartphone in China last year. Apple's iPhones are the only two foreign phones to crack the top 10, with the rest of the list is populated by phones from Chinese brands Vivo, Xiaomi and Huawei.

Counterpoint's research noted that the iPhone 7 line sold considerably better in the second half of the year, as prices were cut ahead of the launch of the iPhone 8 and X lines.

China became Apple's second biggest market, behind only the US, in the second quarter of 2015 when revenue hit $16.8 billion, and remained the second biggest for another year. In the third quarter of 2016, however, revenue fell enough (to $8.8 billion) for Europe to overtake China. In Apple's fourth-quarter 2017 filing, it reported Chinese revenue was at $9.8 billion.

Neil Shah, an analyst at Counterpoint, is unsure if the momentum will keep up this year. "[While the] iPhone X breaks some monotonous design cycle Apple had with previous iPhones, the pricing of the X is beyond the reach of the bulk of Chinese consumers," he wrote in an email to CNET.

Though Apple has made many moves to embolden its presence in China, including creating a managing director role for the country, it also faces increased threat from local competitors, with high-spec, feature-filled phones from Oppo, Vivo and Xiaomi selling for much less than Apple's iPhones.

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

Solving for XX: The industry seeks to overcome outdated ideas about "women in tech."