NSSavePanel not working when sandboxed? - OSX • Objective C
问题 I have the following save panel in my app. I have recently tried to sandbox it but unfortunately when sandboxed saving doesn't seem to be working. I understand that beginSheetForDirectory is depreciated, so possibly that's why it's not working? How can I get this to work with sandboxing? - (IBAction)saveButtonPressed:(id)sender { NSSavePanel *sp = [NSSavePanel savePanel]; [sp setRequiredFileType:@"jpg"]; [sp beginSheetForDirectory:[NSString stringWithFormat:@"%@/Pictures", NSHomeDirectory()]