Hong Kong CNN Business  — 

TikTok averted a ban in the United States last week when a federal judge ruled that Washington couldn’t block it from app stores just yet.

The short-form video app is still accessible, but its fate in the country is far from certain.

The court ruling is only temporary, and could be appealed by the US government. The ruling could also eventually be thrown out: The judge only weighed in because TikTok challenged the ban, and the company could lose its court case.

To make things more confusing, TikTok’s court case isn’t the only thing governing the future of the app.

TikTok’s Chinese owner, ByteDance, is racing to close a deal with the American firms Oracle (ORCL) and Walmart (WMT) that might be enough to satisfy the Trump administration’s concerns about the app and stave off US pressure once and for all.

What started all of this?

US President Donald Trump and his administration have been attacking TikTok for months because of its ties to China. They claim the app is a risk to national security because the user data it stores on Americans could wind up in the hands of the Chinese government.

Those attacks came to a head in August, when Trump issued executive orders that would effectively ban TikTok in the United States. He later said that the ban could be avoided if a “very American company” buys it.

TikTok, meanwhile, has pushed back against the claim that it poses a security risk, saying that the user data it keeps on Americans is stored stateside, with a backup in Singapore. Its opposition to the ban spurred TikTok to sue the Trump administration in federal court.

What happened to the ban?

A ban on the ability to download TikTok from US app stores was originally supposed to go into effect Sept. 20, according to the US Commerce Department.

That date was delayed by a week to Sept. 27 after Trump gave his tentative blessing to the agreement with Oracle and Walmart. Then that deadline was postponed indefinitely after federal judge Carl Nichols temporarily blocked the ban, in response to TikTok’s legal challenge.

What’s next?

The US Commerce Department has said that it intends to “vigorously defend” its order, and there have been no major developments in the court case since the judge issued his ruling last week.

But the app store ban is not the only TikTok deadline on the US government’s radar.

Confusingly, one of Trump’s executive orders gave TikTok a much longer Nov. 12 deadline to find a US buyer. After that date, the Commerce Department said internet backbone companies would be banned from carrying the app’s traffic, effectively shutting down TikTok’s US operations.

TikTok could also try to push that deadline back. The company has until Oct. 14 to file a request to temporarily block those restrictions.

What’s happening with that deal?

The agreement with Oracle and Walmart is still a work in progress. The two firms would own at least part of a new entity called TikTok Global, which would be headquartered in the United States.

But some core elements of the proposal remain unclear.

Trump has said he won’t approve the deal unless Americans control the company. That demand has caused confusion, since an initial announcement about the tie-up with Oracle and Walmart implied that ByteDance would continue to own a majority of Tiktok going forward. (In the days after that, a person familiar with the deal told CNN Business that TikTok Global would be partially owned by ByteDance’s international and Chinese investors, but that ByteDance itself will hold zero percent of the company to be created by the deal to run the app outside of China.)

What about China?

ByteDance applied to the Chinese government last month for a license to export its technology, indicating that the company needs some kind of approval from China before the deal can go forward.

China’s role in signing off on the deal is murky, though. In August, Chinese regulators introduced new rules that govern the sale of certain kinds of technology to foreign buyers. Experts pointed out that the change would likely require ByteDance to obtain government permission before selling TikTok to a foreign company.

But ByteDance has said that the US deal does not involve the transfer of its algorithms and technologies — just that Oracle would be able to review the app’s source code.

The deal has also received aggressive pushback from Chinese state media, which last month encouraged Beijing to kill the deal.

What about WeChat?

There’s another Chinese-owned app that’s also facing pressure in the United States.

One of Trump’s August orders called for a ban on transactions using WeChat, not just TikTok. The app, which is owned by Tencent, is ubiquitous in China and is widely seen as equivalent to if Facebook, Paypal, LinkedIn and other platforms were all rolled into one. It’s also a popular way for people to stay in touch with friends, family and business contacts in China.

Federal judge Laurel Beeler temporarily blocked the WeChat ban Sept. 20 after it was challenged in court by a group of US-based WeChat users. The judge said those users had shown “serious questions” in their claim that the executive order threatens the users’ First Amendment rights.

Last Friday, the US Justice Department said it would appeal that decision, which could stretch out litigation over the future of the app.

In addition to the appeal, Beeler is expected to reconsider her temporary halt on the ban Oct. 15.