After further attempts, and making use of the KeyChain capability, I believe Unwanted Communication Reporting Extension is not capable of any local writes.
Apple doesn't say this in the UCR docs. However they do say it in the Message Filtering Extension.
"For privacy reasons, the system handles all communication with your associated server; your Message Filter app extension can’t access the network directly.
Your app extension also can’t write data to containers shared with the containing app."
Post
Replies
Boosts
Views
Activity
I'm getting the same result.
Xcode Version 13.0 (13A233)
Tested on iOS 15.5 iPhone 11 & iOS 14.6 iPhone 11.
I made a small project using Xcode Version 13.2.1 (3C100) with the same result.
Getting the spurious error found here
Along with this error:
SMSReport[6600:233574] [User Defaults] Failed to create directory /var/mobile/Containers/Shared/AppGroup/123AC467-Example-Removed-RealValue/Library/Preferences because of [1: Operation not permitted].
2022-07-28 16:29:29.044238-0600 SMSReport[6600:233574] [User Defaults] Couldn't write values for keys (
numberKey
) in CFPrefsPlistSource<0x281f73c80> (Domain: group.com.mycompany.appName, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No): Directory needed
The values were being persisted in the extension but the values were not reflected in the Host App.
I tried writing to
FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: "group.com.mycompany.appName") and was getting an "Operation not permitted" too.
I'm beginning to think that persistence is not permitted in the Unwanted Communication Reporting Extension. However I have not tried the KeyChain capability yet.