You can confirm this in at least two places:
Write an app that accesses the photo library and launch it with these command line arguments:
-com.apple.CoreData.SQLDebug 1. As you access the photo library, you’ll see Core Data logging debug information to the Console.
In my quest to understand the Photos framework better (especially its performance characteristics), I wanted to inspect its data model. I found a file named
PhotoLibraryServices.framework/photos.momd/photos-10.0.mom deep in the bowels of the Xcode 10.0 app bundle:
.mom file is a compiled Core Data model. Xcode can’t open this directly, but it can import one into another Core Data model. Follow these steps to view the model in Xcode:
- Create a new empty project. Xcode 10 doesn’t like to display Core Data model bundles outside of a project.
- Create a new empty “Core Data Data Model” file inside the project. This will create an
- Open the new data model and select Editor > Import…. Select the
.momfile you want to import.
Unfortunately, the compiled model doesn’t store the layout information for Xcode’s graphical model editor, so you’ll have to manually drag the entities into a pleasing layout. This took me a few hours.
photos-10.0.mom as bundled with Xcode 10.0 (iOS 12.0):
Not everything can be seen in this image. Download the full model and open it in Xcode to inspect attribute properties etc.
Note that this isn’t necessarily the entire data model for photos on iOS. There are more Core Data models in
PrivateFrameworks/PhotoAnalysis.framework which I ignored.