Apple’s revenue declined for the fifth time due to ailing iPhone sales and competition in China. It plans to buy back up to $110bn in stock.