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."
Instead, he said that he had a "feeling" that it was profitable - but could not share figures with the court.
Mr 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.
Mr Cook said he was not familiar with the survey but said there was a "friction" because Apple rejected 40% of apps weekly.
The judge also asked him if he was a gamer, to which he admitted that he was not.
Mr Cook's opposite number in the case - Epic Games chief Tim Sweeney - has already appeared on the stand in the opening days of the long-running legal battle.