Apple Inc. is on a roll. Its profits are at an all-time high, it’s rapidly expanding in China and for the first time in two years, its iPhone has overtaken Google Android in the United States.

It’s a success largely attributed to Apple’s record quarter, which saw iPhone sales and market share climb in the U.S., Europe and China, according to the latest data from Kantar Worldpanel ComTech, a British market research firm.

"In the U.S., Apple iOS overtook Android for the first time since this time in 2012, albeit by the slimmest 0.1 percent margin," said Carolina Milanesi, chief of research at Kantar Worldpanel ComTech. “While the success of the iPhone 6 and 6 Plus is unprecedented, this quarter’s performance also points to Apple having its strongest portfolio ever.”

Apple’s range of devices for several price points in both contract and prepaid plans also contributed to its rise, while gaining an advantage over Android’s premium end, Milanesi added. Through the 2014 holiday season, the iPhone 6 was the best-selling smartphone in the U.S. and the most popular phone to give as a gift. Samsung’s Galaxy S5 was the next popular choice.

In Europe, Apple also saw gains, rising 6.2 percent, while Android declined 3.8 percent. Italy was the only market where Android continued to see growth.

And in China, considered Apple’s “most important” market, the iPhone saw its share grow to 21.5 percent, up from 19 percent last year, whittling away at Android’s lead in the vast market. The iPhone 6 and 6 Plus have been popular in China, especially among middle-class consumers and millionaires.