1 more way to try for those manual sign, in my case , I strictly aim for "Distribution" only, so what you can try here:
open your ../your-prj.xcodeproj/project.pbxproj using VSCODE (or any text/code editor).
manually search for following and forcefully change all of them to what you want , there will be multiple group of following (in my case , Debug-free and Release-free group)
however most likely all you need to care about is Release only, if you are trying to archive or *.ipa
search following and change them
CODE_SIGN_IDENTITY = "Apple Distribution";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Distribution";
...
...
PROVISIONING_PROFILE_SPECIFIER = dist-askt;
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = dist-askt;
dist-askt is the profile name I've created in developer.apple.com,
go back to XCODE, simply click around here and there to refresh ,
OR choose (read from DISK) if any warning prompted you the project have updated outside of XCODE
OR simply kill restart XCODE
Topic:
Code Signing
SubTopic:
Certificates, Identifiers & Profiles
Tags: