Re: Questions about sandboxing under Catalina
Re: Questions about sandboxing under Catalina
- Subject: Re: Questions about sandboxing under Catalina
- From: Rob Petrovec via Cocoa-dev <email@hidden>
- Date: Fri, 10 Jan 2020 06:56:42 -0700
> On Jan 10, 2020, at 6:36 AM, Gabriel Zachmann via Cocoa-dev
> <email@hidden> wrote:
>
> Steve, thanks a lot for your response!
>
>>>
>>> In my screensaver, I try to search the Pictures directory in the user's
>>> home.
>>> It is OK - for now - if my app cannot access any .photoslibrary, but I'd
>>> like to pick up
>>> any other images in ~/Pictures.
>>>
>>> I get the path using this line of code:
>>> [NSHomeDirectory() stringByAppendingPathComponent: @"Pictures/"]
>>>
>>> However, when I print the actual path to the system log, it says it is
>>> accessing this path:
>>> /Users/me/Library/Containers/com.apple.ScreenSaver.Engine.legacyScreenSaver/Data/Pictures
>>>
>>> Is this directory somehow linked to ~/Pictures ?
>>> Or how can I access the true ~/Pictures directory ?
>>
>> That's how sandboxing works.
>
> So, is .../Containers/.../Data/Pictures linked to ~/Pictures automatically?
No. The user has to give your app permission to see the contents of
~/Pictures.
https://developer.apple.com/library/archive/documentation/Security/Conceptual/AppSandboxDesignGuide/AboutAppSandbox/AboutAppSandbox.html
—Rob
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> 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:
>
> This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden