President Donald Trump had nearly clinched an agreement with TikTok’s Chinese owner ByteDance Ltd. that would spare the popular app from a U.S. ban, but the deal was scuttled after China withheld its ...