My first experience building an iOS App
My First iOS App: A Dual Stopwatch for My Daughters ⏱👧👧
For a while, I wanted a simple way to track my two daughters’ exercise times. I couldn’t find an ad-free app that did exactly what I needed:
✔ Two independent stopwatches
✔ On the same screen
✔ Start/pause/reset separately
So I decided to use this opportunity to create my very first iOS app.
💡 Concept
The idea was small but meaningful: two colorful timers for two amazing girls.
I named it KidsStopwatch, and built it using SwiftUI.
🛠 Development Setup
I started with: MacBook + macOS, Xcode 26, SwiftUI, and a Personal Team (free Apple Developer Account).
The UI is simple: two large timers (one per kid), start/pause buttons, and a reset button.
😅 The Journey — Debugging Code Signing
Building the app was straightforward with the help of ChatGPT. Deploying to the iOS Simulator was a breeze 🚀
However, deploying to my real iPhone was not 😂.
I connected my iPhone, pressed ▶️ to install… and everything broke 😅
💥 The Error That Started It All
Xcode repeatedly showed:
Command CodeSign failed with a nonzero exit code
errSecInternalComponent
🚫 No app installation
🚫 No “Trust this developer” section in iPhone settings
🚫 Couldn’t register device in Personal Team
🚫 Couldn’t manually manage certificates
This error is notoriously vague — could mean keychain issues, missing profiles, developer permissions… anything.
🔍 Complete Debugging Timeline
Here’s every step I tried — many are required if you have a fresh free developer setup.
1️⃣ Enable Developer Mode on iPhone
Settings → Privacy & Security → Developer Mode
Restart iPhone and turn Developer Mode ON
2️⃣ Reset iPhone Developer Trust State
Settings → General → Transfer or Reset iPhone
→ Reset → Reset Location & Privacy
Reconnect → Tap Trust This Computer
3️⃣ Reset Signing Artifacts
Remove stale profiles and build data:
rm -rf ~/Library/MobileDevice/Provisioning\ Profiles/*
rm -rf ~/Library/Developer/Xcode/DerivedData/*
4️⃣ Fix macOS Developer Services (THIS STEP WAS CRITICAL)
This finally resolved the CodeSign internal failures:
sudo DevToolsSecurity --enable
sudo /usr/sbin/DevToolsSecurity -enable
sudo security authorizationdb write system.privilege.taskport allow
sudo killall -9 trustd
✔ Re-enabled macOS developer authentication
✔ Reset trust agent for signing identity access
(This was the turning point!)
5️⃣ Recreate Certificates in Xcode
In Xcode:
Xcode → Settings → Accounts → Manage Certificates…
Delete anything broken → then click:
+ → Apple Development
A working signing identity appears 🎉
6️⃣ Toggle Project Signing
TARGET → Signing & Capabilities:
✔ Automatically manage signing
Team: Yang Feng (Personal Team)
Bundle ID: com.yangfeng.ksw3 (must be unique)
This generates a fresh provisioning profile.
7️⃣ Pair Device Properly
Window → Devices and Simulators
Make sure:
- Device is shown as Paired
- macOS Keychain pop‑ups → Always Allow
8️⃣ Press ▶️ and Watch the Prompts
You’ll see:
| Prompt | Action |
|---|---|
| “Enable Developer Mode?” | Tap Enable |
| iPhone restarts | Turn Developer Mode ON again |
| “Allow this Mac to run apps?” | Tap Allow |
| “Untrusted Developer” appears | Go trust certificate |
Trust here:
Settings → General → VPN & Device Management → Developer App → Trust
🚀 SUCCESS!!
🎉 The KidsStopwatch app launched.
Key takeaways:
✨ Xcode + SwiftUI are friendly starting points
😤 Code signing can be painful on a fresh Personal Team setup
💡 Resetting macOS developer services and recreating certificates was the turning point
💪 Persistence (and clear prompts) pay off
I proudly watched my own app running on my own phone for the first time.
My daughters were even more excited than I was 😄
Thanks for reading — and feel free to reach out if you’re also building your first iOS app!
Enjoy Reading This Article?
Here are some more articles you might like to read next: