Quote:
Originally Posted by orange gold
So what would I put inside my awakeFromNib code to copy the file and allow a re-writeable one? What's the function called?
|
Take a look at the NSFileManager class. It has a couple of methods who's names start with "copyItem" that should do the trick.
By the way, you do not want this code in awakeFromNib. You want it in in the init method for your app delegate, so the file is copied over very early in the launch process.
You should check to see if the file already exists in the documents directory. (Do a search in the NSFileManager class for "exists" for a method to check if a file exists.) If so, you're done. If not, copy the file.