Tim Cook, who testified on Friday in a lawsuit that could undermine Apple’s efforts to stave off growing control of its power, defended his company on allegations that it harmed app makers looking to increase their profits.

Mr. Cook, who took the stand for the first time as CEO of Apple, answered friendly questions from an Apple attorney and faced targeted questions from both an opposing attorney and the federal judge who will rule the case.

The results of the study could maintain or improve Apple’s dominance in the $ 100 billion app market. Epic Games, creator of the popular game Fortnite, is suing Apple, claiming the iPhone maker created a monopoly on its App Store and is using that power to take an unfair cut from other companies that rely on the App Store to Reach customers.

An epic win would enliven a growing cartel war against Apple. Federal and state regulators are scrutinizing Apple’s control over the App Store, and the European Union recently accused Apple of violating antitrust laws over its app rules and fees. Apple is facing two more federal lawsuits over its App Store fees – one from developers and one from iPhone owners – that are seeking class action lawsuit status.

Mr. Cook’s testimony came towards the end of a three-week lawsuit in federal court in Oakland, Calif., Dealing with the performance Apple gets from its App Store and 30 percent commission on the sale of most digital goods and subscriptions.

He entered the courthouse on Friday morning from an underground parking garage rather than the main entrance, which enabled him to avoid photographers gathering in front of the building. At around 7:30 am, journalists noticed he was going through security checks and shouted questions. Mr. Cook, wearing a dark gray suit, white shirt, and gray tie, held up his hand in a peace sign.

For over an hour, an Apple attorney led Mr. Cook through complaints against Apple, allowing him to explain why Apple did business in certain ways – and why it did no harm to app developers.

Mr Cook testified that Apple faced stiff competition and said commissions Apple collected from app developers helped fund better security in the App Store. “There’s a conflict between what the developer wants and what the consumer wants,” he said. He added that Apple has cut app store fees for many developers who are much smaller than Epic.

In a cross-examination, an epic attorney targeted Mr Cook’s credibility and asked why Mr Cook said he was unaware of some of the details of Apple’s business, including the App Store profit margins, which an outside expert testified on behalf of Epic said , could be up to 80 percent.

Mr. Cook said that was wrong. He said the App Store was profitable, but Apple hadn’t tried to pinpoint exactly how profitable it was, partly because it would be difficult to structure Apple’s costs.

Epic’s attorney denied this claim, showing internal Apple documents from Mr. Cook showing that the company could calculate the profitability of the App Store. Mr. Cook countered that the documents showed incomplete figures.

Epic’s attorney then moved on to an issue affecting the lawsuit, but it seemed to illustrate Apple’s hypocrisy: The way the company operates in China undermines Apple’s public enthusiasm for consumer privacy. The New York Times reported this week that Apple had compromised its Chinese users’ data and supported the Chinese government’s censorship by proactively removing apps.

While Mr Cook said Apple must obey laws in China, Epic’s attorney noted that other companies dissatisfied with Chinese policies had left the country. “I don’t know anyone in the smartphone business who doesn’t sell to China,” replied Cook.

The most worrying moment for Mr. Cook and Apple was the end of his testimony when Judge Yvonne Gonzalez Rogers of the US District Court for the Northern District of California participated in Mr. Cook’s questioning.

Throughout the trial, Judge Gonzalez Rogers posed specific questions to Apple and Epic witnesses, and her back and forth with Mr. Cook on Friday resulted in a particularly intense scrutiny of Apple’s arguments. Why couldn’t Apple allow iPhone owners to have more options to buy apps, she asked, especially if that meant lower prices for consumers?

“If you let people leak like this, we would essentially be giving up our total return on our intellectual property,” replied Mr. Cook.

The judge asked if Apple’s decision last year to lower its commission on app sales for developers making less than $ 1 million a year was aimed at distracting the review of Apple’s App Store policies. Mr Cook admitted that testing was a factor, but added that Apple primarily wanted to help small developers who were hit by a weak economy during the coronavirus pandemic.

Judge Gonzalez Rogers then launched a poll that found 39 percent of app developers were dissatisfied with Apple’s management of the App Store. “It doesn’t seem to me that you are again feeling any real pressure or competition to actually change the way you act to address developer concerns,” she said.

The judge’s biggest challenge in ruling the case may be to define the market that Epic and Apple are contending over.

Epic lawyers have argued that these are iPhone apps and that a game maker needs to walk through Apple’s “walled garden” to reach the more than one billion people who use the devices. This stifles innovation, Epic claims, and allows Apple to enforce strict rules and harm app developers by charging excessive fees. The company wants to host its own digital storefront within Apple.

Mr Cook said Friday that he was “not a gamer” but argued that Epic distributed its games in a number of ways, including through web browsers, game consoles and personal computers. Many of these platforms charge a commission similar to that of the App Store. If gaming is the market, Apple has argued, then there are a lot of competitors – like Microsoft, Sony, and Nintendo – so Apple cannot have a monopoly.

Judge Gonzalez Rogers expressed frustration with the market semantics. “One side will say it’s black, the other say it’s white – usually it’s somewhere in the gray,” she said last week.

At the beginning of the study, Trystan Kosmynka, Apple’s senior director, testified that the company rejected 40 percent of all app submissions in 2020. Apple cannot effectively monitor which apps get onto iPhones when Epic has its own app store. Said Kosmynka.

Epic responded with a flurry of internal Apple emails showing times when malicious apps got past Mr. Kosmynka’s team. An app released during the summer protests against Black Lives Matter was a game that allowed users to shoot cannons at protesters.

Apple tried to show why allowing an app store on an app store can be problematic. Lawyers criticized Epic’s digital business for not keeping controls tight enough, saying companies managed to use it to sell games they described as “offensive and sexualized.”

In an attempt to tie Epic to inappropriate content, Richard Doren, an Apple attorney, brought up Peely, a comic banana in Fortnite who is sometimes wearing a tuxedo and sometimes naked. Mr Doren implied that it would have been inappropriate to show Peely in federal court without a tuxedo. Matthew Weissinger, Vice President Marketing at Epic, made it clear that Peely, naked or suitable, wasn’t scandalous.

“It’s just a banana man,” he said.

The battle between the companies began in August when Epic broke Apple’s rules by bypassing Apple’s payment system in the Fortnite app. Apple removed Fortnite from the App Store, and Epic immediately sued the company and launched an advertising campaign around the suit.

On the first day of the trial, Epic’s chief executive Tim Sweeney testified that his company filed a lawsuit because he wanted to show the world the consequences of Apple’s policies. Judge Gonzalez Rogers cut him off and asked if Mr. Sweeney knew about another developer’s lawsuit against Apple.

Mr. Sweeney said he did.

“And you just ignored that and went alone,” replied the judge.

The trial will complete on Monday, but Judge Gonzalez Rogers said a decision would likely take months. “Hopefully before August 13th,” she said. She also said her decision would likely be challenged, meaning the process could only be the first chapter of a lengthy battle.