Xcode Automatic Signing Uses Previous Provisioning Profile After Updating xcconfig
in Fastlane
I have a common SwiftUI codebase that supports multiple apps, and I’m automating the app release process using Fastlane
. My project has a single target, and I manage app-specific configurations using the Configuration.xcconfig
file.
Problem
To apply the correct settings before building, I run a pre-build script that modifies the Configuration.xcconfig
file. The build archives correctly, but I’m facing an issue with Xcode’s automatic signing.
Even after updating the configuration file, Xcode still uses the provisioning profile from the previous configuration instead of the updated one.
Pre-Build Script I have added the following script both in Fastlane's Fastfile and in Xcode Build Phases:
#!/bin/bash
echo "