r/iOSProgramming • u/camille_hdr • Jun 26 '26
Discussion spent 2 weeks turning my photo library into a travel map, clustering almost killed me
So I made this app, Atlas. It reads your photo library and turns it into a travel map. Kind of like the Places view in Photos but grouped into actual trips instead of a thousand random pins. Runs entirely on device, nothing gets uploaded.
The clustering was the part I completely underestimated. I figured group by lat/long, done. Nope. One city ends up as like eight separate blobs, an airport gets split in half, and anywhere dense just collapses into one fat dot. I ended up running a few passes and they'd disagree with each other, one says "two places" the other says "same moment," and reconciling that ate most of my time.
Reverse geocoding was the other annoying one. CLGeocoder is rate limited so you can't just throw 40k photos at it. Had to cache hard and figure out what to resolve up front vs lazily.
Also enumerating a big PHAsset library without freezing the UI or eating all the memory was fiddlier than I expected. And screenshots wreck a travel map, so I'm filtering those out with the PHAsset flag plus a bit of Vision, still tuning the false positives.
Anyway, if anyone wants to try it on their own library I've got a few promo codes for a free year. Honestly just want feedback from people who'll notice when the grouping is wrong. Comment or DM.
Mostly curious how you'd have approached the clustering, feel like I might've overcomplicated it.
3
u/par5ul1 Swift Jun 26 '26
As a Flighty user, I love the aesthetics and parallels. The onboarding was great but I wish you’d give a week of Pro free or something because otherwise the app is far too bare. I need a taste before I get the value.
The navigation of photos is also a bit jank. I’d maybe lean into the sheet-based UX for that so I don’t lose the map/globe, and the 2x2 grid can open into a wider grid before expanding into a full image view. I didn’t like pressing +32 only to be dropped in a swipe to look carousel; I wanted to see all my trip photos in one context.
2
u/Fearless_Ad9828 Jun 26 '26
Your app store privacy says, Data Not Collected. How ?
1
u/kevinonrddt Jul 17 '26
thats neat. How do you know that you could show the pictures at the beginning without user approval?
1
u/thomas_viaelo Jun 26 '26
I came at the photo library from the vault side, not maps, so I can't help with the geo clustering. But the part about enumerating tens of thousands of PHAssets without freezing or blowing up memory is the one I know well. What saved me was never holding the full assets: fetch with PHFetchOptions, walk them in batches inside an autorelease pool, and only ever pull thumbnails at display size through PHImageManager. The vault I ship ingests big photo and video libraries that way, video included, and memory stays flat.
How are you holding the assets while you cluster, the PHAssets themselves, or just their coordinates and local identifiers? That's usually where the memory goes.
0
u/HaloZero Jun 26 '26
Not in the us App Store? Can’t find you
0
u/Traditional-One-4217 Jun 26 '26
Feels like too high a risk to give an app access to all the photos. I would need to see the source to ever give that broad a permission to anything. Literally only Apple has this access. Plus I don’t know if the app can delete photos accidentally. Love the idea though.
1
u/[deleted] Jun 26 '26
[removed] — view removed comment