This article says that President Trump will ban the popular apps WeChat and TikTok.
On the other hand the Bernstein case established (at least in the 9th Circuit) that computer software is speech. The government chose not to appeal that case at the Supreme Court, so in theory this is still unsettled outside the 9th Circuit, but lets assume for the moment that other courts will go along with this.
Can the executive issue a ban on these applications? The justifications given are:
Chinese companies are gathering information on US citizens, and the Chinese government could gain access to this information and use it nefarious ways.
The Chinese government could impose use these apps to promote its view of the world to US citizens.
However it seems to me unlikely that this would survive Strict Scrutiny Any national security concerns could be addressed by more narrowly tailored means, such as a warning notice and a ban on use by government employees or contractors with security clearance. A ban which has the side effect of preventing teenagers from uploading 15 second dance clips would not seem to be narrowly tailored. As for Chinese propaganda, I would have thought that the 1st Amendment gives the same free speech rights to the Chinese government that it gives to any other person.
I've read this answer and the linked articles from the Lawfare Institute, which explain that the executive has the power to block commercial transactions on national security grounds, but those laws would seem to fall before the First Amendment. The Bernstein case was likewise about the power of the executive to limit speech for national security, and that argument failed.
So: could a 1st Amendment argument be used to overturn this proposed ban?
Edit (posted after user6726's answer):
This article on TechDirt argues that the ban is in violation of the 1st Amendment. In addition to the "code is speech" argument, it also argues that banning security updates from people who already have the app will weaken security rather than strengthening it, and:
The claim is "to protect national security." We already knew that was bogus, and all of the info anyone can get from TikTok is already widely available for purchase.
Edit 2: this question is being overtaken by events. A group of WeChat users have obtained a preliminary injunction on the grounds that the ban impacts their 1st Amendment rights.