SAN FRANCISCO — Apple CEO Tim Cook has rarely missed an opportunity in the past year to hit Facebook about its privacy issues. Facebook CEO Mark Zuckerberg hasn’t been shy about hitting back, accusing Apple of ignoring the poorest of the world’s consumers.

But on Wednesday, the brewing cold war between the two companies turned hot, when Apple said it had determined that Facebook violated its own rules for developers with a program that paid teenagers and others for their smartphone data. Apple then cut off Facebook employees’ access to internal Facebook corporate apps that run on iPhones and other Apple devices, a move that caused disarray at Facebook’s headquarters.

The battle also teases actions that could end up hitting consumers: Apps could be slower to update or become entirely unavailable, but companies could also be forced to more heavily weigh privacy considerations when building their apps.

Some observers of the two companies believe the fight has become personal between Zuckerberg, the 34-year-old from New York who founded Facebook, and Cook, 58, an Alabama native who was a largely anonymous tech executive until he took over Apple in 2011.

“The heart of this is ego. These two hate each other,” said Scott Galloway, a New York University marketing professor and author of “The Four,” a book about the dominance of Apple, Facebook, Amazon and Google.

“There was Ali-Frazier. Now there’s nerd vs. nerd,” he said.

Wednesday’s move by Apple had been almost a year in the making. In March 2018, with Facebook reeling from reports about the political consultant firm Cambridge Analytica’s collection of Facebook user data, Cook had said on MSNBC that ad-supported tech firms turn the user into the product. Zuckerberg responded that Cook’s views were “not at all aligned with the truth.” The companies have also feuded over online tracking, which Apple has tried to limit through its Safari web browser.

At its core, the disagreement speaks to a growing philosophical rift in the tech industry between companies that make money off personal data, and those that do not. Apple is on one side (companies should not exchange privacy for services), while Facebook is on the other ( data-targeted ads are a small price to pay for connecting the world).

“It’s a standoff,” said Dipayan Ghosh, a former Facebook employee and a fellow at Harvard’s Shorenstein Center on Media, Politics and Public Policy. “We’ve got one cowboy on the platform side, and another cowboy on the service side, standing off and pointing guns at each other.”

The outcome could have major ramifications for consumers.

Apple’s playing field

The dispute demonstrates Apple’s ability, as the ruler of its app store, to throw a wrench into a large part of the mobile internet’s supply chain, as well as reveals Facebook’s potentially vulnerable position after a series of scandals over its handling of users’ personal information.

Apple said in a statement that it had revoked Facebook’s membership in Apple’s Enterprise Developer Program, which Apple said is intended to be used only to allow organizations to distribute apps internally.

“Facebook has been using their membership to distribute a data-collecting app to consumers, which is a clear breach of their agreement with Apple,” Apple said.

“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.”

Facebook confirmed Apple’s move but did not respond to follow-up questions.

Byers Market Newsletter Get breaking news and insider analysis on the rapidly changing world of media and technology right to your inbox. This site is protected by recaptcha

The dispute so far affects only software developers and other Facebook employees, but if it escalates, bad blood between the companies could mean slower updates to Facebook apps on Apple devices or, in the most extreme case, Apple banning the company’s apps including Instagram and Messenger — which in turn could mean a backlash against Apple.

It is rare for Apple to publicly use its power as a gatekeeper against another big tech company. In 2015, it considered pulling the ride-hailing service Uber from its app store over privacy concerns, according to The New York Times, and Uber survived only after then-CEO Travis Kalanick went to Apple’s offices for a scolding from Cook.

Later on Thursday, Apple issued a similar punishment to Google, which had also been found to be skirting the developer rules. An Apple spokesperson, however, said it was "working together with Google to help them reinstate their enterprise certificates very quickly.”

The company issued no such comment in relation to Facebook, but Apple did restore the company's enterprise certifications early Thursday evening.

