Apple reported revenues Thursday that narrowly surpassed analyst expectations, sending shares lower in after-hours trading even as the company enjoyed a boost from iPhone sales.