Earlier this year, Apple unveiled a new version of the Mac Pro, with a starting price of $6,000. Shortly after, Apple and the White House began a monthslong public dance over where the computer would be made.

Apple said it needed waivers from tariffs the White House had imposed on certain Chinese-made components, like power cables and circuit boards, to keep making the Mac Pro in Texas. At first, Mr. Trump tweeted no, but the White House later granted 10 of the waivers.

On Wednesday, Mr. Cook showed Mr. Trump the new Mac Pro, which recently began coming off the plant’s assembly lines. He pointed to different components in the computer and ticked off which states they came from.

Apple uses 9,000 suppliers across all 50 states for its products, it said. Nearly all of those suppliers ship their parts to China, where Apple’s manufacturing partners assemble the vast majority of the company’s devices, including iPhones, iPads, MacBooks and the Apple Watch.

Those Chinese factories employ millions of people. Flex’s plant in Austin employs about 500 workers, who assemble one of Apple’s lowest-volume products.

After Mr. Trump’s comments on Wednesday, Mr. Cook used the moment to pitch Apple’s new Mac Pro computer. “It can perform 56 trillion tasks per second,” he said. “It’s an example of American design, American manufacturing and American ingenuity.”

He then noted that before Mr. Trump had arrived that day, Apple had broken ground on a nearby, previously announced $1 billion campus in Austin. Those offices are expected to open in 2022 with about 5,000 white-collar employees in areas like engineering, sales, operations and customer support. The campus could eventually house 15,000 workers, but none are expected to be in manufacturing.