Apple escapes tech rout with a scratch; iPhone sales rise 9.7% year-over-year