To switch from automatic to manual code signing, you need to change the following setting in the project file ([project name].xcodeproj/project.pbxproj).
Change "ProvisioningStyle = Automatic" to "ProvisioningStyle = Manual"
By default "ProvisioningStyle = Automatic" is not in the project.pbxproj. You just need to uncheck and check "Automatically manage signing" in app Target -> General in Xcode to add that setting.
Now in Jekins, you want to add this shell script before you run the Xcode build command to change "ProvisioningStyle = Automatic" to "ProvisioningStyle = Manual"
sed -i '' 's/ProvisioningStyle = Automatic;/ProvisioningStyle = Manual;/' [project name].xcodeproj/project.pbxproj
You can then use xcodebuild argument "PROVISIONING_PROFILE=xxxx-xxxx-xxxx" to use the provision profile you want.