I am working on an Enterprise IOS application to be run on Xcode Jenkins server. I have a code in Git repository. I installed Xcode 9.2 and Jenkins 2.100. I am using a script to automate the build .key chains are placed in login keychains path. provision profile placed in ~/library../../../Mobile Devices../ Path.
The following commands used in Jenkins Execute shell in the build phase.
/usr/bin/xcodebuild -workspace "PhoenixiOS.xcworkspace" -scheme "PhoenixiOS" -archivePath build/PhoenixiOS -configuration Debug archive
/usr/bin/xcodebuild -exportArchive -archivePath "build/PhoenixiOS.xcarchive" -exportPath "build/PhoenixiOS.ipa" -exportOptionsPlist "Build/PhoenixiOS.xcarchive/Info.plist"
/usr/local/bin/aws s3 cp ${WORKSPACE}/Build/PhoenixiOS.ipa/PhoenixiOS.ipa s3://Buckername/$BUILD_ID/
After execution, i was getting the error below error
/Users/Shared/Jenkins/Home/workspace/Phoenix_ios_CI/Build/Intermediates.noindex/ArchiveIntermediates/PhoenixiOS/IntermediateBuildFilesPath/PhoenixiOS.build/Release-iphoneos/PhoenixiOS.build/Objects-normal/arm64/PhoenixiOS.swiftmodule -emit-objc-header-path /Users/Shared/Jenkins/Home/workspace/Phoenix_ios_CI/Build/Intermediates.noindex/ArchiveIntermediates/PhoenixiOS/IntermediateBuildFilesPath/PhoenixiOS.build/Release-iphoneos/PhoenixiOS.build/Objects-normal/arm64/PhoenixiOS-Swift.h -emit-dependencies-path /Users/Shared/Jenkins/Home/workspace/Phoenix_ios_CI/Build/Intermediates.noindex/ArchiveIntermediates/PhoenixiOS/IntermediateBuildFilesPath/PhoenixiOS.build/Release-iphoneos/PhoenixiOS.build/Objects-normal/arm64/DBLog+CustomMethods.d -num-threads 4 -output-filelist /var/folders/jc/fl1lw1754rvd8568qp_wcf5w00008b/T/outputs-6885dd
** ARCHIVE FAILED ** The following build commands failed: CompileSwift normal armv7 CompileSwiftSources normal armv7 com.apple.xcode.tools.swift.compiler (2 failures)
Please help me out. I was getting the error on Jenkins. But when I cloned the same repo into local workspace(Ex: documents folder ) when I run the same shell commands the output was **ARCHIVE GETTING SUCCED**
Any suggestions will be greatly helpful. Really need some urgent help.