Subject Lifting — Background Removal
Extract foreground subjects from photos with transparent backgrounds using VisionKit's ImageAnalyzer — one-tap background removal with state machine lifecycle, original/extracted image pair, and PNG data output (iOS 18+)
Copies a short instruction with your private download link. Paste it into your agent: it downloads the whole skill (the source code, the setup steps and the mistakes we already made for you) and builds the screen.
Works with
What it does
Platform: iOS only, iOS 18+ — this module uses VisionKit APIs.
Many apps need to let users isolate objects from photos — sticker makers, product catalogs, collage editors, packing lists, or any app where users photograph items and want clean cutouts. Apple's VisionKit provides on-device subject lifting (the same "lift subject from background" feature in the Photos app), but wiring it up correctly requires understanding ImageAnalyzer, ImageAnalysisInteraction, and the async subject extraction pipeline.
This module wraps the entire flow into a single SWSubjectLiftingManager with a clear state machine (idle → processing → completed/failed), original and extracted image tracking, and PNG data output ready for persistence or sharing.
What you get
- ✓335 lines of source code, ready to paste
- ✓Architecture
- ✓Dependencies
- ✓Implementation
- ✓Integration Checklist
- ✓Common Customizations
- ✓Known Gotchas
More in Main screens









