The decline came as people cut back in the face of higher living costs, said Apple’s boss.