Search code examples
iosxcodexcodebuildcodesign

Building project using Xcodebuild succeeds but no XArchive file output


I am trying to make sure that xcodebuild command and archiving is working properly before I start integrating it into my CI.

I am trying:

xcodebuild -project myproject.xcodeproj -scheme scheme -configuration debug clean archive -archivePath /Users/username/Desktop/ DEVELOPMENT_TEAM=Dev_Team_Id

and at the end of the output text, it states:

CodeSign /Users/username/Library/Developer/Xcode/DerivedData/appName-crjnvfmiardnqxehnyeexizqofsv/Build/Intermediates/ArchiveIntermediates/appName/InstallationBuildProductsLocation/Applications/appName-ios.app
    cd /Users/username/Documents/Development/appName-iOS
    export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"

Signing Identity:     "iPhone Developer: xxxx"
Provisioning Profile: "xxxx Prov Profile"
                      (xxxx)

    /usr/bin/codesign --force --sign 194C5B1B166CDFB65B71CC1F20E1BAE1D9FA41F9 --entitlements /Users/username/Library/Developer/Xcode/DerivedData/appName-crjnvfmiardnqxehnyeexizqofsv/Build/Intermediates/ArchiveIntermediates/appName/IntermediateBuildFilesPath/appName.build/Release-iphoneos/appName.build/appName-ios.app.xcent --timestamp=none /Users/username/Library/Developer/Xcode/DerivedData/appName-crjnvfmiardnqxehnyeexizqofsv/Build/Intermediates/ArchiveIntermediates/appName/InstallationBuildProductsLocation/Applications/appName-ios.app

Validate /Users/username/Library/Developer/Xcode/DerivedData/appName-crjnvfmiardnqxehnyeexizqofsv/Build/Intermediates/ArchiveIntermediates/appName/InstallationBuildProductsLocation/Applications/appName-ios.app
    cd /Users/username/Documents/Development/appName-iOS
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    export PRODUCT_TYPE=com.apple.product-type.application
    builtin-validationUtility /Users/username/Library/Developer/Xcode/DerivedData/appName-crjnvfmiardnqxehnyeexizqofsv/Build/Intermediates/ArchiveIntermediates/appName/InstallationBuildProductsLocation/Applications/appName-ios.app -validate-for-store

Touch /Users/username/Library/Developer/Xcode/DerivedData/appName-crjnvfmiardnqxehnyeexizqofsv/Build/Intermediates/ArchiveIntermediates/appName/BuildProductsPath/Release-iphoneos/appName-ios.app.dSYM
    cd /Users/username/Documents/Development/appName-iOS
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /usr/bin/touch -c /Users/username/Library/Developer/Xcode/DerivedData/appName-crjnvfmiardnqxehnyeexizqofsv/Build/Intermediates/ArchiveIntermediates/appName/BuildProductsPath/Release-iphoneos/appName-ios.app.dSYM

** ARCHIVE SUCCEEDED **

but there is no xarchive file to see in the directory I specified. What am I doing wrong here?


Solution

  • Just try by giving the archive file name.

    xcodebuild -project myproject.xcodeproj -scheme scheme -configuration debug clean archive -archivePath /Users/username/Desktop/myproject.xcarchive DEVELOPMENT_TEAM=Dev_Team_Id