Uber folded in a showdown with Apple after the iPhone maker threatened to effectively shut down the ride-sharing app after it was caught flaunting its privacy regulations, according to a report Sunday.

Travis Kalanick, 40, the oft-criticized head of Uber, was summoned for what turned out to be a tense meeting with Apple CEO Tim Cook in 2015 at Apple headquarters in Cupertino, California, according to The New York Times.

Apple had caught on to Uber’s attempt to circumvent its guidelines by secretly identifying and tagging iPhones with a digital ‘fingerprint’ even after the Uber app had been deleted from its devices.

In order to protect the privacy of its users, Apple mandates that all iPhones which are ‘wiped clean’ do not contain traces of apps that were used.

Travis Kalanick (left), 40, the oft-criticized head of Uber, was summoned for what turned out to be a tense meeting with Apple CEO Tim Cook (right) in 2015 at Apple headquarters in Cupertino, California. The two are seen in a May 2016 file photo in New York

Uber, however, hoped that Apple wouldn’t notice, according to Gizmodo.

In 2014, Uber wanted to trick Apple because it had discovered that many of its drivers in places like China were buying stolen iPhones on the black market and creating fictional email addresses and account.

The drivers would then cash in on Uber incentives to hail more rides by ordering them from the numerous accounts, thereby earning more money from the company even though in reality there was no growth of its customer base.

Uber wanted its ‘fingerprinting’ mechanism to continue keeping tabs on iPhones in order to crack down on the incentive fraud.

In order to evade detection by Apple, Uber’s engineers used a technique called ‘geofencing,’ which meant that their app was programmed not to show its ‘fingerprinting’ technology on all iPhone devices located in the area near Apple headquarters in northern California.

But the ruse did not work, as Apple’s engineers who live outside of the ‘geofenced’ area figured out what Uber was doing.

Apple had caught on to Uber’s attempt to circumvent its guidelines by secretly identifying and tagging iPhones with a digital ‘fingerprint’ even after the Uber app had been deleted from its devices

The Apple chief told Kalanick that if his company continued with the practice, Uber would be kicked out of the App Store. That meant a loss of millions of drivers – and an end to Uber

This prompted Cook to invite Kalanick to his office for a Silicon Valley showdown.

“So, I’ve heard you’ve been breaking some of our rules,” Cook, 56, told Kalanick.

The Apple chief told the young executive that if his company continued with the practice, Uber would be kicked out of the App Store.

That meant a loss of millions of drivers – and an end to Uber.

Kalanick, shaken by the threat, had no choice but to back down.

Uber’s chief executive has been wrestling with a series of high-profile scandals and departures of top talent in recent weeks.

Earlier this week, it was announced that former Attorney General Eric Holder was granted an extension by Uber’s board so that he could pursue an investigation into alleged widespread sexual harassment.

Kalanick called for the 'urgent investigation' in February after explosive claims from former employees emerged.

The probe has included 'information received from hundreds of employees through interviews and anonymous online focus groups', according to the newly leaked memo.

'We anticipate the report by the end of May,' Arianna Huffington, an Uber board member, wrote in the leaked memo to Uber staff.

The allegations emerged in a lengthy blog post by former Uber employee and best-selling author Susan Fowler Rigetti, who detailed a number of concerning incidents she experienced during her year with the company.

She recounts being propositioned sexually by a manager on her first day at the office.

Using the company chat system, she said that the unnamed manager told her that he and his girlfriend had an open relationship, but that his girlfriend was having an easier time finding sexual partners than he was.

He continued, saying that he wanted to stay out of trouble at work, but that it was difficult because he was trying to find women to have sex with, Fowler said.

'It was clear that he was trying to get me to have sex with him, and it was so clearly out of line that I immediately took screenshots of these chat messages and reported him to HR,' she continued.