Apple agreed to work with the Indian government to develop an anti-spam mobile app for iOS, Reuters reported, reversing a previous refusal to do so due to privacy concerns.

Named Do Not Disturb, the app allows users to share details of spam calls and text messages to enable operators to block offending numbers. Apple earlier declined approval because it said the app violates the App Store’s privacy policy and was criticised heavily by the country’s telecoms regulator.

Apple executives flew to New Delhi in October and said they would help with the app, but only to some extent.

An Apple representative said iOS features to combat spam text messages would help the government with the app, but did not comment on the app’s ability to access call logs, a feature the Android version offers.

Neil Shah, an analyst at research company Counterpoint Research, told Reuters: “This has now become more of an ego tussle between Apple and the regulator.” He added Apple was unwilling to agree to such requests because it would set a precedent for other countries.

Apple does need the government on its side, though, as it steps up its presence in India: in May the vendor opened its first iPhone manufacturing hub in the country in a bid to expand sales in a market which Canalys recently said had overtaken the US as the world’s second-largest smartphone market behind China.

The vendor increased its focus on India after suffering six consecutive quarters of double-digit sales declines in China, though it returned to growth in the latter market during its fiscal Q4 (the period from 2 July to 30 September).