Shares in Apple convulsed earlier this week when the technology behemoth posted lower-than-anticipated iPhone sales in the second quarter. Revenue for Apple’s marquee product is expected to pick up once its newest version, the iPhone 8, debuts in September. But until then, and maybe beyond, there’s something standing in the path of Apple’s ongoing quest for smartphone supremacy. It’s called WeChat, it renders indefensible the high cost of buying an iPhone, and Chinese consumers love it.

Hailed by the Economist as “social media’s future,” WeChat is a messaging app-cum-mobile operating system developed in 2011 by the China-based Tencent Holdings Ltd. As a Chinese product, the app enjoys a home-field advantage (courtesy, in part, of the Chinese government). It also boasts a bazaar of services few competitors can match. As Ben Thompson writes on Stratechery Wednesday, “every aspect of a typical Chinese person’s life, not just online but also offline, is conducted through a single app (and, to the extent other apps are used, they are often games promoted through WeChat).” The app’s perks include cashless and credit-card-free payments made through WeChat Wallet; one-stop shopping for taxis, takeout, tickets, vacations, and even doctor’s visits; a business-oriented chat feature similar to Slack; and a peer-to-peer one similar to WhatsApp. Each user receives a WeChat QR code that can be scanned through a smartphone camera, which has increasingly supplanted business cards as a way to exchange contact information. That makes WeChat something of Frankenstein, a hybrid service cobbling together components from apps like Uber, Slack, Venmo, and WhatsApp, and more. By April 2016, it had rocketed past 700 million monthly active users.

Those numbers present a problem for Apple. The company has long been able to tout the technical quality of its proprietary iOS operating system. But WeChat has become something of a gatekeeper for China’s mobile communications market, the barrier to entry for any smartphone looking to make its mark. Although iPhones support WeChat—indeed, it’s become one of its most popular third-party apps and has even begun to challenge the Apple App Store for supremacy—they do so no better than Google’s Android, the iPhone’s chief rival, which generally runs on cheaper devices. As a result, Chinese consumers have little incentive not to switch to a less expensive option.

That dynamic has taken a real bite out of Apple’s bottom line. As Thompson observed, Apple’s share of the Chinese market has declined precipitously over the past year. The company saw 26 percent of its revenues in the second quarter of 2016 evaporate, and it posted a 14 percent loss this year despite a strong showing in the rest of the Asia Pacific. And while most iPhone users tend to stick with the smartphone as newer versions get released, Apple has found it harder to retain customers and stave off the competition, with only half of iPhone users in 2015 choosing to purchase a new one in 2016.

How worried should Apple be about WeChat cutting into its sales? It depends. The app has failed to gain much purchase outside China, and its GPS features have raised concerns among dissidents that a censorious Chinese government may be watching both its domestic and international users. Nevertheless, Tencent’s brainchild still holds the keys to China’s smartphone market, and Apple has taken notice. As Thompson points out, iOS and Apple’s signature design aesthetic remains a luxury-branded lure for many smartphone users, including in China. As Thompson wrote in 2013, “in China it’s Apple’s brand that is, by far, the biggest allure of the iPhone. Apps are free (piracy is mainstream), larger screens are preferred, and specs and customization move the needle with the mainstream far more than they do in the U.S.”

Nevertheless, WeChat is creating headaches in other ways. Even if Apple successfully courts its legions of users, the app’s soaring popularity has given Chinese competitors including Oppo, Huawei, and Vivo the courage to challenge it. As a result, Apple’s total share of the Chinese smartphone market amounted to less than 10 percent last year. Moreover, WeChat’s virtual stranglehold on messaging and other service apps in China is reportedly making other Silicon Valley firms wary. Facebook’s Messenger has long been a leader, boasting more than 1 billion active users every month. WeChat broke 889 million in April.