Apple boss Tim Cook took the witness stand for the first time in his company's major legal battle with Epic Games over an alleged monopoly.
Epic, maker of the hit video game Fortnite, claims Apple's tight control over iPhone apps hurts competition.During his appearance, Mr Cook argued that keeping control of the App Store helped keep iPhones secure.
He also said he did not know if the App Store made a profit, telling the court Apple did not break down the figures.
Facing questions about the level of profit the App Store generates from the 30% commission it takes on sales, he said: "We don't have a separate profit and loss statement for the App Store."
Cook was being questioned about his oversight of top-level decisions around the App Store's policies.
Judge Yvonne Gonzalez Rogers also questioned Mr Cook, asking about a survey that showed 39% of developers are dissatisfied with the app store.