How do I find out programmatically where the Photos app stores all the pictures?
Before answering that it's always
~/Pictures/Photos Library.photoslibrary/
, please be aware that this is only true for English installations of Mac OS. For example, in French, the folder is called
~/Pictures/Phototèque.photoslibrary/
and in German,
~/Pictures/Fotos-Mediathek.photoslibrary/
Best Answer
It's not as simple as changing the path based on the locale. The Photos library could be renamed and moved anywhere. You can find the current library by extracting the
IPXDefaultLibraryURLBookmark
from the Photos plist.The IPXDefaultLibraryURLBookmark contains a CFURLRef. This will require deserialising.