The company’s role as gatekeeper was lucrative: Apple collected 30 percent of the sale price of every app it sold and a similar amount each month from subscription apps. The sales had made the store a fast-growing contributor to Apple’s bottom line, providing the majority of its $18 billion in services sales. But Cook saw an opportunity in the growing app economy to make more money by transitioning from distributing to making apps.

