The iPhone maker revealed its new artificial intelligence products at its developer conference, the last with Tim Cook as the company’s chief executive.