How to care for finished swift items

Priya built a small recipe timer in Swift last winter. It passed her final test, went onto her iPhone, and then sat untouched for six months. When a friend asked to see it, Xcode opened with a red banner: the provisioning profile had expired, one package had moved two major versions, and the app no longer matched the current iOS simulator. The code was fine. The care routine was missing.

A finished Swift project is not a jar on a shelf. It depends on an Xcode version, a Swift language version, an iOS deployment target, signing certificates, and often a few Swift packages. Caring for it means keeping those parts from quietly drifting apart. Here is the routine Priya now uses for her timer, and the one you can copy for your first finished app.

Put the finished Xcode project under version control first

Before changing anything, make a baseline. Open Terminal in the project folder and confirm Git is tracking the files you care about: git status. If the project is not a repository yet, run git init, add a .gitignore that excludes DerivedData/, *.xcuserstate, and xcuserdata/, then commit. Tag the exact build that worked: git tag v1.0. Push to a private remote if you have one.

This is not housekeeping for its own sake. When you update a Swift package or raise the deployment target, the tag gives you a clean place to return. Priya’s mistake was updating three things at once with no saved baseline. One commit per change — “update package,” “raise deployment target,” “renew profile” — makes a broken build easy to undo.

Write a one-page care note inside the project

Add a README.md beside the .xcodeproj file. Keep it short and factual: the Xcode version used (for example, Xcode 16.2), the Swift version shown under Build Settings, the iOS deployment target (say iOS 17.0), the bundle identifier, the Apple Developer team name, and the command that runs the tests. List any Swift packages and why each one is there.

This note matters because “finished” projects are often reopened after months. Priya could not remember whether her timer used iOS 16 or 17 as its minimum, or whether a package was for date formatting or haptics. A one-page note answered both in under a minute. Update the note whenever you change one of those facts; a stale note is worse than no note.

Freeze the toolchain that built the app

Xcode updates can change compiler behavior and simulator availability. Record the version in Xcode > About Xcode, and avoid opening the project in a newer major Xcode release without a branch. If you must move from Xcode 15.x to 16.x, create a Git branch, open the project, let Xcode update the project format if it asks, then build and run the test suite. Commit only if the app still launches and the tests pass.

For a beginner app, a reasonable target is one major Xcode version behind the newest, not the newest on day one. Priya now keeps her timer on Xcode 16.2 with the iOS 18 SDK, but leaves the deployment target at iOS 17.0 so her older iPhone can still run it. That combination is a care decision, not a coding decision, and it belongs in the README.

Refresh Swift packages on a schedule, not on a whim

If the project uses Swift Package Manager, open the Package Dependencies section and look at the version rules. Prefer “Up to Next Major” for stable packages, and commit Package.resolved so the exact resolved versions travel with the code. Once a quarter, use File > Packages > Update to Latest Package Versions, or run swift package update from the package directory. Build immediately afterward.

Do one package at a time. Priya updated a networking helper and a charting package together; the chart package changed an initializer, the networking helper masked the error, and she spent an evening chasing the wrong file. If a package has not been updated in two years and the app works, leave it alone until a security or OS-compatibility note gives you a reason to move. Care is not the same as constant upgrading.

Re-sign and re-profile before Apple’s dates catch you

A finished app that runs on your Mac can still fail on a device because code signing expired. Check Xcode > Settings > Accounts > Manage Certificates once every few months. Apple Development and Apple Distribution certificates are generally valid for about a year; provisioning profiles also expire. If you distribute through the App Store, the Apple Developer Program costs $99 per year in the US, and lapsed membership blocks new builds.

Priya’s red banner was a profile that had expired while the app sat idle. The fix was to sign in to her Apple Developer account in Xcode, let Xcode create a fresh profile, and build again to a physical iPhone. Do not email certificates or profiles around; keep them in Xcode’s account system. If your app handles payments, health data, or children’s data, get professional advice on Apple’s current requirements rather than guessing from an old tutorial.

Test the finished app against each new iOS release

Every September, Apple ships a new major iOS version. Treat that as a maintenance alarm. Download the new simulator, run the app, and then run it on at least one physical device. Check the screens you actually use: the timer start button, the notification permission prompt, the settings screen, and any text that might wrap on a smaller iPhone. Run your tests with a concrete command, such as xcodebuild test -scheme PantryTimer -destination 'platform=iOS Simulator,name=iPhone 16'.

If the app is on TestFlight, remember that TestFlight builds expire after 90 days. Upload a fresh build before the expiration date if you still need testers. Priya now puts a calendar reminder for the first week of October: open the project, build to simulator, build to iPhone, and note any yellow deprecation warnings. She does not fix every warning, but she reads them.

Archive one clean release copy and store it twice

When the app is in a good state, choose Product > Archive in Xcode. In Organizer, keep the .xcarchive and export a copy of the release build. Store one copy on an external drive and one in encrypted cloud storage. Label the folder with the date, version number, and Xcode version — for example, PantryTimer-1.0-2025-03-14-Xcode16.2. Keep the matching Git tag name in the README.

This archive is your fallback if a future Xcode update breaks the project or a package disappears. It is also the honest record of what you shipped. Priya keeps two archives: the first working build and the current App Store build. When she changed her timer’s notification sound, she could compare the old archive with the new one instead of trying to remember what changed.

Run a 30-minute monthly care loop

Once a month, set a timer for 30 minutes and do only this: open the project, build it, run the test command, check for expired signing certificates, and look at open Git changes. If a Swift package has a security notice, update that one package and retest. If nothing needs attention, stop. The point is not to keep coding; it is to catch drift while the fix is still small.

Priya’s timer now opens cleanly because the care is boring and scheduled. A finished Swift item stays finished when you protect its baseline, record its toolchain, renew its signing, test it on the new iOS, and keep one archive you can return to.