Apple on Friday accused OpenAI of stealing trade secrets as it seeks to build its own hardware for ChatGPT, a major rupture in a partnership between the iPhone maker and the artificial intelligence company.

READ MORE: Apple unveils new AI features with privacy focus at last developers conference with CEO Tim Cook

Apple said in the lawsuit filed in a California federal court that OpenAI encouraged Apple employees it was recruiting to share confidential information, even guiding how to avoid scrutiny when taking jobs at the other company.

"This case is about Apple's former employees stealing Apple's trade secrets for the benefit of OpenAI," the filing says. "Apple brings this suit to put a stop to it."

Two former Apple employees who now work for OpenAI are also named as defendants. One is Tang Tan, who helped design the iPhone, Apple Watch and iPod and is now OpenAI's chief hardware officer. The other is Chang Liu, a former electrical engineer Apple says it entrusted with some of its most sensitive product development efforts before Liu left Apple to join OpenAI earlier this year.