XCode overwrites watch companion's Info.plist with invalid data

Hi developers. I've been working on a Watch companion app for my product these past few days, and I'm currently trying to push it to TestFlight.

I get stuck at the validation step with endless errors. The first one typically is missing WKApplication in Info.plist. That's fine, I'll add the field in Watch target > Info. Now more errors appear:

  • Invalid UIDeviceFamily value of '1' and '2'
  • Unsupported key UIRequiredDeviceCapabilities
  • DTPlatformName value invalid
  • Missing architecture, the bundle must contain arm64_32 because it's built with watchOS SDK 5+

I never set these values in the Info tab, so my guess is they're being overwritten by the Runner Build Settings, even though watch target build settings are correct (for example, Targeted Device Family is set to Apple Watch).

What I've tried so far:

  • Disabling auto generation of the Info.plist, and manually setting UIDeviceFamily to '4', but that doesn't help, unless I do it after creating the archive by editing the archive files and resending it to validation. I also tried a bunch of other post-build modifications to try and fix all the errors but new ones kept popping up.
  • Cleaning Build Folder and DerivedData, restarting XCode, rebooting the computer... no effect, which is expected given that the building process doesn't return any errors
  • Validating just the app without the apple watch (so from my main branch), still works as expected.
  • Recreating a blank watchOS target and trying to validate just that, I get stuck in the same way.

Project details:

  • XCode Version 16.3 (16E140)
  • Flutter 3.27.3
  • Targeting latest watchOS and iOS 16+

Do you have an idea what could be the problem here ? I'm sure it's just a missing or invalid property in some configuration file, but I can't figure it out and there are no resources online documenting the issue, and no "tutorials" on how to properly set up a watch target from Apple. Thank you for your time. A.H.

XCode overwrites watch companion's Info.plist with invalid data
 
 
Q