Consumers expect tech companies to get along, said Rene Ritchie, a senior analyst at Mobile Nations, a media company that focuses on the tech industry.

“You count on everybody to be on their best behavior,” he said.

Oh no, Onavo

Facebook has been paying users, including teenagers, up to $20 per month to install an app that gave the company the ability to monitor their phone and web activity, TechCrunch reported on Tuesday. Participants may not have realized how much data was collected or that Facebook was behind it, the tech news website said.

Facebook ended the program even before Apple’s action on Wednesday, though it also defended the effort as standard market research.

“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,” Facebook said.

Apple’s move caused disarray within Facebook offices, according to an internal memo obtained by Business Insider. Employees lost access to internal apps, including test versions of the Facebook and Instagram apps.

“We're working closely with Apple to reinstate our most critical internal apps immediately,” Pedro Canahuati, a Facebook vice president, said in the memo. A Facebook representative did not respond to questions about the impact of Apple’s move.

A former Facebook employee, who spoke on the condition of anonymity to speak freely about a former employer, said the shutdown of internal apps was a disaster for the company because software engineers rely on Apple’s program to work on app development and to begin testing new versions. Now that’s at a standstill, threatening future updates to the company’s mobile apps until the dispute is resolved, the former employee said.

Fatemeh Khatibloo, an analyst at the market research firm Forrester Research in San Francisco, said Facebook must have known it was risking a sharp rebuke from Apple by the way it disguised its research app and clearly violated Apple’s rules for developers.

“Facebook has two things going on: In general, there’s a level of naiveté in that organization about what people will be upset about, and there’s a level of naiveté about what they can get away with,” Khatibloo said.

She said she expected that Facebook would have to shift its stance on privacy, including on proposed legislation to protect personal data, in order to satisfy Apple executives.

The former Facebook employee noted that the people associated with the Facebook app joined the company as part of the social network’s acquisition of an app called Onvao, which was removed from the app store in August for violating Apple’s privacy rules. These people tended to shirk privacy considerations, the ex-employee said, but that was allowed because the app’s ability to see what people did on their smartphones was extremely valuable to Facebook.

“The Onavo guys are super-aggressive cowboys and always had a contentious relationship with the security and privacy teams,” the former employee said. “Onavo was always a ethically dubious company, and I think Mark let them get away with crazy risks because the competitive intelligence they provide is so useful.”

Cui bono?

Harvard’s Ghosh said he thinks the result could be a net benefit for consumers and privacy, though he also said there’s a business advantage for Apple as it’s pressing the issue because it relies less on ad revenue than other large tech firms.

“It’s in Tim Cook’s commercial interests to make the case that the tremendous collection of data — and processing of it by machine learning for news feed tweaks and digital advertising — implicates consumer privacy,” he said.

Facebook, which like Apple has piled up enormous profits in recent years, has spent billions to move into the hardware market, Apple’s core business. Facebook bought the virtual-reality headset maker Oculus for $3 billion in 2014, and in October it launched a video-chat device it calls Portal.

If Facebook’s hardware investments pay off in a popular product, it will be less reliant on intermediaries like Apple or Google’s Android operating system to reach people, Ghosh said.

In the meantime, though, Facebook has some leverage over Apple because the smartphone maker likely can’t block access to Facebook’s public apps the way it cut off the internal ones, Khatibloo said. “You’d have a consumer backlash,” she said, and maybe even an antitrust complaint by Facebook.

Mike Hoefflinger, a former Facebook marketing executive who wrote a book, “Becoming Facebook,” about the company’s rise, compared the latest dispute to a “border skirmish” with several possible outcomes.

He said Apple and Facebook could reach a short-term agreement that allows Facebook’s internal apps to be reinstated with conditions, or the two companies could try to reach a larger deal on privacy policies and their execution. A more ominous third outcome is that Apple digs in its heels, forcing Facebook and Google into an alliance of ad-supported tech giants.

“Even plausible,” Hoefflinger said, “that all three of these are happening at same time.”