cli-tools
cli-tools copied to clipboard
xcode-project build-ipa CODE_SIGN_IDENTITY Xcode 14 Issue
xcode-project build-ipa
automatically adds a flag, 'CODE_SIGN_IDENTITY=iPhone Distribution'
, and this causes issues with SPM in Xcode 14. Please find more info in this Swift forums thread.
In our case, xcode-project build-ipa
created a command like this:
xcodebuild -workspace <workspace> -scheme <scheme> -config Release -archivePath <path> archive COMPILER_INDEX_STORE_ENABLE=NO DEVELOPMENT_TEAM=<dev team> 'CODE_SIGN_IDENTITY=iPhone Distribution'
and there is a resulting error:
/Users/builder/Library/Developer/Xcode/DerivedData/.../SourcePackages/checkouts/.../Package.swift: error: <package>_<library> has conflicting provisioning settings. <package>_<library> is automatically signed for development, but a conflicting code signing identity iPhone Distribution has been manually specified. Set the code signing identity value to "Apple Development" in the build settings editor, or switch to manual signing in the Signing & Capabilities editor. (in target '<package>_<library>' from project '<project>')
You can define arbitrary xcargs to xcodebuild archive by using --archive-xcargs and pass CODE_SIGN_STYLE in order to solve this error. As I cannot reproduce this issue, can you make a minimal open source version of your app where you can reproduce this error with Xcode 14, so we can debug it on our end as well ?
@cosmicvarion If you are still struggling with this issue, you can get it fixed by adding --archive-flags
to xcode-project build ipa
:
--archive-flags "-destination 'generic/platform=iOS' CODE_SIGNING_REQUIRED=YES CODE_SIGNING_ALLOWED=NO"
Please keep me updated about the result. Besides, please note that as your team is on the paid plan, you can get in touch with us directly using the chat widget in your Codemagic account. I just double checked it and it is enabled on the right bottom corner.
@icarusdust @cosmicvarion wasn't this resolved by #302?
it is resolved @priitlatt
@cosmicvarion The optional flag is not necessary, you can get rid of it or at least the CODE_SIGNING_REQUIRED=YES CODE_SIGNING_ALLOWED=NO
part.