2.0.1 — Xcode 27 metadata bundle fix
Fixes carrier and timezone metadata lookup when the package is built with Xcode 27.
The bug
2.0.0 builds on Xcode 27, but Xcode 27's SwiftPM changed where it places
resource-bundle payloads:
Xcode 26: libPhoneNumber_…MetaData.bundle/TimeZonesMetaData.bundle/timezones.db
Xcode 27: libPhoneNumber_…MetaData.bundle/Contents/Resources/TimeZonesMetaData.bundle/timezones.db
The carrier and timezone mappers located their SQLite databases by appending
path components directly, so under Xcode 27 neither found its database. Both
then failed silently — no error, no crash:
timeZonesForNumber:returnedEtc/Unknown- carrier lookups returned
nil
Parsing, formatting, validation, geocoding, and short-number handling were
unaffected.
This was not a regression from 2.0.0 — the path assumption predates it, and
1.7.x has the same defect. It only became visible once Xcode 27 changed the
layout.
If you use libPhoneNumberTimeZones, libPhoneNumberCarrier, or their Swift
facades and build with Xcode 27, upgrade to 2.0.1. Everyone else is unaffected.
The fix
Contents/Resources is now searched alongside the bundle root, for both the
base URL and the SwiftPM wrapper bundle, so the payload resolves under either
layout. Two files, no API change, no behavior change on Xcode 26.
Validation
Same tree, clean scratch paths, both toolchains:
| Toolchain | Before | After |
|---|---|---|
| Xcode 27.0 (27A5209h) | 10 failures (5 carrier, 5 timezone) | 0 failures |
| Xcode 26.6 (17F113) | 0 failures | 0 failures, 231 tests |
All 10 previously failing tests were confirmed passing by name on Xcode 27, not
skipped.
Also on Xcode 26.6: swift build -c release, swift test (231 tests, 0
failures, also under LC_ALL=ko_KR.UTF-8), upstream test parity (173/181),
upstream API parity (66/93), version consistency, all 3 Xcode schemes, and
publishPodspecs.swift --lint across all 13 podspecs.
Correction to the 2.0.0 notes
The 2.0.0 release notes record the build toolchain as "Xcode 26.5" and state
that Xcode 27 was unavailable for verification. The toolchain was in fact
Xcode 26.6 (17F113) — 26.5 was the SDK version.
The 2.0.0 deployment-target fix has since been verified directly on Xcode 27:
the project builds, and forcing IPHONEOS_DEPLOYMENT_TARGET=12.0 reproduces
the exact error reported in #449.
Full changelog: 2.0.0...2.0.1