I did say that, and the app definitely isn’t sandboxed (it’s running from Xcode 
also). However, I just noticed that I get this in the log when the app receives 
the error:


28/01/2016 12:26:35.124 PM sandboxd[127]: ([19475]) MyApp(19475) deny 
file-write-create /Users/grahamcox/Desktop/Untitled_0001.png


So for some reason the sandboxd process is rejecting the file write even though 
the app isn’t sandboxed! 

The full report stack trace shows the expected thing (some details not 
included):

Version:         2B06 (2.0)
Code Type:       x86_64 (Native)
Parent Process:  debugserver [19476]

Date/Time:       2016-01-28 12:26:34.941 +1100
OS Version:      Mac OS X 10.11.3 (15D21)
Report Version:  8

Thread 0:
0   libsystem_kernel.dylib        0x00007fff92ea6116 __rename + 10
1   Foundation                          0x00007fff8ab056cd 
_NSWriteDataToFileWithExtendedAttributes + 855
2   Foundation                          0x00007fff8ab32ae6 -[NSData(NSData) 
writeToURL:options:error:] + 254
3   MyApp                               0x00000001000f028f 
-[MDABExportOperation writeToFiles:] + 1055 (MDABExportController.m:965)
4   MyApp                               0x00000001000eb511 
__65-[MDABExportController 
beginSheetExportOperation:onParentWindow:]_block_invoke + 449 
(MDABExportController.m:104)



Sandboxing issues are bad enough to deal with, but when they bleed over into 
‘open’ apps that’s just nasty.


—Graham







> On 28 Jan 2016, at 2:05 PM, Alex Zavatone <z...@mac.com> wrote:
> 
> Sorry man.  It’s been a long long day.
> 
> On Jan 27, 2016, at 9:54 PM, Roland King <r...@rols.org> wrote:
> 
>> From the original mail
>> 
>> "Note this isn’t a sandboxed app, so that shouldn’t come into it.”
>> 
>> 
>>> On 28 Jan 2016, at 10:51, Alex Zavatone <z...@mac.com> wrote:
>>> 
>>> According to the sandboxing docs, I recall that for sandboxing, there are a 
>>> certain set of locations where you can save files to without requiring user 
>>> permission.  Your ~/Documents folder is one of them. IIRC, all other 
>>> locations require user confirmation to save the files.


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to