Forum Discussion

alperalimoglu's avatar
alperalimoglu
Copper Contributor
Oct 24, 2024

[Question]: No profiles for 'xyz' were found: Xcode couldn't find any iOS App Development provision

### Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

### Operation system

MacOS

### QuestionI am trying to run a Azure Pipeline for `Task Name: Xcode@5`.

Xcode@5 fails to build an Xcode project couldn't find any iOS App Development provisioning profiles matching `profile_name`, resulting in a Code Signing Error with this format:

error: No profiles for 'com.ahe.aheline' were found: 
Xcode couldn't find any iOS App Development provisioning profiles matching 'com.ahe.aheline'. 
Automatic signing is disabled and unable to generate a profile. 
To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild. 
(in target 'AHELine.UI' from project 'AHELine.UI')

**Note that** I am able to run this locally on Xcode but it does not work on dev.azure.com, is not able to fetch matching profiles.

 

Our script:

 

trigger:
- none

pool:
  vmImage: 'macOS-14'

resources:
 repositories:
 - repository: AheLineIOS
   type: git
   name: AheLineIOS/AheLineIOS
   trigger:
     branches:
       include:
       - deneme
     paths:
       include:
       - AHELine.UI/*
       - AheLine.Robo/*
       - AHELine.Data/*
       - AHELine.Common/*
       - Pods/*
       exclude:
       - ExportOptions_prod.plist

steps:
- checkout: AheLineIOS
  clean: true

- task: PowerShell@2
  displayName: Select Xcode Version
  inputs:
    targetType: 'inline'
    script: |
      echo Mac OS version:
      sw_vers -productVersion
      echo Installed Xcode versions:
      ls /Applications | grep 'Xcode'
      echo currently selected xcode:
      xcrun xcode-select --print-path
      echo selecting latest xcode...
      sudo xcode-select -s /Applications/Xcode_15.0.1.app
      xcrun xcode-select --print-path
      echo Selected Xcode version:
      xcodebuild -version
      xcodebuild -downloadAllPlatforms  

- task: InstallAppleCertificate@2
  inputs:
    certSecureFile: 'Certificates2023.p12'
    certPwd: '$(provisioningProfilePassword2)'
    keychain: 'temp'

- task: InstallAppleProvisioningProfile@0
  inputs:
    provProfileSecureFile: 'AheMobilProd.mobileprovision'
    removeProfile: true
  
- task: Xcode@5
  inputs:
    actions: 'clean'
    configuration: 'Debug'
    sdk: 'iphoneos'
    xcWorkspacePath: 'AheLine.xcworkspace'
    scheme: 'AHELine.UI'
    packageApp: true
    signingOption: 'auto'
    useXcpretty: false
    args: '-verbose CODE_SIGNING_ALLOWED=No'
    exportOptions: 'specify'
    teamId: "Team Id" 
    exportTeamId: "Team Id"

- task: CopyFiles@2
  displayName: Copy ipa file
  inputs:
    SourceFolder: 'output/$(SDK)/$(Configuration)'
    Contents: '*.ipa'
    TargetFolder: '$(System.ArtifactsDirectory)/ipa'
    CleanTargetFolder: true
    OverWrite: true

- task: PublishPipelineArtifact@1
  inputs:
    targetPath: 'output/$(SDK)/$(Configuration)'
    artifact: 'ipaRelease'
    publishLocation: 'pipeline'

 

 

Important section where error is generated from:

 

 

- task: Xcode@5
  inputs:
    actions: 'clean'
    configuration: 'Debug'
    sdk: 'iphoneos'
    xcWorkspacePath: 'AheLine.xcworkspace'
    scheme: 'AHELine.UI'
    packageApp: true
    signingOption: 'auto'
    useXcpretty: false
    args: '-verbose CODE_SIGNING_ALLOWED=No'
    exportOptions: 'specify'
    teamId: "Team Id" 
    exportTeamId: "Team Id"

 

 

Here's the output where I recieve the error:

 

 

CreateBuildDescription
Build description signature: 144ce6d56bd801279fb29aadcd9e17c3
Build description path: /Users/runner/Library/Developer/Xcode/DerivedData/AheLine-eocxsujbdezrsvhigklxsrkfkjlq/Build/Intermediates.noindex/ArchiveIntermediates/AHELine.UI/IntermediateBuildFilesPath/XCBuildData/144ce6d56bd801279fb29aadcd9e17c3.xcbuilddata

/Users/runner/work/1/s/AHELine.UI/AHELine.UI.xcodeproj: error: No profiles for 'com.ahe.aheline' were found: 
Xcode couldn't find any iOS App Development provisioning profiles matching 'com.ahe.aheline'. 
Automatic signing is disabled and unable to generate a profile. 
To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild. (in target 'AHELine.UI' from project 'AHELine.UI')
** ARCHIVE FAILED **


##[error]Error: The process '/usr/bin/xcodebuild' failed with exit code 65
Finishing: Xcode

 

 

Could be related to: https://github.com/microsoft/azure-pipelines-tasks/issues/12263

 

No RepliesBe the first to reply

Resources