I am trying to do a backup/restore of my Core Data store; in my app, I create the file, do a fileExistsAtPath and the file is there. When I use Finder, it's not there. This is the code (which I copied and modified, so the style and duplicate naming is not mine; probably should start all over again) to create the backup:
UPDATE The code is here...
This is the console output:
currentURL is file:///Users/spokanedude/Library/Developer/CoreSimulator/Devices/1EE69744-255A-45CD-88F1-63FEAD117B32/data/Containers/Data/Application/41B5E165-C3E2-4D8A-81EB-98ADB20B8B0D/Documents/saori.sqlite 2015-01-20 10:41:36.042 SalonBook[84743:2055509]
backup file URL to use is file:///Users/spokanedude/Library/Developer/CoreSimulator/Devices/1EE69744-255A-45CD-88F1-63FEAD117B32/data/Containers/Data/Application/41B5E165-C3E2-4D8A-81EB-98ADB20B8B0D/Documents/saori.backup-20153920103944
2015-01-20 10:41:36.042 SalonBook[84743:2055509]
currentCoreData exists 2015-01-20 10:41:36.042 SalonBook[84743:2055509]
backupFile exists 2015-01-20 10:41:36.042 SalonBook[84743:2055509]
target file exists 2015-01-20 10:41:36.092 SalonBook[84743:2055509] current store file removed
2015-01-20 10:41:36.125 SalonBook[84743:2055509] replaced current store file successfully
2015-01-20 10:41:36.126 SalonBook[84743:2055509] store Options are { NSSQLitePragmasOption = { "journal_mode" = WAL; }; } 2015-01-20 10:41:36.127 SalonBook[84743:2055509] addPersistentStoreWithType completed successfully...
2015-01-20 10:41:36.127 SalonBook[84743:2055509] STORE FILE is /Users/spokanedude/Library/Developer/CoreSimulator/Devices/1EE69744-255A-45CD-88F1-63FEAD117B32/data/Containers/Data/Application/41B5E165-C3E2-4D8A-81EB-98ADB20B8B0D/Documents/saori.sqlite
When I do the backup, it says the file is there; when I use ForkLift (a Finder replacement) it shows up (sometimes); when I do the restore, it finds the file and says the restore was successful, but instead it wipes out the existing data, like the file contents were missing. Can't figure this out for the life of me... help would be appreciated.