Is it possible to write to an App Group's Container folder or UserDefaults from an iOS Thumbnail Extension or QuickLook Extension?
It doesn't work. It does work for a Widget extension.
I've added the App Group to the Entitlements of each extension.
The use case is, that we are investigating an issue and would like to log to a file which we then can have customers send us.
It doesn't work. It does work for a Widget extension.
I've added the App Group to the Entitlements of each extension.
For writing a file to App Group Container I get
Code Block Error Domain=NSCocoaErrorDomain Code=513 "Du hast nicht die Zugriffsrechte, um die Datei „quicklook 01 current.log“ im Ordner „DocumentInvestigation“ zu sichern." UserInfo={NSFilePath=/private/var/mobile/Containers/Shared/AppGroup/<redacted: the container UUID>/DocumentInvestigation/quicklook 01 current.log, NSUnderlyingError=0x28090bb10 {Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted"}}
For setting App Group UserDefaults
Code Block [User Defaults] Couldn't write values for keys ( example ) in CFPrefsPlistSource<0x2839cc700> (Domain: <redacted: the-group-identifier>, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No): setting preferences outside an application's container requires user-preference-write or file-write-data sandbox access
The use case is, that we are investigating an issue and would like to log to a file which we then can have customers send us.