Re: Security scoped bookmarks example?

2020-03-05 Thread Gabriel Zachmann via Cocoa-dev
> > So, you created a security scoped bookmark, then what did you do with it? You > should store it in user defaults, then load it from user defaults the next > time your code starts up, reconstitute it back into a security scoped URL, > and then use *that* URL (literally that object, not a

Re: Security scoped bookmarks example?

2020-03-04 Thread Quincey Morris via Cocoa-dev
On Mar 4, 2020, at 06:12 , Gabriel Zachmann via Cocoa-dev wrote: > >// load new image from disk >NSURL * url = [NSURL fileURLWithPath: [self absolutePathFor: filename_] > isDirectory: NO]; >// filename_ is one of the paths from the list of images under the user > selected

Re: Security scoped bookmarks example?

2020-03-04 Thread Gabriel Zachmann via Cocoa-dev
I am still having problems in my screensaver to access files that are stored on an external disk. The disk is just a simple hard disk connected to my Macbook via USB. (It is an important use case, since a lot of people like to keep there huge image collections on external hard disks.) I can