Trump also said he's been advised "there is no legal path" for the U.S. to keep a cut of whatever TikTok deal the government approves, an idea he had earlier floated.
TikTok employee Patrick Ryan has launched a legal challenge against the Trump administration to protect TikTok workers. The White House has given the popular app an ultimatum: Sell or be banned.
Walmart cited a potential boost from TikTok to its online presence, including the giant retailer's efforts to grow online advertising and a marketplace for third-party sellers.
Mayer, who was on the job as TikTok's chief executive for three months, said while it is the right time for him to step down a "resolution" for the company will happen "very soon."
The White House has targeted the Chinese-owned app with an executive order that would effectively ban it from operating in the U.S. Lawyers for TikTok say the president's action is unconstitutional.
Lawyers for the video-sharing app are likely to say the executive order was unconstitutional, arguing the company was not informed, as is standard, and the national-security concerns are baseless.
In its first public acknowledgement of a deal that could be worth in the billions of dollars, Microsoft said it is continuing talks with TikTok about a potential takeover of the hugely popular app.