Invalid NSAccentColorName when uploading watch app using Xcode 12 beta for Testflight distribution

When attempting to upload to App Store Connect a watch app using Xcode 12 beta4, I get the following error:


Invalid Info.plist key. The key 'NSAccentColorName' in bundle xxxxiOS.app/Watch/xxxxwatchOS.app is invalid.


Originally, I did not have the NSAccentColorName key defined on the any plist. Even after adding the key on both the watch app and extension targets plist I get this error. This is the definition I used:
Code Block
<key>NSAccentColorName</key>
<string>AccentColor</string>


The documentation for NSAccentColorName does not explain what is valid, https://developer.apple.com/documentation/bundleresources/information_property_list/nsaccentcolorname


What would be a valid value for NSAccentColorName? From Xcode 12 onwards is this key mandatory?


I've found a solution to this issue.

Following from the newly added documentation, https://developer.apple.com/documentation/bundleresources/information_property_list/nsaccentcolorname 

While you can set this directly in your Info.plist, the recommended approach is to use the Global Accent Color Namebuild setting (in the Asset Catalog Compiler - Options section) of the target. Set the value of the build setting to the name of the Color Set in the asset catalog. Xcode automatically sets NSAccentColorName to the appropriate value in the Info.plist file when building your project. 
It looks like Xcode automatically adds the NSAccentColorName key to watchOS plist when building. To avoid this, I've unset the ASSETCATALOGCOMPILERGLOBALACCENTCOLORNAME on the Xcode build settings for my watch os related targets. Since I use xcconfig files, I set ASSETCATALOGCOMPILERGLOBALACCENTCOLORNAME = , i.e. empty, in my parent watchOS.xcconfig file.
Invalid NSAccentColorName when uploading watch app using Xcode 12 beta for Testflight distribution
 
 
Q