Bolu
Bolu

Reputation: 216

ERROR ITMS-90174: “Missing Provisioning Profile - Apps must contain a provisioning profile in a file named embedded.mobileprovision.”

I've been trying to build an Azure Pipeline that build an iOS project and deploys it to Test-flight for the past few days now. Ive been able to get it to successfully build and produce an .ipa but i keep running to this error at the AppStoreRelease@1 task:

ERROR ITMS-90174: “Missing Provisioning Profile - Apps must contain a provisioning profile in a file named embedded.mobileprovision.”

I have checked multiple similar questions for the past few days but none of the answers seem to solve the problem. So far i have tried --buildFlag="-UseModernBuildSystem=0". Below is my .yml. I've almost given up at this point so any assistance will be a big help.

steps:
    - task: InstallAppleCertificate@2
        inputs:
            certSecureFile: '$(certSecureFile)'
            certPwd: '$(password)'

    - task: InstallAppleProvisioningProfile@1
        inputs:
            provisioningProfileLocation: 'sourceRepository'
            provProfileSourceRepository: 'sourcefile.mobileprovision'


    - task: Xcode@5
        inputs:
            actions: 'build'
            scheme: 'Scheme'
            sdk: 'iphoneos'
            packageApp: true
            exportOptions: 'plist'
            exportOptionsPlist: 'ExportOptions.plist'
            signingOption: 'manual'
            signingIdentity: '$(APPLE_CERTIFICATE_SIGNING_IDENTITY)'
            provisioningProfileUuid: '$(APPLE_PROV_PROFILE_UUID)'
            exportPath: "$(system.DefaultWorkingDirectory)"
            args: 'CODE_SIGNING_ALLOWED=No -UseModernBuildSystem=0'
            configuration: 'Release'
            teamId: 'TeamId'
            exportTeamId: 'TeamId'
            xcWorkspacePath: '**/*.xcworkspace'
            xcodeVersion: 'default' # Options: 8, 9, 10, default, specifyPath

    - task: CopyFiles@2
        inputs:
            contents: '**/*.ipa'
            targetFolder: '$(build.artifactStagingDirectory)'
    - task: PublishBuildArtifacts@1
    - task: AppStoreRelease@1
        inputs:
            authType: 'UserAndPass'
            username: '$(user)'
            password: '$(pass)'
            appIdentifier: 'App Identifier'
            appType: 'iOS'
            ipaPath: '$(build.artifactStagingDirectory)/**/*.ipa'
            releaseTrack: 'TestFlight'
            teamId: 'Team ID'
            teamName: 'Team Name'
            fastlaneArguments: 'action increment_build_number'

Upvotes: 3

Views: 909

Answers (1)

Levi Lu-MSFT
Levi Lu-MSFT

Reputation: 30313

An Xcode app must be signed and provisioned to run on a device or be published to the App Store. It looks like your ios app is not successfully signed.

I saw you defined CODE_SIGNING_ALLOWED=No in the attribute args of XCode task. This arguement CODE_SIGNING_ALLOWED=No will skip the code signing. See this thread. You can also check the task log of the Xcode task to see if your app is successfully signed.

You can try removing the arguement CODE_SIGNING_ALLOWED=No for Xcode task.

Upvotes: 3

Related Questions