Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Apple chief executive Tim Cook met some of China's hottest app developers and used a Didi Chuxing car to visit Apple's store in the popular shopping district Wangfujing on Monday, after arriving in Beijing for a charm offensive.

Apple announced on May 13 that it had invested $1 billion in Didi Chuxing, a Chinese app that offers ride-hailing services similar to Uber in the U.S.

Apple CEO Tim Cook during his visit to China at an Apple Store in Wangfujing, Beijing. Apple via EPA

At the Apple store, Cook attended a seminar hosted by Didi Chuxing's President Jean Lui, also known as Liu Qing, and attended by the founders and CEOs of some of China's top app providers, including Groupon-like Meituan, picture-editing app MeituPic, news content provider Toutiao.com, culinary app DayDayCook and game developer Tap4Fun.

According to local media, the Apple boss told the app developers that their innovative work was consistent with Apple's "spirit."

Read More From CNBC: Apple Invests $1 Billion in China Uber Rival

Byers Market Newsletter Get breaking news and insider analysis on the rapidly changing world of media and technology right to your inbox. This site is protected by recaptcha

Cook also reportedly said that government policy played an important role in developing China's digital economy, and that the California-based tech giant was keen to work with China on this.

After the seminar, Cook posted two photos of himself and Liu on his official Weibo account and said, "Enjoyed sharing a taxi ride this morning to the Apple Store Wangfujing. Thanks, Jean Liu and Didi Chuxing!"

And in a formal statement, Liu recalled Didi Chuxing's development - the service was created from the merger of two ride-hailing apps, Didi and Kuaidi, before rebranding itself in April as Didi Chuxing, which means "honk, honk, commute" in Chinese - since first appearing in Apple's App Store in 2012.

"Now we are serving over 300 million users with eight product lines. Every day over 11 million rides are completed on our platform" Liu said.

"Meanwhile, our collaboration with Apple enters into a new stage. There are many similar stories like ours. Apple and the App Store are not only the role model of the entire tech world, they are also the grass root platform for aspiring innovators. This is where dreams take off."

Although the visit had not been officially confirmed by Apple, Cook was expected to visit China to woo government officials after suffering a series of setbacks in its biggest overseas markets. Reuters broke the news of his impending visit on May 6.

At its second-quarter results announcement in April, Apple revealed its first quarterly revenue drop in 13 years, on the back of a 26 percent year-on-year fall in smartphone sales in Greater China. In the same month, Chinese regulators apparently blocked access to Apple iTunes Moves and iBooks Store.

And investor Carl Icahn dealt Apple a blow by saying he had sold his stock, saying that although Apple was a great company and Cook was doing a great job, he was worried about the company's exposure to China.

"You worry a little bit — and maybe more than a little — about China's attitude," Icahn said at the time, adding that China's government could "come in and make it very difficult for Apple to sell there ... you can do pretty much what you want there."

Then, in May, Apple lost a trademark dispute over a Chinese company's use of the name "iPhone."

At the Q2 results announcement, Cook was bullish on China, saying that he thought worries about the country's slowdown were overblown.

Apple underlined its confidence in the country last week by making a $1 billion investment in Didi Chuxing, a Chinese app that offers ride-hailing services similar to Uber in the U.S.