> On Jan 10, 2020, at 6:36 AM, Gabriel Zachmann via Cocoa-dev > <cocoa-dev@lists.apple.com> 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 (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/petrock%40mac.com > > This email sent to petr...@mac.com _______________________________________________ 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