I have an app intent that returns a file from inside the Sandbox.
With iOS 18 RC, the call to INFile
results in the file being deleted, instead of the file being returned.
intentResponse.file = INFile(fileURL: fileURL, filename: fileName, typeIdentifier: nil)
This seems to happen if the file was created by an earlier Shortcut action that calls FileManager().copyItem()
, but not for files created by other means.
I haven't found a reference in the developer documentation about INFile
resulting in the file being deleted.
I can block FileManager()
from deleting the file by setting its immutable
attributes to true
, but that prevents me from removing it later.