Bug in Files App/FileManager: App folder is hidden and files in app folder can be read but not deleted

This is an old bug but it has never been fixed: App Folder do not shown in Files App.

(UIFileSharingEnabled and LSSupportsOpeningDocumentsInPlace in info.plist are true)

There was a workaround to make the app folder appears in Files app again: Restart device or simulator.

But this trick doesn't work any more after I updated to XCode 13 and run simulators in iOS15.

I can read files in the Documents folder of the app, but unable to delete or trash them. If I trash a file in the Documents folder, this error will appear:

Error Domain=NSCocoaErrorDomain Code=4101 "Provider returned unsupported error" UserInfo={NSUserStringVariant=Trash, NSURL=file:///Users/***/Library/Developer/CoreSimulator/Devices/***/data/Containers/Data/Application/***/Documents/file.zip, NSDebugDescription=Provider returned unsupported error, NSUnderlyingError=0x600001b93270 {Error Domain=NSFileProviderInternalErrorDomain Code=3 } ...

However, I still can open the Documents folder from simulator with MacOS Finder and delete files from here.

I believe this happens in production too because many users reported sometimes they can't delete files in the app.

I would like to know if there is a solution for this problem

Bug in Files App/FileManager: App folder is hidden and files in app folder can be read but not deleted
 
 
Q