It's a fight that is going on for some time. Apple, the maker of the iPhone, and TRAI, the agency that regulates telecom networks in India, are in middle of a bitter fight over the matter of SPAM calls and messages. Now, with a new regulatory policy TRAI has hinted that if Apple doesn't step back and allows a TRAI app on the iPhone, it is possible that the agency may ask telecom companies like Airtel, Vodafone and Jio to delist and deregister the iPhone from their networks.

The issue is related to an app that TRAI has created. The agency has made an app called DND -- now called DND 2.0 after the latest update -- but Apple has refused to allow this app in the iOS App Store. Apple believes that the TRAI app, because it seeks the call and message records of a user, is a privacy risk.

It is worth noting that Apple takes the privacy of iPhone users fairly seriously and tightly controls the access and data that apps want from users. Google, the maker of Android, has more loosely-created guidelines around the apps accessing private data of users. The DND app is available to Android users and can be downloaded from the Google Play Store, although it has a poor rating.

On Thursday, TRAI published new regulations mandating that all smartphone users in the country should be able to install the DND 2.0 app on their phones, whether they are using an iPhone or an Android phone. The regulations, suprisingly, need to be followed by telecom companies and not the phone makers, who do not fall under the purview of TRAI.

"Every Access Provider shall ensure, within six months' time, that all smart phone devices registered on its network support the permissions required for the functioning of such Apps as prescribed in the regulations 6(2)(e) and regulations 23(2)(d)," TRAI notes in its regulatory document. "Provided that where such devices do not permit functioning of such Apps as prescribed in regulations 6(2)(e) and regulations 23(2)(d), Access Providers shall, on the order or direction of the Authority, derecognize such devices from their telecom networks."

Ouch! In other words, if Apple continues to resist DND 2.0 app from TRAI, and does not permit it entry in the iOS App Store, all the iPhones in India may lose access to 3G, 4G or even basic telecom networks.

While the TRAI directive looks stark, it is also possible that some middle ground will be found. The problem here is actually no problem, because whatever TRAI is trying to do and what Apple is proposing is basically same. They both seemingly want best for their users. TRAI wants to curb spam calls and messages on the phones, and Apple too is seemingly fighting for the same. But Apple also doesn't want to dilute the kind of privacy -- which is better than what Android phones offer to their users -- that the iPhone users have. And the company is very clear that it cannot allow any app, even the one created by a government agency, to access call and message logs.

Apple is touchy about privacy and in the past it defied the US government when FBI sought help from Apple engineers in unlocking iPhone belonging to San Bernardino shooter.

But it is possible that the upcoming iOS 12 can be the middle ground. In the iOS 12, Apple has put in new features that use smart algorithms and machine learning to identify and block spam messages. It is also possible that Apple may get an exception from TRAI and the Indian government for DND 2.0 by showing them that the iPhone already reduces spam with the iOS 12.