The Tim Cook-led company beat analyst estimates on sales of every product category except iPads.