I hit what looks like the same problem @rustam_g and @ptsochantaris had. I was able to find a sequence that gave me separate products, each linked to the right app.
My setup:
one app target, let's call it TestApp.
3 build configurations (Dev, Staging, Prod) driven by xcconfig.
The Prod scheme builds com.example.test and the Staging scheme builds com.example.test-staging.
Each bundle ID has its own app record in App Store Connect.
The problem:
Creating the first product worked fine. But once the first product existed, picking the second app in Create Workflow just added a workflow to the existing product. It never showed the “Confirm Existing App” screen for the second bundle ID. All suggested workarounds had no effect - changing schemes, restarting Xcode, etc.
xcodebuild -describeAllArchivableProducts -json listed both bundle IDs, but with the same identifier and displayName. The displayName is the target name, and the product was named after the target (TestApp in this case).
What worked:
Delete the existing product on the Xcode Cloud page in App Store Connect (Settings/Delete Xcode Cloud Data).
Remove xcshareddata/xcodecloud/manifest.json from the project and from the default branch.
Quit Xcode, then clear ~/Library/Developer/Xcode/DerivedData and ~/Library/Developer/Xcode/UserData/XcodeCloud.
First product. Rename the target to the name you want for the first product, in this example TestApp->Test.
In the Cloud navigator, click Get Started, pick the product, confirm the existing app and bundle ID in ASC and finish. Skip the first build.
Quit Xcode, clear the same two directories as in step 3, and reopen the project (not sure if this was needed).
Second product. Rename the target again, in this example Test (left after the first rename)->Test Staging. Choose Create Workflow and pick the corresponding entry. This time Xcode did show “Confirm Existing App” screen with the staging bundle ID. Finish, and skip the build.
Rename the target back to its original name, TestApp.
At this stage I had both products appear in the Cloud navigator, each with its own workflow, and App Store Connect showed each one linked to the right app.
Commit the generated manifest.json, which now lists both products, and let the first builds run. Workflows refer to schemes by name, so builds work with the original target name.
Hope it helps.
Topic:
Developer Tools & Services
SubTopic:
Xcode Cloud
Tags: