After previously threatening to ban social media app TikTok, President Donald Trump has signed an executive order banning US companies from doing business with the platform from September 20.

He also targeted Tencent's WeChat app from the same date, although the rest of Tencent is currently unaffected. The exact nature and legality of the restrictions are unclear: the Secretary of Commerce has 45 days to come up with the rules and regulations to enact the executive order.

Microsoft, meanwhile, is still in talks with TikTok parent ByteDance to acquire its US operations (and other areas) by September 15. Trump has said the US government should get a cut of any sale.

The clock is ticking

Trump TikTok
– DCD/The White House

“To protect our Nation, I took action to address the threat posed by one mobile application, TikTok. Further action is needed to address a similar threat posed by another mobile application, WeChat,” Trump said in the order against WeChat.

In a statement, TikTok said that it was "shocked" by the executive order. It claimed that it had tried to engage with the US government for nearly a year in good faith to address national security concerns.

"What we encountered instead was that the Administration paid no attention to facts, dictated terms of an agreement without going through standard legal processes, and tried to insert itself into negotiations between private businesses."

TikTok said that it "has never shared user data with the Chinese government, nor censored content at its request." It has claimed US data was stored in the US, with backup data centers in Singapore. This week, the company announced plans for $500 million data center in Ireland to hold EU citizens' data.

The company added: "This Executive Order risks undermining global businesses' trust in the United States' commitment to the rule of law, which has served as a magnet for investment and spurred decades of American economic growth. And it sets a dangerous precedent for the concept of free expression and open markets.

"We will pursue all remedies available to us in order to ensure that the rule of law is not discarded and that our company and our users are treated fairly – if not by the Administration, then by the US courts."

It also encouraged TikTok users to contact their elected representatives, including the White House.

Microsoft is thought to still be negotiating for the purchase of TikTok's operations in the US, Australia, Canada, and New Zealand. It confirmed its interest in those regions earlier this week, but a Financial Times report on Thursday claimed the company is now considering acquiring all of TikTok. A source told Business Insider that that was "completely false." TikTok operates everywhere but China, where ByteDance offers the separate Douyin, and India, where it is banned.

The TikTok order came as the US Senate on Thursday unanimously voted to ban federal employees from using TikTok on government-issued devices.

“I’m encouraged by the bipartisan support we have seen in this body to hold the Chinese Communist party accountable and that includes... holding accountable those corporations who would just do China’s bidding,” said bill-sponsor Senator Josh Hawley. “And, if I have anything to say about it, we won’t be stopping here."

Not stopping here

While Trump had previously threatened to ban TikTok, his move against WeChat was less expected. The app only has a small userbase in the US - primarily used by those communicating with Chinese family members - but is huge globally, with more than a billion users.

"Like TikTok, WeChat automatically captures vast swaths of information from its users — threatens to allow the Chinese Communist Party access to Americans’ personal and proprietary information," Trump's order states.

"In addition, WeChat captures the personal and proprietary information of Chinese nationals visiting the United States, thereby allowing the Chinese Communist Party a mechanism for keeping tabs on Chinese citizens who may be enjoying the benefits of a free society for the first time in their lives. WeChat, like TikTok, also reportedly censors content that the Chinese Communist Party deems politically sensitive and may also be used for disinformation campaigns that benefit the Chinese Communist Party."

In China, the app is used for everything from paying taxes to applying for passports.

While it is not exactly clear what powers the order has, and what will be done to US companies that continue to do business with the apps, it is likely that they would be removed from Apple's and Google's stores.

WeChat owner Tencent saw shares drop by nearly 10 percent on the news. The company is China's second-largest cloud provider, the country's largest music services provider, and one of the world's most active tech investors.

It is also the world's largest videogames publisher, and owns 40 percent of Epic Games, the US developer of the popular Fortnite title. For now, these areas of Tencent's business are unaffected.