President Donald Trump praised Apple on Wednesday after the company announced it is adding 20,000 U.S. jobs over the next five years.

Apple announced on Wednesday it is investing billions in American manufacturing, and will spend $30 billion in capital expenditures. The tech giant also said it will repatriate overseas cash and pay a $38 billion tax fee. Apple claims its plans will contribute more than $350 billion to the U.S. economy over the next five years. The company said it will add 20,000 American jobs at existing campuses, as well as a new campus. The new location, which will house tech support for customers, will be announced later this year.

Tim Cook Apple CEO Tim Cook waves as he arrives on stage to deliver his keynote address at the Worldwide Developers Conference in San Francisco, California, June 8, 2015. Photo: Reuters/Robert Galbraith

After the announcement Trump delivered a speech in Pittsburgh in which he commended Apple’s plans to invest in the country’s economy. Trump also called Apple CEO Tim Cook a “great guy” during his remarks.

“I just called Tim cook and I thanked him,” said Trump.

The president then announced Apple’s plans of adding $350 billion to the U.S. economy, prompting cheers from the crowd. He then said he didn’t believe at first that it was $350 billion, but thought instead it was $350 million. Trump also said he doesn’t “imagine there’s ever been an investment that big in this country by a company.”

Throughout his campaign, Trump went after Apple and other companies for manufacturing their products overseas. 

“I think some of you remember, I said ‘I will not consider our economic situation complete until we get Apple to start building some of those massive plants in the United States,’” Trump told spectators. “They’re gonna build plants, they’re gonna build a big campus, they’re really going to town, so we want to thank Apple.”

So far, Apple has announced it will open one new campus this year. Meanwhile, Apple supplier Finisar previously announced in December it will open up a facility in Sherman, Texas.

After the speech, Trump continued to praise Apple on its announcement on Twitter. He also boasted about keeping his promise on his policies.

“I promised that my policies would allow companies like Apple to bring massive amounts of money back to the United States,” Trump said on Twitter after the speech. “Great to see Apple follow through as a result of TAX CUTS. Huge win for American workers and the USA!”

As for Cook, the CEO admitted in an ABC News interview that aired on Wednesday evening that the new tax system is making it easier for Apple to repatriate its overseas cash. He said Apple “never thought” the old system was good for the U.S. because it kept money overseas and led “people to invest elsewhere instead of within the country.”

"I hope -- I have that faith -- that it will be used for great purpose for the country, whether that's infrastructure or education, or what have you, that will further supply jobs in the U.S," Apple said about the $38 billion tax payment.