Can an iOS Message Filter App Extension write data to a shared app container?

Hi Team


The last couple of days, I have been developing a Message Filtering iOS App extension. From what i have understood in the link "https://developer.apple.com/documentation/identitylookup", App extension can't write data to containers shared with the containing app.


However, in this link, "https://developer.apple.com/library/content/documentation/General/Conceptual/ExtensibilityPG/ExtensionScenarios.html", it states that iOS App extensions and the corresponding container can created an optional shared container to communicate and update data relevant to both container app and extension.


With this information, I am confused as to if my Message Filter iOS app extension (along with container app) would be rejected by the App Store if i create a shared container to communicate data between container and extension app.


Could I get more clarity on this?


Thanks in advance


Prabhu P.

Hi Prabhu,


In regard to the type of App Extension you want to build, the documentation for identityLookup <https://developer.apple.com/documentation/identitylookup>states :

For privacy reasons, the system handles all communication with your associated server; your Message Filter app extension can't access the network directly.

Also for privacy reasons, your app extension can't write data to containers shared with the containing app.


You should not be writing data to a shared container for this particular type of Application Extension. Generally, you can use App Groups with NSUserDefaults to communicate information between your App and its Extensions.

Since NSUserDefaults cannot be used to share information between the App and the SMM Filtering extension, is there an alternative way to notify the user—such as a local push notification—when they receive a message categorized as promotion, financial, or potential scam?

Can an iOS Message Filter App Extension write data to a shared app container?
 
 
Q