Skip to content

Instantly share code, notes, and snippets.

@samsonjs
Last active April 19, 2024 03:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samsonjs/87115bf593ff43fbfd304ae82e38b2c4 to your computer and use it in GitHub Desktop.
Save samsonjs/87115bf593ff43fbfd304ae82e38b2c4 to your computer and use it in GitHub Desktop.
Flailing trying to find out how to open Photos.app (aka MobileSlideShow.app) to a specific asset like the Photo Shuffle lock screen
Decompiling the binary and looking through the methods `-[PhotosWindowSceneDelegate openRoutingURL:]`
and `-[PhotosURLNavigationRequest _navigateAllowingRetry:]` uncovers some candidates:
- photos-navigation://asset?uuid={uuid}
- photos-navigation://album?name=recents&revealassetuuid={uuid}
- photos-navigation://contentmode?id=photos&assetuuid={uuid}&oneUp=1
Opening up an album by name works but so far I've had no luck figuring out how to show a specific asset.
And ideally it would open up in the photo library tab not the albums tab, just like the Photo Shuffle
lock screen.
An interesting tidbit I learned along the way is that there are a handful of well-known named albums and
those are the only identifiers allowed for the name parameter:
- photo-library
- recents a.k.a. camera-roll
- recently-deleted
- ... and some others I don't care about related to imports and such
And some other hosts / actions that seem to be supported:
- oneyearago
- memories
- people
It looks like these are supported for the photos:// URL scheme as well but I had zero luck opening that
URL at all, rather than the photos-navigation:// scheme which at least opens the app in all cases.
Next step might be trying to figure out which app/framework handles the Photo Shuffle lock screen and
then decompile that to figure out which URL it calls.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment