Apple chief executive Tim Cook apologized to Chinese consumers on Monday and altered iPhone warranty policies in its No. 2 market after more than two weeks of condemnation of its after-sales service in the state-run media.

From China Central Television to the People’s Daily newspaper, government-controlled media outlets bashed the world’s largest technology corporation for its “arrogance,” protesting among other things that its one-year service warranty was far shorter than in other smaller markets.

Apple, which initially dismissed the criticisms, on Monday promised to overhaul its consumer practices. Cook has previously said the world’s second-largest economy is a crucial market for the iPhone- and iPad-maker.

“We are aware that owing to insufficient external communication, some consider Apple’s attitude to be arrogant, inattentive or indifferent to consumer feedback,” Cook said in a letter written in Chinese on the company’s local Web site. “We express our sincere apologies for causing consumers any misgivings or misunderstanding.”

Cook’s apology highlights the importance of the market for Apple. The country is typically the brightest spot in Apple’s quarterly financial statements. Revenue from Greater China — which includes Taiwan and Hong Kong — totaled $7.3 billion in its fiscal first quarter, up 60 percent from a year ago.

Cook also said in the lengthy letter that Apple has “much to learn about operating and communicating in China.”

Apple is hardly the first Western brand name to come under fire in the media for a variety of real or perceived missteps, or the first to alter its policies.

KFC parent Yum issued a mea culpa in January for its handling of reports that chicken from some of its suppliers contained excess amounts of drugs and hormones. It subsequently outlined how it would improve food safety and quality control.

Criticism of Apple began March 15 with the broadcast of an annual show on CCTV about consumer safety and rights, which has become an annual ritual targeting foreign, along with Chinese, consumer firms.

The program assailed Apple for its after-sales service, including Apple’s failure to offer new replacement iPhones with a one-year warranty in the case of major repairs.

Now, Apple will offer full replacements of iPhone 4 and 4S instead of major repairs, adding a one-year warranty starting from the date of replacement.

It will provide simpler and clearer explanations of warranties on its Web site and allow customers to offer feedback directly, Cook said.

The iPhone 5, the latest model, already carries a similar warranty to the new iPhone 4 and 4S coverage.

CCTV’s show this year became the subject of online ridicule over claims that the network paid celebrities to post micro-blog comments against Apple. Thousands of Chinese have come to Apple’s defense online, criticizing Chinese firms as being the ones that lack transparency and consumer trust.