Chinese tech giants TikTok and WeChat have earned a temporary reprieve from impending bans in the US.

Late last week the US Commerce Department announced both of the apps would be banned from the Android and iOS app stores from the start of this weekend, following an Executive Order from President Trump that will eventually ban any American person or company from doing business with either company due to national security concerns.

But on Saturday Trump gave his “blessing” to a proposed deal between TikTok, Oracle and Walmart, giving TikTok’s parent company ByteDance a one-week reprieve from the ban.

And also over the weekend, a judge in California issued a preliminary injunction against the ban on WeChat citing First Amendment concerns.

Under the proposed deal, software giant Oracle will become TikTok’s “trusted tech partner” in the US, host all of the US data from the app and secure “associated computer systems”.

Walmart will also be involved in a commercial deal, and both companies will take part in TikTok Global, a new company, as part of its pre-IPO financing round.

The deal is yet to be finalised, and appears to be a significant shift from the initial orders from Trump and the offer on the table from Microsoft, with Oracle not having access to TikTok’s prized algorithm but to act more as a cloud host.

The new TikTok Global will be headquartered in Texas and bring a reported 25,000 jobs. TikTok Global will own most of the app’s operations worldwide. Despite Oracle and Walmart saying the company would be majority owned by Americans, ByteDance has said that it will have an 80 percent stake in TikTok Global.

Oracle and Walmart are planning to own 12.5 percent and 7.5 percent of TikTok Global respectively.

Trump has also said the deal will include a $US5 billion donation to US education, although ByteDance appeared unaware of this and it may relate to the predicted tax the new company will pay over several years.

The US President said he has given his “blessing” to the proposal and “approved the deal in concept”.

A TikTok spokesperson said the company welcomed Trump’s comments on the deal.

“We are pleased that the proposal by TikTok, Oracle and Walmart will resolve the security concerns of the US administration and settle questions around TikTok’s future in the US,” the spokesperson said.

On the WeChat front, Judge Laurel Beeler ruled a lawsuit challenging the ban brought forward by a group of WeChat users last month showed “serious questions going to the merits of the First Amendment claim”.

“Evidence reflects that WeChat is effectively the only means of communication for many in the community, not only because China bans other apps, but also because Chinese speakers with limited English proficiency have no options other than WeChat,” Judge Beeler said in the ruling.

The judge issued a preliminary injunction holding the WeChat ban while the case goes ahead.

The ruling found that while the US government has identified “significant” threats, there was “scant little evidence that its effective ban of WeChat for all US users addresses those concerns”.

The WeChat users, under the WeChat Alliance banner, claimed that the ban violated users’ due process and their free speech rights, and potentially targets Chinese-Americans as it is the main app that Chinese-speakers in the US use to participate in social life.

The court found that banning WeChat would “eliminate all meaningful access to communication in the plaintiffs’ community” and the injunction was in the public interest.

The US government has argued that the ban does not impact WeChat users’ free speech as they can communicate on “alternative platforms that do not pose a national security threat”.

Trump issued the executive order effectively banning TikTok and WeChat last month, giving them 90-days notice of the impending restrictions.

The order claims the two apps collect “vast swathes of personal information” from users which “threatens to allow the Chinese Communist Party access to Americans’ personal and proprietary information”.

It also said that TikTok could “potentially allow China to track the locations of federal employees and contractors, build dossiers of personal information for blackmail and conduct corporate espionage”.

“TikTok may also be used for disinformation campaigns that benefit the Chinese Communist Party, such as when TikTok videos spread debunked conspiracy theories about the origins of the 2019 novel coronavirus,” the order said.

Earlier this month TikTok CEO Kevin Mayer quit the company amid the geopolitical storm.

Oracle was revealed to be the successful bidder for the TikTok deal last week after Microsoft revealed that it had been knocked back.

While Oracle will act largely as a cloud host for TikTok in the US, Microsoft had planned to make more significant changes to its operations, and fully acquire the service in the US, Canada, Australia and New Zealand.

“We would have made significant changes to ensure the service met the highest standards for security, privacy, online safety and combatting disinformation, and we made these principles clear in our August statement,” Microsoft said in a statement.

“We look forward to seeing how the service evolves in these important areas.”