New York City has issued a directive banning China’s TikTok from all city-owned devices, citing security threats to the city’s technical networks.