Cloud signing: Validation failed (409) Invalid Signature. Code failed to satisfy specified code requirement(s)

I'm attempting to use Cloud Signing to export the Release version of 3 different apps for App Store, as described in https://developer.apple.com/videos/play/wwdc2021/10204/

The process completes successfully, and appears to be signed correctly, with a newly-created certificate in the developer portal of type "Distribution Managed".

When I upload to App Store Connect however, I see the following error for several third-party Swift packages, distributed as frameworks:

Validation failed (409) Invalid Signature. Code failed to satisfy specified code requirement(s). The file at path “MyApp.app/Frameworks/MyFramework.framework/MyFramework” is not properly signed. Make sure you have signed your application with a distribution certificate, not an ad hoc certificate or a development certificate. Verify that the code signing settings in Xcode are correct at the target level (which override any values at the project level). Additionally, make sure the bundle you are uploading was built using a Release target in Xcode, not a Simulator target. If you are certain your code signing settings are correct, choose “Clean All” in Xcode, delete the “build” directory in the Finder, and rebuild your release target. For more information, please consult https://developer.apple.com/support/code-signing.

If I have a manually created Distribution certificate installed in the keychain at the point of export, the same archive is signed with that certificate, and is accepted by App Store Connect without issue.

The xcodebuild command I am using (roughly):

        xcodebuild -exportArchive \
          -archivePath "$ARCHIVE_PATH" \
          -exportPath "$EXPORT_PATH" \
          -exportOptionsPlist "$EXPORT_OPTIONS" \
          -authenticationKeyPath "$API_KEY" \
          -authenticationKeyID "$API_KEY_ID" \
          -authenticationKeyIssuerID "$API_KEY_ISSUER" \
          -allowProvisioningUpdates

The plist:

        <?xml version="1.0" encoding="UTF-8"?>
        <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "<http://www.apple.com/DTDs/PropertyList-1.0.dtd>">
        <plist version="1.0">
        <dict>
          <key>method</key>
          <string>app-store-connect</string>
          <key>teamID</key>
          <string>$TEAM</string>
          <key>uploadSymbols</key>
          <true/>
          <key>signingStyle</key>
          <string>automatic</string>
        </dict>
        </plist>

Is what I’m trying to do supported? Is this a bug?

Cloud signing: Validation failed (409) Invalid Signature. Code failed to satisfy specified code requirement(s)
 
 
Q