Apple's latest quarter benefited from better-than-expected iPhone sales, which were up 1.5% from a year ago.