Back in 2018 it looked like Apple Inc.’s artificial intelligence efforts were finally getting on track. Early that year, Craig Federighi, Apple’s software chief, gathered his senior staff and announced a blockbuster hire: The company had just poached John Giannandrea from Google to be its head of AI. JG, as he’s known in the industry, had been running Google’s search and AI groups. Under his leadership, teams were deploying cutting-edge AI technology in Photos, Translate and Gmail—work that, along with the 2014 acquisition of the pioneering British company DeepMind, had given Google a reputation as a leader in ...