At 1:18 PM, a bug report arrived for Southbound. Southbound is my iOS app. It counts your Florida days for tax residency. A user flew to Illinois and used the app there without problems. The user came home to Florida. Now the app “won’t open at all.”
This was the first production incident. One user, a total crash, zero clues. It was a great start to the afternoon.
Midnight moves with the phone
The root cause was midnight. Southbound keys each day’s record with Calendar.startOfDay. That value depends on the time zone of the phone. Midnight is an opinion. Midnight in Florida is 4:00 UTC. Midnight in Illinois is 5:00 UTC. On a travel day, the exact-match lookup misses the record from the other time zone. The app then writes a second record for the same calendar day.
Two records, one crash
Two records, same day. The month view indexed those records with Swift’s Dictionary(uniqueKeysWithValues:). On a duplicate key, that function does not return nil. It does not throw. It crashes the full app.
One twist made the bug hard to hunt. In Central time, the two records land on different day numbers. There is no collision, so the app worked in Illinois. In Eastern time, the two records collide. The month view is on the first tab. So in Florida, the app crashed at every launch.
One detail annoyed me most. Two sibling methods in the same file already removed duplicate records per day. Someone solved this exact problem before. That someone was me. The month view was the one call site that I missed.
By 2:30, I had a minimal reproduction. It trapped with Fatal error: Duplicate values for key: '23'. I had a fix and a green regression test. Upload the patch, done by 3:00, correct?
Apple’s two tollbooths
No. Apple updated the developer license agreement at WWDC, and I never accepted it. The upload bounced. I accepted the agreement and uploaded again. Then App Review rejected the build for an invalid privacy manifest. I wrote NSPrivacyAccessedAPIReasons. Apple wants NSPrivacyAccessedAPITypeReasons.
That typo sat in the project since build 15. Nothing caught it, because build 15 never bundled the file. This was the first time Apple read the file. A passing App Review is not proof that your privacy manifest is valid.
I fixed the key, built again, and resubmitted at 4:22 PM with an expedited review request. Report to resubmission: three hours and four minutes. That time includes two of Apple’s tollbooths.
The calendar day has to survive the flight
Southbound has one job: remember which state a person was in on a given calendar day. I had let the phone’s current time zone redefine that day after travel. The duplicate record only exposed the mistake.
The repaired model stores one stable calendar identity and rejects duplicates before the launch screen can see them. The user who reported the bug did nothing unusual. They flew home. The app is the part that had to learn how a day survives the trip.