As iPhone sales declined for the second straight quarter, Cook peeled back the curtain ever so slightly on its work in artificial intelligence and augmented reality.