OldPix — Photo Scanner & Restore iOS App
Version 1.0 · SwiftUI · iOS 17+ · Xcode 16 or newer
Thank you for purchasing OldPix. This is a complete, production-ready iOS app that scans printed photos with the camera, restores faded colours, colorizes black-and-white photos with on-device AI, and organizes everything in a private library. It is monetized with auto-renewable subscriptions, a lifetime purchase and Google AdMob.
Read Configure your app and Rebrand before publishing. Apple rejects apps that are published unchanged from a template (App Review Guideline 4.3), so give your app its own name, icon, colours and App Store screenshots.
Features
- Smart scanning — automatic edge detection, perspective correction and manual crop.
- Restore — automatic removal of yellowing and colour casts, with contrast recovery.
- Colorize — on-device AI colorization of black-and-white photos (Core ML, no server).
- Album page — photograph a whole album page; every print is found, cropped and restored.
- Batch scan — scan many photos in a row.
- Enhance Studio — brightness, contrast, clarity, noise reduction and presets.
- Library & albums — SwiftData storage, favourites, notes, sorting, filters.
- Export — save to Photos, share, and export PDF albums.
- Monetization — StoreKit 2 subscriptions (monthly, yearly) and lifetime purchase, rewarded ads to unlock single exports, banner/interstitial/app-open/native ads, Google UMP consent and App Tracking Transparency.
- 12 languages — English, French, German, Spanish, Portuguese (Brazil), Italian, Dutch, Japanese, Korean, Traditional Chinese, Turkish and Arabic (right-to-left), plus an in-app language picker.
- Onboarding and a modern paywall.
- Privacy-first — all processing on the device, no account, no backend.
Requirements
- A Mac with Xcode 16 or newer.
- An Apple Developer Program membership to run on a device and publish.
- A Google AdMob account (optional if you remove ads).
- Deployment target: iOS 17.0. iPhone and iPad.
Installation
- Unzip the package and open
OldPix/OldPix.xcodeprojin Xcode. - Xcode resolves the Swift packages automatically (Google Mobile Ads and Google User Messaging Platform). Wait until "Fetching packages" finishes.
- Download the Colorize model (see next section).
- Select the OldPix target › Signing & Capabilities and choose your Team.
- Change the Bundle Identifier to your own, for example
com.yourname.yourapp. - Choose a simulator or your iPhone and press Run (⌘R).
In debug builds the app shows Google's test ads and uses Configuration/Products.storekit for purchases, so you can test everything without App Store Connect.
Colorize model
Colorize uses the open-source DDColor Tiny model converted to Core ML (Apache License 2.0). The weights file is about 242 MB, so it is not included in the ZIP. Download it once with the included script:
cd OldPix
./scripts/fetch-colorize-model.sh
The script downloads a pinned version from Hugging Face and checks its SHA-256 checksum. The model is shipped to users as an On-Demand Resource: it is not part of the initial App Store download, and the app downloads it from Apple's servers the first time someone uses Colorize. You don't need your own server.
On-Demand Resources are only served by Apple for builds distributed through TestFlight or the App Store. In debug builds from Xcode the model is embedded so Colorize works on the simulator and on your device.
Configure your app
Almost everything you need to change is in one file: OldPix/AppConfig.swift.
| Setting | What to put |
|---|---|
appName | Your app's name as shown inside the app. |
appStoreID | Your app's Apple ID (numbers only) from App Store Connect › App Information. Used by "Rate App". Leave empty until the app exists. |
privacyPolicyURL, termsOfUseURL, supportURL, websiteURL, contactEmail | Your own pages and email. Apple requires working Privacy Policy and Terms of Use links for apps with subscriptions. |
Products | Your in-app purchase product IDs (see In-app purchases). |
AdMob | Your AdMob app ID and ad unit IDs for release builds (see AdMob). |
freeLibraryLimit | How many photos a free user can keep (default 4). |
Also change, in Xcode:
- Bundle Identifier and Team (target › Signing & Capabilities).
- Display Name (target › General › Display Name).
- GADApplicationIdentifier in
Configuration/AdMob-Info.plist— must be the same AdMob app ID as inAppConfig.AdMob.appID.
Rebrand (name, icon, colours)
App icon
Replace the three 1024×1024 PNG files in OldPix/Assets.xcassets/AppIcon.appiconset (default, dark and tinted). Keep the same file names, or drag your images onto the slots in Xcode.
Colours
All colours are in OldPix/Utilities/AppTheme.swift. Change goldAccent (main accent), goldAccentDark, blueAccent (links and secondary actions) and the background colours. Also update AccentColor in Assets.xcassets.
Demo images
Onboarding, the home screen and the paywall show sample "before / after" images from Assets.xcassets (MemoryFamilyAged, MemoryFamilyRestored, etc.). The "Aged" images are AI-generated sample prints and the "Restored" ones are real output of the app's Restore. Replace them with your own images that you have the right to use, keeping the same names. Keep the images portrait, about 784 × 1100 px; if you change the ratio, update SampleMemory.aspect in VintagePhoto.swift.
Name inside translations
A few translated sentences contain the app name, for example "Welcome to OldPix Pro!". In Xcode, open Localizable.xcstrings and use Find & Replace (⌥⌘F) to replace OldPix with your app's name in all languages.
In-app purchases
The app sells three products with StoreKit 2:
| Default product ID | Type |
|---|---|
com.yourcompany.oldpix.pro.monthly | Auto-renewable subscription (1 month) |
com.yourcompany.oldpix.pro.yearly | Auto-renewable subscription (1 year), same subscription group |
com.yourcompany.oldpix.pro.lifetime | Non-consumable |
- In App Store Connect, create the subscription group and the three products with your own IDs and prices.
- Put the same IDs in
AppConfig.Products. - For local testing, update the IDs in
OldPix/Configuration/Products.storekit(open it in Xcode). - Prices, trial and period labels on the paywall come from StoreKit automatically, in the user's currency.
"Restore Purchases" is available on the paywall and in Settings, as Apple requires.
AdMob & consent
- Create an iOS app in AdMob and copy its App ID (
ca-app-pub-…~…). - Create ad units: Banner, Interstitial, Rewarded, App Open and Native Advanced.
- Paste the IDs into
AppConfig.AdMob, and the App ID intoConfiguration/AdMob-Info.plist›GADApplicationIdentifier. - In AdMob › Privacy & messaging, create and publish a GDPR consent message and an IDFA explainer for your app. The app shows them through Google UMP before asking for tracking permission.
- Publish an
app-ads.txtfile on your developer website (AdMob shows the exact line to use).
Debug builds always use Google's test ads. Never tap your own live ads: it can get your AdMob account suspended.
The SKAdNetwork identifiers that Google recommends are already in AdMob-Info.plist.
Removing ads
If you don't want ads, leave the IDs as they are and make Pro the only way to export; or remove the Services/Ads folder usage. The simplest approach is to keep the code and set a paid-only strategy in ExportGate.swift.
Free plan & monetization
- Free users can keep
freeLibraryLimitphotos in the library (deleting doesn't give the slot back). - Saving, sharing or exporting a photo requires watching one rewarded ad per photo, or Pro.
- Pro removes ads and limits, unlocks Enhance Studio and larger batches.
- Ad frequency rules (interstitials, app-open ads) are in
Services/Ads/AdFrequencyGate.swift.
Languages
Texts are in String Catalogs: Localizable.xcstrings (app) and InfoPlist.xcstrings (permission messages). Open them in Xcode to edit translations or add a language (+ button at the bottom of the catalog). The in-app language picker is in Settings › Language.
Publish to the App Store
- Finish configuration and rebranding.
- Create your app in App Store Connect with your bundle ID.
- Create the in-app purchases and the subscription group.
- Fill in App Privacy: if you keep AdMob, declare the data Google collects for advertising (device ID if tracking is allowed, coarse location, usage and diagnostics). Photos are processed on the device and not collected.
- Write your own description, keywords and screenshots.
- In Xcode: Product › Archive, then Distribute App › App Store Connect.
- Test the Colorize download and purchases with TestFlight, then submit for review.
In your App Review notes, explain that Colorize downloads its on-device model (about 240 MB) the first time, and how the free plan and Pro work. It speeds up review.
Project structure
OldPix/
├─ AppConfig.swift ← your settings
├─ OldPixApp.swift app entry
├─ App/ tab view, navigation state
├─ Models/ SwiftData models, paywall plans
├─ ViewModels/ scan flow, batch, enhance, library
├─ Services/ camera, detection, restore, colorize, storage, StoreKit
│ └─ Ads/ AdMob managers, consent, frequency rules
├─ Views/ Scan, Library, Albums, Enhance, Export, Paywall, Onboarding, Settings
├─ Utilities/ theme, constants, logging, helpers
├─ Configuration/ Products.storekit (local purchase testing)
├─ Assets.xcassets icon, accent colour, demo images
├─ ColorizeModel.xcassets Colorize Core ML model (On-Demand Resource)
├─ Localizable.xcstrings 12 languages
└─ InfoPlist.xcstrings permission messages in 12 languages
scripts/fetch-colorize-model.sh
FAQ & troubleshooting
The paywall shows "Unavailable" prices
Run from Xcode (⌘R) so the StoreKit configuration file is used, and make sure the product IDs in Products.storekit match AppConfig.Products. On TestFlight and the App Store, prices come from App Store Connect; products must be "Ready to Submit" or approved.
Colorize says the model is missing
Run ./scripts/fetch-colorize-model.sh, then clean the build folder (⇧⌘K) and run again.
No ads appear
New AdMob apps and ad units can take a few hours to serve. In debug builds you should always see test ads; check the Xcode console for messages starting with "Ads:".
Can I remove the Colorize feature?
Yes. Remove the Colorize buttons in PhotoDetailView and ProcessingPreviewView, and delete ColorizeModel.xcassets.
Credits & licences
- DDColor colorization model — Apache License 2.0 (see
LICENSES/DDColor-LICENSE.txt). Core ML conversion: mlboydaisuke/DDColor-Tiny-CoreML. Keep the attribution if you ship Colorize. - Google Mobile Ads SDK and User Messaging Platform — distributed by Google under their own terms, fetched by Swift Package Manager.
- App icon — created for this template; you may use it, but your app should have its own icon.
- Demo photos (
Memory…Aged) — AI-generated with Google Flow (Nano Banana) for this template. The people in them are not real. TheMemory…Restoredversions are the same images after the app's own Restore. Included for demonstration; replace them with images you have the right to use before you publish. - System fonts (SF Pro, New York) — provided by Apple on iOS.
Support
For questions about the item, please use the Comments or Support tab on the item's CodeCanyon page. Support covers questions about the included features and bug fixes; it doesn't cover custom changes or publishing your app for you.