We have a problem with undesirable rebuild with Debug configuration for watchOS target dependencies.
There is a iOS project with watch extension target. Both have some SPM package dependency.
Build Active Architecture Only
for Debug is Yes for both app/extension targets.
When build app, watch target is building not only for active arch(arm64) but also i386/x86_64.
It can be fixed by adding Excluded Architectures
= i386 x86_64
for watch target.
But it don't help to avoid rebuild SPM package dependency for this architectures.
This can happen when no platforms are specified in the package manifest. Without the platform array in the package manifest, the package is built to support the widest deployment range that Xcode supports for that platform. Xcode 16 still supports watchOS 4 as a deployment target. So while it's no longer possible to run watchOS 4 in a simulator (see the Xcode Support page for the supported versions), Xcode still builds for the simulators that supported watchOS 4 in the past due to the deployment target still being supported, and some of these simulators used the i386
architecture. If you only support more recent watchOS deployment targets, you should specify that in the package manifest, and Xcode will then build the appropriate architecture mix for that more limited range of watchOS versions.
—Ed Ford, DTS Engineer