Error Domain=NSCocoaErrorDomain Code=260 "The file couldn't be opened because there is no such file."
A saved absolute path no longer exists.
Exact message you may see
NSCocoaErrorDomain Code=260 The file couldn't be opened because there is no such filefile not found after app update container pathError Domain=NSCocoaErrorDomain Code=260 "The file couldn't be opened because there is no such file." Meaning
The app container UUID changes between installs/updates. Store relative paths and rebuild URLs from FileManager.default.urls(for:in:) each launch.
Common causes
- Absolute path persisted
- Container changed
- File deleted by system (Caches)
⚡ Quick fix
- Save only the file name
- Rebuild URL from Documents directory
- Don't store data in Caches
Detailed fix by platform
Swift
- swift
let docs = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)[0] let url = docs.appendingPathComponent(name)
How to diagnose
- Path — absolute?
- Dir — Documents?
- Cache — purged?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- Core Data: Failed to load model named / Unresolved error Fatal error: Unresolved error Error Domain=NSCocoaErrorDomain Code=134060
- DecodingError.dataCorrupted: The given data was not valid JSON Error Domain=NSCocoaErrorDomain Code=3840 "Unable to parse empty data." / dataCorrupted
- error: cannot run gpg: No such file or directory error: cannot run gpg: No such file or directory error: gpg failed to sign the data
Most viewed in iOS
- SIGABRT Thread 1: signal SIGABRT (app crashes with "libc++abi: terminating")
- ITMS-91053 ITMS-91053: Missing API declaration — Your app's code references required reason APIs (privacy manifest)
- integrity could not be verified Unable to Install "App": This app cannot be installed because its integrity could not be verified
Other ways to find it
Where this error sits
Origin: On your device. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Did this fix work for you?
Report a correction or suggest an improvement
Last updated 25 Nov 2026