SHANGHAI — Apple’s chief executive, Timothy D. Cook, took the unusual step Monday of apologizing to Chinese customers over the company’s warranty policy and said he would improve customer service in the country.

Apple’s apology Monday was the latest twist in a strange spectacle that has unfolded in recent weeks in China over Apple’s warranty policies and underscored the challenges the company is facing as the country becomes an important market for its products.

Apple’s problem began on International Consumers’ Day, when China’s biggest state-run television network, as is its tradition, broadcast an investigative report on how companies operating in China cheat or mistreat consumers. This year, on March 15, one of the targets was Apple.

China Central Television criticized the American company’s after-sales iPhone customer service in China because it gave only a one-year warranty, while in China the law is two years. It also said that phone owners had to pay about $90 to replace a faulty back cover.