I have read many topics about this problem and I am still struggling with this one. I can’t get the file reading/writing work on device. I know the sandbox is not included when building the app so I made a function where it copies whole folder from system.ResourceDirectory to system.DocumentsDirectory.
Everything works fine in simulator, but not on device. The runtime error comes when the data from the file is trying to be loaded the 1st time AFTER the my copy function (object where the data is loaded is nil when there should be data), meaning there is no files in system.DocumentsDirectory.
Weird thing is that there is no errors when I use my copyFolder function, but when I try to read from system.Directory the file.
So is the source wrong (system.ResourceDirectory) or what do I do to get file write/read working on device?