What just happened? Another analyst firm has ranked Huawei in second place on the global smartphone vendor list, placing it ahead of Apple. But while a report from earlier this month had the overall market shrinking, Gartner says sales of handsets were up in 2 percent YoY in Q2.

Several weeks ago, IDC's data showed Huawei shipping 54.2 million devices in Q2---nearly 13 million more than Apple. This meant the Chinese firm was beaten only by industry leader Samsung. While Gartner has the figure at just under 50 million, it still places Huawei comfortably ahead of the iPhone maker.

Something else that both analyst firms agree on is the decline in Samsung's shipments. The Korean tech giant remains well ahead of the pack, but its YoY sales to end users have fallen by around 10 million units. In its recent earnings report, Samsung blamed a revenue fall on slow Galaxy S9 sales, while Gartner says the firm is feeling the pressure as it faces "ever-growing competition from Chinese manufacturers."

In addition to its Honor line, Huawei's high-end handsets such as the triple-camera P20 Pro helped the company to its lofty position.

"Huawei's smartphone sales grew 38.6% in the second quarter of 2018. Huawei continues to bring innovative features into its smartphones and expand its smartphone portfolio to cover larger consumer segments," said Gartner research director Anshul Gupta.

"Its investment into channels, brand building and positioning of the Honor devices helped drive sales. Huawei is shipping its Honor smartphones into 70 markets worldwide and is emerging as Huawei's key growth driver."

Apple's yearly growth has been flat, though it could retake the second position later this year when the new iPhones are released.

An increase in the overall number of worldwide sales will be welcomed by smartphone companies, but Europe saw numbers decrease, especially in the UK, where they fell 13 percent YoY in Q2---an improvement over the previous quarter's near 30 percent drop.

Gartner also records figures for the worldwide smartphone operating system market. As usual, Android's 88 percent market share means the OS continues to dominate the global arena. iOS sits at 11.9 percent, while the "other OS" category is down from 0.1 percent to 0 percent.