Appendix U: Snap & ScanKeeper (Shop Manual)
Status: Live on the App Store. v1.1 approved Apr 6 2026. App Apple ID 6755695364. Bundle ID com.NightGard.Snap-ScanKeeper. Universal iPhone + iPad. iOS 16.0+. GPL v3. Public repo at github.com/fluhartyml/Snap-ScanKeeper. Snap & ScanKeeper is a focused VisionKit-powered document scanner that turns iPhone or iPad camera captures into PDFs and saves them to the user's Photos library. Privacy-first: everything happens on-device, no network, no cloud, no tracking. Book 11 (FileManager and Documents) Live Reference points at this app for the FileManager-driven save flow.
What it is
One screen: a scan button, a share button, and a settings gear. Tapping scan opens VisionKit's document camera; the user captures one or more pages with automatic edge detection and perspective correction; the app generates a PDF (or images, per the save-format setting) with a timestamp filename and writes it to a custom Photos album. Multi-page scans become multi-page PDFs. That's the whole product.
Architecture overview
Small, sharp, no SwiftData — the app doesn't model documents internally. The Photos library is the source of truth.
- App entry:
Snap_ScanKeeperApp.swift—@mainscene. - UI:
ContentView.swift— the one-screen surface (scan / share / settings). - Document scanner bridge:
DocumentScannerView.swift—UIViewControllerRepresentablewrappingVNDocumentCameraViewController. The delegate hand-off returns the capturedVNDocumentCameraScanto the SwiftUI layer. - Save pipeline:
PhotosManager.swift—@MainActorsingleton handling PDF generation (timestamp filename patternSnapScanKeeper-yyyy-MM-dd-HHmmss.pdf), custom Photos album creation, and per-page image saves. - Settings:
SettingsView.swift— Form with radio-button save-format selection (PDF only / images only / both / neither-just-share). - Feedback:
FeedbackView.swift— mail composer for bug reports. - Notes:
SnapScanKeeper_DeveloperNotes.swift— canonical roadmap with version history and submission notes.
The scan pipeline
- User taps Scan. SwiftUI presents
DocumentScannerViewas a full-screen cover. VNDocumentCameraViewControllerhandles capture — live edge detection overlay, manual capture button, multi-page mode, retake / done flow. All Apple-provided.- On done, the delegate receives a
VNDocumentCameraScanwith one or moreUIImages. PhotosManagerwalks the images, generates a single PDF via UIKit'sUIGraphicsPDFRenderer, and writes it (plus optional per-page images) to the custom Photos albums.- The share button then surfaces the most-recent PDF via
UIActivityViewController.
Save modes (four)
The Settings screen offers four save-format options:
- PDF only — writes a single multi-page PDF to
Snap&ScanKeeper PDFsalbum. - Images only — writes one image per page to
Snap&ScanKeeper Imagesalbum. - Both — writes the PDF and the per-page images to their respective albums.
- Share only (no save) — skips Photos entirely; the share sheet is the only way to get the scan out of the app. Useful for scans the user doesn't want to leave on the device.
Privacy posture
Everything happens on the device:
- No network access. No URLSession, no analytics SDK, no telemetry.
- VisionKit runs on-device. Pages never leave the camera-to-Photos pipeline.
- Photos permission is requested only when the user first saves — not at launch. The app can scan and share without ever asking, if the user always uses save-mode 4.
- Custom photo albums are created on first save; deleting them in Photos.app deletes the saves and the app re-creates the albums on the next save.
Build + deployment
- App name: Snap & Scan Keeper.
- Bundle ID:
com.NightGard.Snap-ScanKeeper. - App Apple ID: 6755695364.
- Platforms: iPhone + iPad universal.
- Deployment floor: iOS 16.0+ — chosen because VisionKit's document camera and the Photos custom-album API both stabilized in iOS 16. iPadOS gets the same surface.
- Frameworks: SwiftUI, VisionKit (document camera), PhotosUI / Photos (custom album writes), UIKit (PDF rendering via
UIGraphicsPDFRenderer, share sheet viaUIActivityViewController), MessageUI (feedback composer).
History — the rename trail
This app reached the App Store after three failed names: SnazzyScan, Swift-Scan, SnapKeeper. Each was submitted, rejected for various reasons (App Review issues, name conflicts, scope mismatches), and abandoned before this version was rebuilt under the current name. Mentioned here because the project on disk and the GitHub repo carry traces of the earlier names — old screenshots, old commit messages, old assets — that don't match the current product. When reading the source against this manual, expect occasional historical drift in comments and asset filenames.
Known gotchas
- Custom Photos album creation is asynchronous and can fail silently. The first save after a fresh install needs to
performChangesto create the album before the asset can land in it. If the user has restricted Photos library permission to "Selected Photos," the album creation fails without an error in the standard sense — the user just doesn't see anything in Photos.PhotosManagerhandles this by re-checking authorization state before each save. - PDF page size pulled from the source image.
UIGraphicsPDFRendererwants a page bounds rect; using each scanned image's own size keeps the PDF visually correct. Hardcoding US Letter or A4 would distort the captured page. - VisionKit returns images, not PDFs. The PDF generation is the app's responsibility. If a future iOS adds a "VNDocumentCameraScan returns a PDF directly" API, this code becomes simpler — until then, the
UIGraphicsPDFRendererpath is the load-bearing piece. - Pre-rename traces in the repo. See history section above; reading commits older than the rename can be confusing.
Sources
- Project source: github.com/fluhartyml/Snap-ScanKeeper (verified 2026-05-10).
- Canonical roadmap:
Snap&ScanKeeper/SnapScanKeeper_DeveloperNotes.swiftin the project repo. - Live on App Store: App Apple ID 6755695364.
- Book 11 cross-reference:
FileManager+ custom-album save flow. - Source Tour 20 in Part VII walks through this app's architecture.