Apple said limited advanced chipmaking capacity and memory availability are constraining supply rather than demand. June-quarter revenue exceeded expectations, with strong iPhone and Mac sales, but the softer forward outlook weighed on the shares after hours.