Please do not post the same thing multiple times. The board software automatically flags certain posts as needing moderator attention. This happens the most often for new users. I'm pretty sure this is made clear at the time you attempt to post. Posting the same thing over and over again just makes that many more posts the moderators have to weed through later. This makes us sad. Don't make us sad. If your post/thread doesn't appear, just wait a while. Don't post it again. If it hasn't shown up by the next day, then you can try again. I normally go through posts in the mornings, and try to check a few times throughout the day, but I'm not here 24/7. There will typically be a significant delay before posts are approved. Just be patient.
NSSavePanel not working after sandboxing an app... please help!
I'm having a problem saving a string file with NSSavePanel after sandboxing the app for the Mac Appstore.... I have com.apple.security.files.user-selected.read-write on yes... and the openfile is working as it should... but when I try to save a new file it seams that everything is working fine but then there is no saved file where it should be.... This is the code I am using to save the file:
NSSavePanel *save = [NSSavePanel savePanel];
long int result = [save runModal];
if (result == NSOKButton) { NSString *selectedFile = [save filename];
Not sure why it does not work, but if can be more helpful if you could show the error you're getting. Try getting the error from writeToFile and log it. like this:
Not sure why it does not work, but if can be more helpful if you could show the error you're getting.
Hey! I get this error:
Error Domain=NSCocoaErrorDomain Code=513 "Non hai i permessi per salvare il documento test.dat nella cartella Scrivania." UserInfo=0x100171d40 {NSFilePath=/Users/mycomputer/Desktop/test.dat, NSUnderlyingError=0x100569f00 "Impossibile completare l'operazione. Operation not permitted"}
As it is part italian I will translate it for you:
- Non hai i permessi per salvare il documento test.dat nella cartella Scrivania" - You don't have permission for saving document test.dat in the folder "Desktop"
- Impossibile completare l'operazione. - Impossible to complete the operation.
It seams that also if I give user permission to save a file where he wants the system doesn't allow the user to do it... Thanks for your help! Massy
Replies
that'll help to determine the problem
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeError Domain=NSCocoaErrorDomain Code=513 "Non hai i permessi per salvare il documento test.dat nella cartella Scrivania." UserInfo=0x100171d40 {NSFilePath=/Users/mycomputer/Desktop/test.dat, NSUnderlyingError=0x100569f00 "Impossibile completare l'operazione. Operation not permitted"}
As it is part italian I will translate it for you:
- Non hai i permessi per salvare il documento test.dat nella cartella Scrivania"
- You don't have permission for saving document test.dat in the folder "Desktop"
- Impossibile completare l'operazione.
- Impossible to complete the operation.
It seams that also if I give user permission to save a file where he wants the system doesn't allow the user to do it...
Thanks for your help!
Massy
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesomeif someone is interested here is the solution:
objective c - NSSavePanel is not saving a file after sandboxing an app - Stack Overflow
thanks a lot
Peace
Massy
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesomethanks for sharing the solution.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome