0

I need to iterate through all albums/photos from the photos app, to get their name,id, directory, thumbnail url.

This question has been asked already at Iterate through photo library on OS X?

but I still cannot get it to work. Based on the code from toohtik at Programmatic access to the Photos Library on Mac OS X: PhotoKit / Photos Framework for Mac

I am getting compile error with

forKeyPath:@keypath(album, mediaObjects)

unexpected @ in code. So if you could tell me what that keypath is, or what I need to do to fix it.

Community
  • 1
  • 1
DrDoom
  • 149
  • 3
  • 16

1 Answers1

0

I have found a way to make that keypath a thing, in the project https://github.com/jspahrsummers/libextobjc I downloaded it and took 2 files : EXTKeyPathCoding.h and metamacros.h and included them in my project. Turning @keypath to a macro. And now everything seems to be working.

DrDoom
  • 149
  • 3
  • 16