Core Data won't save external storage blob on iOS 15

I am getting the following error when trying to save a Core Data entity on iOS 15 for a Binary Data property that's marked as Allows External Storage.

NSDestinationFilePath=/private/var/mobile/Containers/Data/Application/84AF234B-E720-4DD5-96F5-4D9FE9EC374C/tmp/.LINKS/6BD575C1-FF6F-4F7E-A3A5-DF334B4219F8/F0FFA46B-6A17-4783-8935-8EF20509B990_0x2825aea80, NSFilePath=/private/var/mobile/Containers/Data/Application/84AF234B-E720-4DD5-96F5-4D9FE9EC374C/Documents/Test Photos.tapforms/db-ebd84a251706462fb4df5308b3cbdd1c.cd/.tf6_SUPPORT/_EXTERNAL_DATA/F0FFA46B-6A17-4783-8935-8EF20509B990.interim, NSUnderlyingError=0x2816b9bf0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}

So it would seem perhaps that Core Data is writing an interim file probably in an atomic way and may be trying to rename it afterwards. But it's not finding the .interim file and is throwing this error.

Does anyone know a solution to this problem?

Thanks,

Brendan

Well it turns out it was saving the binary data. I still get the file not found error though, but perhaps it's harmless. I wasn't seeing the photo I was saving appear due to a cacheing mechanism I had. I was forgetting to clear the cache after I added new images. So new images weren't showing up. It's all good.

Core Data won't save external storage blob on iOS 15
 
 
Q