Apple’s revenue rises with boost from services despite China slowdown