Search code examples
iosfluttercodemagic

Flutter - Codemagic - iOS Code signing issues with Custom scheme


My iOS builds are failing on CodeMagic after implementing Flavors. Here is the major error I can see in xcodebuild.log

Runner has conflicting provisioning settings. Runner is automatically signed for development, but a conflicting code signing identity iPhone Distribution has been manually specified. Set the code signing identity value to "iPhone Developer" in the build settings editor, or switch to manual signing in the project editor.

I did changed Code signing identity to iOS Developer as many stackoverflow questions lead to, but didn’t help.

First line in XCodebuild.log from failed build artifacts in CodeMagic has Runner scheme instead of my custom scheme uat.

From XCodebuild.log - /Applications/Xcode-10.3.app/Contents/Developer/usr/bin/xcodebuild -workspace /Users/builder/clone/ios/Runner.xcworkspace -scheme Runner -archivePath /Users/builder/build.xcarchive -config Release archive DEVELOPMENT_TEAM=xxxxx CODE_SIGN_IDENTITY='iPhone Distribution'


Solution

  • With the help of CodeMagic team I was able to figure out that FCI_FLUTTER_SCHEME environment variable should be configured in CI Job to the custom scheme. For me it's uat.

    Reference - https://docs.codemagic.io/troubleshooting/common-ios-issues/