Apple CEO Tim Cook threatened to pull Uber’s app from the App Store in early 2015 after discovering the ride-hailing company was secretly “fingerprinting” iPhones that used the app, it emerged on Sunday.

The claim appeared in a New York Times report profiling Uber’s risk-taking chief executive Travis Kalanick, who was apparently summoned to Apple’s campus for a face-to-face meeting with Cook over the app’s behavior.

According to the report, Uber was trying to prevent fraudsters from creating multiple fake accounts on the same device to collect new account bonuses, but to do this it had been recording the UUID serial numbers of iPhones so that it could identify them even after the app had been deleted and the phone wiped.

Knowing that the approach was a clear violation of Apple’s app privacy guidelines, Uber implemented the tactic regardless, and even went so far as to geofence Apple’s Cupertino campus so that Apple engineers using the app wouldn’t see its fingerprinting behavior.

Mr. Kalanick told his engineers to “geofence” Apple’s headquarters in Cupertino, Calif., a way to digitally identify people reviewing Uber’s software in a specific location. Uber would then obfuscate its code from people within that geofenced area, essentially drawing a digital lasso around those it wanted to keep in the dark. Apple employees at its headquarters were unable to see Uber’s fingerprinting.

However, the tactic didn’t go unnoticed by Apple engineers for long. Soon after the discovery was made, Tim Cook had a meeting with Kalanick and demanded that Uber stop the fingerprinting immediately, otherwise the app would be removed from the App Store. Facing the loss of millions of iPhone customers which would essentially destroy the ride-hailing business, Mr. Kalanick acceded.

This isn’t the first time reports have emerged over the Uber app’s dubious-sounding behavior. Concerns were raised late last year when users complained that the app appeared to track them for days or even weeks after they last used the ride-hailing service, forcing an explanation from the company.

The New York Times article offers more detail on the Uber CEO’s history of controversial business tactics and can be read here.