I want the user to be able to access the files in the documents directory but am using core data and dont want the user to be able to access the store (the sqllite db), can i hide it from the user while still allowing file sharing, or can i put it in another directory where it will still get backed up?
views:
821answers:
2
A:
In the documents directory, create a subdirectory which name starts with a dot. For example:
.data
FenchKiss Dev
2010-05-31 20:05:47
this is just the straight unix files that start with a '.' are hidden?so this will still get backed up, i.e. the entire contents of the documents directory gets backed up?
Aran Mulholland
2010-05-31 23:03:05
Having tested this on a device, the standard unix hidden dir works fine and is backed up.
Marcus S. Zarra
2010-07-03 15:12:53
+1
A:
The answer given by FrenchKiss Dev is not correct. The user will still be able to see the ".data" directory in iTunes and save that locally with all the files inside it. You should store any files you don't want to share to Library/Preferences.
Harkonian
2010-06-01 21:14:48
This is incorrect. The .data is hidden from iTunes and putting things in Library/Preferences is a bad idea per the development documentation
Marcus S. Zarra
2010-07-03 15:13:20
Thank you M.Zarra. I hadn't seen this.My answer is correct of course.I don't know which way is the best practice though.
FenchKiss Dev
2010-07-05 12:32:33
It's unfortunate that I've been ranked down. My answer is correct. I have an app in the app store that I needed to enable iTunes sharing and I did extensive testing on it. I can, in fact see the directory my app created. I can click on that directory and download it. The directory is in no way hidden. This is on a Windows machine and with system files/hidden files set to visible. My understanding is that this does not work in iTunes on OSX, but it certainly does in Windows.
Harkonian
2010-07-07 06:37:15
Holtwick
2010-08-24 15:23:19