Apple has showed Facebook who has the power in a controversial app dispute that erupted following discovery that the social network not only distributed a data-collecting research app that was approved only for internal use but paid people ages 13 to 35 to install it.

Thursday, the iPhone maker revoked Facebook’s enterprise developer certificate which effectively stopped the social network from deploying custom-built iPhone apps to its 35,000 employees to do things like show shuttle schedules, campus maps and company calendars.

When Facebook employees woke up on Wednesday morning, many found they could not perform even the most basic work tasks.

Their calendars were not working. Nor were campus maps that help people find their co-workers. They were unable to check Facebook’s latest shuttle bus schedule. And they could not see what the company’s cafeterias were serving for lunch.

The chaotic situation got worse when internal apps like Workplace and Messenger also stopped working, frustrating employees and resulting in hours of lost productivity.

Tammy Levine, an Apple spokeswoman, said at the time:

Facebook has been using their membership to distribute a data-collecting app to consumers, which is a clear breach of their agreement with Apple. Any developer using their enterprise certificates to distribute apps to consumers will have their certificates revoked, which is what we did in this case to protect our users and their data.

The situation prompted some employees to consider quitting:

After Apple’s revocation, employees inside Facebook became furious with the Onavo team, according to four people familiar with the company’s deliberations.

Some said they would have to wait weeks to get app updates or changes approved through Apple’s App Store. Several employees in Facebook’s hardware division said they were considering quitting because they could not get any work done.

Apple restored Facebook’s internal apps late Thursday but Facebook wouldn’t admit to any wrongdoing, as per its statement to TechCrunch:

There was nothing ‘secret’ about this; it was literally called the Facebook Research App. It wasn’t ‘spying’ as all of the people who signed up to participate went through a clear on-boarding process asking for their permission and were paid to participate.

A spokesperson for Facebook claimed that fewer than five percent of users in the research program were teenagers and that all had obtained signed parental consent forms.

In case you missed this incredible saga, here’s a quick summary.

Facebook in October 2013 acquired Onavo, the maker of a mobile VPN app, for a reported $120 million. The company had been actively promoting the app to its customers until an August 2018 report in The Wall Street Journal revealed that Apple repeatedly warned the social network that the software violated its data collection policies by using spyware-like practices.

Specifically, the Onavo app was found to collect user data in order to covertly build advertising profiles and contact databases. Onavo’s findings even helped Facebook executives predict which apps were rising and trending across App Stores.

That gave Mr. Zuckerberg, who colleagues have said was highly dependent on the data, the foresight to try to buy Snapchat long before it went public. Although that effort failed, Facebook has built products, like live video streams and group video chat, based on information gleaned from Onavo’s app.

A few days later, Apple yanked the app out of App Store because it used data “in ways that go beyond what is directly relevant to the app or to provide advertising.”

The Onavo team was back at it in 2016 with an internal research app that happened to covertly siphon away all of a user’s phone and web activity. Not only did Facebook pay people ages 13 to 35 up to $20 per month to install the spy software, they even distributed it under Apple’s enterprise certificate which can only be used for internal testing.

It’s not just Facebook, Google too found itself in hot water with the Cupertino giant this week over violating Apple’s rules by publicly distributing an internal app of its own, Screenwise.

Apple revoked Google’s access to the app, a move that caused internal services like hailing a bus or viewing cafeteria information to stop working. The dispute was resolved and Apple reinstated Google’s access to the certificate.

Apple’s been dealing with its own privacy problems after a bug discovered this week permitted people to eavesdrop on the FaceTime calls of other users (a fix is coming next week).