The iPhone maker looks to stage a comeback in digital assistants and artificial intelligence.