21.7 C
Canberra
Tuesday, October 21, 2025

Xcode construct fails with return code 65 throughout Azure DevOps pipeline archive step (Swift undertaking with submodules)


I’m attempting to construct and archive an iOS undertaking in an Azure DevOps pipeline, however the construct retains failing with return code 65 when operating the Xcode@5 activity.

The undertaking construction:

  • Root repo accommodates CI/CD config (azure-pipelines.yml)
  • iOS undertaking (Core.xcworkspace) is a Swift native app that makes use of submodules
  • CocoaPods are used for dependency administration

Right here’s the related error snippet from the pipeline logs:

** ARCHIVE FAILED **

The next construct instructions failed:
    Archiving workspace NexoCore with scheme NexoCore
(1 failure)

##[error]Error: /usr/bin/xcodebuild failed with return code: 65

My pipeline YAML (related elements):

jobs:
  - job: ios
    pool:
      vmImage: 'macOS-latest'
    variables:
      configuration: "Launch"
      sdk: "iphoneos"
      scheme: "Core"
      system.debug: true
      derivedData: "DerivedData"
      outputDir: "$(construct.artifactStagingDirectory)"

    steps:
      - checkout: self
        submodules: recursive

      - script: |
          gem set up cocoapods --no-document
          pod set up --repo-update
        displayName: "Set up CocoaPods"

      - activity: InstallAppleCertificate@2
        inputs:
          certSecureFile: 'AppCetificate.p12'
          certPwd: $(appCertificatePassword)
          keychain: 'temp'
          deleteCert: true

      - activity: InstallAppleProvisioningProfile@1
        inputs:
          provProfileSecureFile: 'IOSProvisioningProfile.mobileprovision'
          removeProfile: true

      - activity: Xcode@5
        inputs:
          actions: 'clear archive'
          configuration: '$(configuration)'
          sdk: '$(sdk)'
          xcWorkspacePath: 'Core.xcworkspace'
          scheme: '$(scheme)'
          xcodeVersion: 'specifyPath'
          xcodeDeveloperDir: '/Functions/Xcode_16.4.app'
          packageApp: true
          signingOption: 'guide'
          signingIdentity: '$(APPLE_CERTIFICATE_SIGNING_IDENTITY)'
          provisioningProfileUuid: '$(APPLE_PROV_PROFILE_UUID)'
          args: '-derivedDataPath $(derivedData) -destination "generic/platform=iOS"'

What I’ve tried:

  • Verified the provisioning profile and certificates are uploaded appropriately in DevOps
  • Confirmed that submodules are checked out (submodules: recursive)
  • Ran pod set up with –repo-update to verify Pods are updated
  • Explicitly set Xcode model (/Functions/Xcode_16.4.app)
  • Used -destination "generic/platform=iOS"

Nonetheless, the archive step fails with code 65.

Xcode construct fails with return code 65 throughout Azure DevOps pipeline archive step (Swift undertaking with submodules)

I put in CocoaPods with pod set up –repo-update, checked out submodules, and arrange signing utilizing certificates + provisioning profile duties. I anticipated the Xcode@5 activity to archive the workspace and generate an .ipa file, however as a substitute it fails with xcodebuild return code 65 in the course of the archive step.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

[td_block_social_counter facebook="tagdiv" twitter="tagdivofficial" youtube="tagdiv" style="style8 td-social-boxed td-social-font-icons" tdc_css="eyJhbGwiOnsibWFyZ2luLWJvdHRvbSI6IjM4IiwiZGlzcGxheSI6IiJ9LCJwb3J0cmFpdCI6eyJtYXJnaW4tYm90dG9tIjoiMzAiLCJkaXNwbGF5IjoiIn0sInBvcnRyYWl0X21heF93aWR0aCI6MTAxOCwicG9ydHJhaXRfbWluX3dpZHRoIjo3Njh9" custom_title="Stay Connected" block_template_id="td_block_template_8" f_header_font_family="712" f_header_font_transform="uppercase" f_header_font_weight="500" f_header_font_size="17" border_color="#dd3333"]
- Advertisement -spot_img

Latest Articles