Accessing ~/Pictures under Mojave from screensaver ?
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