• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Accessing ~/Pictures under Mojave from screensaver ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Accessing ~/Pictures under Mojave from screensaver ?


  • Subject: Accessing ~/Pictures under Mojave from screensaver ?
  • From: Gabriel Zachmann via Cocoa-dev <email@hidden>
  • Date: Sun, 26 Sep 2021 12:57:03 +0200

In  my screensaver, I'd like to search the ~/Pictures for images.
I would like to use that folder as a default, without requiring the user to
open it for me.

Under macOS Mojave (10.14), the ScreenSaverEngine has these entitlements:

        <key>com.apple.developer.extension-host.screensaver</key>
        <true/>
        <key>com.apple.security.cs.disable-library-validation</key>
        <true/>

(AFAIK)

My question is: would these allow me to access ~/Pictures without any user
intervention?
If yes, what would be the easiest/robust way to get the directory?
Should I just use:

dir = [ [NSFileManager defaultManager] URLForDirectory: NSPicturesDirectory
                                       inDomain: NSUserDomainMask
                              appropriateForURL: nil create: NO error: &err];


Thanks a lot in advance.
G.

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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

  • Prev by Date: Re: Entitlements of ScreenSaverEngine under macOS Mojave (10.14)
  • Next by Date: Sandboxing question regarding ~/Pictures
  • Previous by thread: Re: Entitlements of ScreenSaverEngine under macOS Mojave (10.14)
  • Next by thread: Sandboxing question regarding ~/Pictures
  • Index(es):
    • Date
    • Thread