Apple Inc. Chief Executive Tim Cook encouraged China to keep opening up its economy, as his company grapples with weaker demand from the nation and uncertainty over its trade war with the U.S.

“We urge China to continue to open up,” Cook said during a speech at the annual China Development Forum in Beijing on Saturday. “We see that as essential. Not only for China to reach its full potential, but for the global economy to thrive.”

Apple is desperately trying to revive sales in China, which make up about a fifth of its revenue, as growth evaporates in the world’s biggest market. The company lowered its revenue outlook for the first time in almost two decades in the December quarter on weakened demand with analysts at Longbow Research this month saying its going “from bad to worse.”

Smartphone shipments in China fell 10.5 percent to 397.7 million units in 2018 from the year before, according to IDC. But Apple sales have also suffered as Chinese consumers spurn iPhones in favor of comparable devices from Huawei, Xiaomi, Oppo and other local, lower-priced rivals.

Cook has also been a vocal opponent of the U.S.-China trade war, mentioning it on Apple’s earnings calls and meeting one-on-one with U.S. President Donald Trump. So far Apple’s flagship products, most of which are made in China, have escaped additional tariffs placed on Chinese imports. Last year, Cook used the China Development Forum as a venue to argue against additional tariffs, encouraging leaders of the U.S. and China to let “calm heads prevail.”

During his speech Saturday, Cook quoted a line that Chinese President Xi Jinping said in Seattle years ago: “The fire burns higher if more people bring wood to it.”