Menu

Your Photo Library Already Knows Every Trip You Took
πŸ“°

Your Photo Library Already Knows Every Trip You Took

DEV Community: iosΒ·Jelly OfficeΒ·about 8 hours ago
#n1Vszb95
#devtoios#devto#dev#trip#beacon
Long article (764 words) β€” no AI summary yet.
Reading 0:00
15s threshold

There is a category of iOS app that turns your camera roll into a map: Atlas, One Where, Backtrack, Pinlyy, Waypost, Mapsake, Travel View, Odyz β€” and mine, beacon . They all start from the same realization: you never logged your trips, but your photos did.

This post is about the data model behind that, and about the two places where it breaks.

What is actually in the library

For each asset you can read:

let options = PHFetchOptions ( ) options . sortDescriptors = [ NSSortDescriptor ( key : "creationDate" , ascending : true ) ] let assets = PHAsset . fetchAssets ( with : . image , options : options )

Enter fullscreen mode

Exit fullscreen mode

Then, per asset:

creationDate β€” near-universal

location β€” only when the camera had location permission and the photo was taken on the device

mediaSubtypes β€” .photoScreenshot , .photoLive , .photoPanorama

Two failure modes dominate every "my trip is missing" support email:

Screenshots and saved images have no location.…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.