Apple spent $7M last year lobbying the Trump administration, the highest amount it has ever spent on its efforts to influence the White House. In all, tech giants spent a record $50M on lobbying in 2017.

The record spend isn’t too surprising when you consider the number of issues on which Apple found itself battling with the Trump presidency …

Re/code obtained the numbers from ethics forms companies have to complete to reveal their lobbying spend.

The battle over immigration policy has been especially intense. When President Trump signed an executive order banning immigration from majority-Muslim countries, Apple CEO Tim Cook quickly responded. He said that hundreds of company employees would be affected, sent an all-staff memo expressing Apple’s opposition to the ban and joined other tech companies in writing a letter formally objecting to the policy.

The iPhone giant continued to press forward on issues like encryption and immigration. And the company — like the rest of the industry — advocated for the tax reform law recently signed by Trump.

When Trump later announced that he would be ending the DACA program, Apple was again vocal in seeking to protect Dreamers. Apple signed an open letter to Trump urging him to not to deport Dreamers. Cook said the company would work with Congress on the issue, and joined with other tech giants in supporting a legal challenge to the plans.

Most recently, Apple warned the Trump administration that planned visa changes will harm the economy.