Apple CEO Tim Cook threatened to have Uber’s iPhone app removed from the App Store in 2015, when it learned that the ride-sharing company had secretly found a way to identify individual iPhones, even once the app was deleted from the phone, according to The New York Times.

The article is a wide-ranging profile of Uber CEO Travis Kalanick, describing him as a leader who is willing to break and bend rules to get his way, even if it means running afoul of one of the world’s largest tech firms. The attitude has led to Uber’s rapid rise, but has caused the company to run into numerous crises. The article describes how Uber faced problems with account fraud while it was trying to expand into China, and devised a way to identify an individual iPhone, even after its app had been deleted from the phone, or if the phone had been reset.

Uber geofenced Apple headquarters to hide its activity from the company

The practice, called fingerprinting, is prohibited by Apple. To prevent the company from discovering the practice, Uber geofenced Apple headquarters in Cupertino, changing its code so that it would be hidden from Apple Employees. Despite their efforts, Apple discovered the activity, which led to the meeting between the two CEOs, in which Cook told Kalanick to end the practice. If Uber didn’t comply, Cook told him, Uber’s app would be removed from the App Store, a move that would be a huge blow to the ride-sharing company. According to the article, “Mr. Kalanick was shaken by Mr. Cook’s scolding, according to a person who saw him after the meeting,” and ended the practice.

Uber has faced backlash on numerous fronts in recent months, following revelations that the company has used secret programs to evade government regulators and to track rival drivers, tracked customers without permission, and is being sued for allegedy stealing proprietary information regarding self-driving cars from Alphabet’s Waymo. The company has also faced criticism for its toxic workplace culture following a blog post from a former engineer, and company trips to a South Korean escort bar. This latest revelation adds to the mounting PR problem that the company faces, due in part to the leadership style of its CEO.

Update: an Uber spokesperson issued a statement to The Verge, :