I am facing a issue while generating build using command line script in Xcode 14, the same script is working with Xcode 13.
the function to archive is
function buildArchieve {
BUILD_FILES="$BUILD_DIR/${ASSET_BASENAME}"
mkdir -p "$BUILD_FILES"
# archieve the build
ARCHIEVE_PATH="$BUILD_DIR/${ASSET_BASENAME}/$EXPORT_METHOD/${PRODUCT_NAME}.xcarchive"
(xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -configuration "$CONFIGURATION" -destination 'generic/platform=iOS' -archivePath "$ARCHIEVE_PATH" clean archive 1> /dev/null ||
xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -configuration "$CONFIGURATION" -destination 'generic/platform=iOS' -archivePath "$ARCHIEVE_PATH" clean archive ||
failed "XCode failed to build app")
# export archieve
EXPORT_PATH="$BUILD_DIR/${ASSET_BASENAME}/$EXPORT_METHOD"
xcodebuild -exportArchive -archivePath "$ARCHIEVE_PATH" -exportPath "$EXPORT_PATH" -exportOptionsPlist "$EXPORT_PLIST_FILE" 1> /dev/null
# Extacting DSYM file
if [ "$METHOD" == "app-store" ]; then
DYSM_FILE="${EXPORT_PATH}/${PRODUCT_NAME}.xcarchive/dSYMs/WhiteLabel.app.dSYM"
ditto -c -k --norsrc "$DYSM_FILE" "${BUILD_FILES}/${PRODUCT_NAME}_${bvers}.dSYM.zip"
fi
# removing archieve file
rm -rf "$ARCHIEVE_PATH"
}
and I am getting following on the Jenkins console
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace BroughSuperior.xcworkspace -scheme BroughSuperior -configuration Release -destination generic/platform=iOS -archivePath "administrator/testing-app5_ios_2023-05-05-10:10:33/enterprise/testing-app5.xcarchive" clean archive User defaults from command line: IDEArchivePathOverride = /Users/administrator/.jenkins/jobs/iOS Bruff dev/workspace/BroughSuperior/administrator/testing-app5_ios_2023-05-05-10:10:33/enterprise/testing-app5.xcarchive IDEPackageSupportUseBuiltinSCM = YES`
I can not use Xcode 13 now, since apple has stopped taking builds from Xcode 13. And the same command works in Xcode 13.
Archive_output.txt file
Command line invocation: /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace BroughSuperior.xcworkspace -scheme BroughSuperior -configuration Release -destination generic/platform=iOS -archivePath clean archive
User defaults from command line: IDEPackageSupportUseBuiltinSCM = YES
Resolve Package Graph
Resolved source packages: Facebook: https://github.com/facebook/facebook-ios-sdk.git @ 13.0.0 Bugsnag: https://github.com/bugsnag/bugsnag-cocoa @ 6.2.0
** CLEAN SUCCEEDED **
Prepare packages
Computing target dependency graph and provisioning inputs
Create build description Build description signature: d6adcbd478de817a50f1882539a78d15 Build description path: /Users/administrator/Library/Developer/Xcode/DerivedData/BroughSuperior-gmieqdexltbrbsesvhrtzpgzfdig/Build/Intermediates.noindex/ArchiveIntermediates/BroughSuperior/IntermediateBuildFilesPath/XCBuildData/d6adcbd478de817a50f1882539a78d15-desc.xcbuild
note: Building targets in dependency order warning: Run script build phase 'Build Helper Script' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'WhiteLabel' from project 'BroughSuperior') note: Run script build phase 'Copy MIBKit Resource Bundle' will be run during every build because the option to run the script phase "Based on dependency analysis" is unchecked. (in target 'WhiteLabel' from project 'BroughSuperior') warning: Run script build phase 'Bugsnag' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'WhiteLabel' from project 'BroughSuperior') /Users/administrator/.jenkins/jobs/iOS Bruff dev/workspace/MIBKit/MIBKit.xcodeproj: error: No signing certificate "iOS Development" found: No "iOS Development" signing certificate matching team ID "HHGY6CWBZB" with a private key was found. (in target 'MIBKitResources' from project 'MIBKit') ** ARCHIVE FAILED **