DEV CommunityMonday · July 20, 2026FREE

Strip Location From Both Halves of an iOS Live Photo Before Upload

iosprivacylive-photolocation

The article addresses a privacy concern specific to iOS Live Photos, which consist of a 12-megapixel still image and a short video clip. While many users know to strip EXIF location data from regular photos, Live Photos store location metadata in both the image and the video track. The author demonstrates how to use the Photos framework (PHAsset) and AVFoundation to access each component, remove the location key from the image's metadata dictionary, and clear the location metadata from the video's AVAssetTrack. The solution involves creating a new CLLocation object with invalid coordinates or nil, then writing the modified assets back. The consequence is that users can upload Live Photos to web services without leaking their location, preserving privacy while maintaining the Live Photo format.

// why it matters

Developers can now ensure Live Photos uploaded to web services don't leak location data from the video component.

Sources

Primary · DEV Community
▸ Read original at dev.to

Like this? Get the next digest.