Apple CEO Tim Cook has met Donald Trump at least five times over the past year, as the president wages a trade war with China.

The latest meeting took place on Friday. Trump tweeted: "Having dinner tonight with Tim Cook of Apple. They will be spending vast sums of money in the U.S. Great!"

There are signs that Cook's open dialogue with Trump has benefited Apple, with the company this week being granted a reprieve from Trump's 10% China import tariffs.

Visit Business Insider's homepage for more stories.

Apple CEO Tim Cook has met with Donald Trump at least five times over the past year in a desperate bid to keep the US president on-side as he wages a trade war with China.

Cook has been on a charm offensive with the Trump, the latest installment of which took place on Friday, when the two sat down to dinner while the president is on a working vacation at his golf club in Bedminster, New Jersey.

"Having dinner tonight with Tim Cook of Apple. They will be spending vast sums of money in the U.S. Great!" Trump tweeted on Friday evening.

It is the fifth time that we know of that the pair have sat down together since August last year, and the meetings have coincided with trade tensions between the US and China becoming more intense. This is not good news for Apple, which relies on Chinese manufacturing to make its most lucrative products, including iPhones and iPads.

Cook and Trump last met in June, in addition to talks held in April and March of this year, the latter of which was when Trump famously referred to Cook as "Tim Apple." Trump and Cook also sat down in August 2018.

Read more: Trump just referred to Apple's CEO as 'Tim Apple'

Between these five meetings, Cook has also involved himself in other White House initiatives. In February this year, he joined Trump's American Workforce Policy Advisory Board, while in November 2018, the Apple CEO promoted science, technology, engineering and math education by visiting an Idaho school with Ivanka Trump.

There are signs that Cook's open dialogue with Trump has benefited Apple. Only this week, the Trump administration said Apple's MacBooks and iPhones would be given a temporary reprieve from the 10% tariff it is introducing on some products imported from China. This sent Apple shares up 4% on Tuesday.

The reprieve coincided with Apple publishing a press release on Thursday boasting about its contribution to the US economy — an announcement that might have sparked Trump's comment about the firm "spending vast sums of money" in America. In the release, Apple said it spent $60 billion with US suppliers last year, supporting 450,000 jobs.

Cook has previously been upbeat that the trade war will resolve itself. "I'm optimistic because trade is one of those things where it's not a zero sum game. You know you and I can trade something and we can both win. And so I'm optimistic that the two countries will sort this out and life will go on," he said in September.