The iPhone and Mac sold well, but memory costs threaten further price increases.