I have a Mac App that generates some data and write it to a file then asks the user where they want to save it and moves that saved file from the sandbox to the location they specify. This works fine unless the user selects a file that already exists. If the user presses "Replace" when OSX tells them that a file already exists, the NSError becomes non-nil with the following localized description.
"testfile" couldn’t be copied to “Desktop” because an item with the same name already exists.
How can I get this sandboxed app to overwrite the pre-existing file?
Thank you,
Stateful