Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-20916

Code Sign error: No matching provisioning profile found

    Details

    • Similar Issues:

      Description

      Regarding the issue yo opened here : https://issues.jenkins-ci.org/browse/JENKINS-20048

      I'm facing the same exact issue, appreciate your support if you were able to resolve this issue.

      My Error >>>>>>>>>>>>>>>>>>
      == Available provisioning profiles
      [workspace] $ /usr/bin/security find-identity -p codesigning -v
      1) 18C94576BC81E3FD5109803BCF46BCDBD8D05341 "iPhone Developer: Amr El-Dessouky (XNGHTZX727)"
      1 valid identities found
      == Available SDKs
      [workspace] $ /usr/bin/xcodebuild -showsdks
      OS X SDKs:
      OS X 10.8 -sdk macosx10.8
      OS X 10.9 -sdk macosx10.9
      iOS SDKs:
      iOS 7.0 -sdk iphoneos7.0
      iOS Simulator SDKs:
      Simulator - iOS 7.0 -sdk iphonesimulator7.0
      == Available schemes
      [workspace] $ /usr/bin/xcodebuild -list
      Information about project "iRAZ":
      Targets:
      iRAZ
      Build Configurations:
      Debug
      Release
      If no build configuration is specified and -scheme is not passed then "Release" is used.
      This project contains no schemes.
      ===========================================================
      Going to invoke xcodebuild:target: ALL, sdk: DEFAULT, project: DEFAULT, configuration: Release, clean: NO, archive:NO, symRoot: DEFAULT, configurationBuildDir: DEFAULT, codeSignIdentity: DEFAULT
      [workspace] $ /usr/bin/xcodebuild -alltargets -configuration Release build
      === BUILD TARGET iRAZ OF PROJECT iRAZ WITH CONFIGURATION Release ===
      Check dependencies
      Code Sign error: No matching provisioning profile found: Your build settings specify a provisioning profile with the UUID ���9493A4CE-08F9-47CC-885B-17FCD0DFD1EA���, however, no such provisioning profile was found.
      CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 7.0'

        • BUILD FAILED **

        Attachments

          Activity

          Hide
          im_lp Luis Placid added a comment -

          I was also having this issue. I just resolved via the following:

          1. Open Xcode 5.0 -> Preferences -> Accounts and delete your developer account.
          2.Navigate to the path where your Jenkins exists, In my case its '/Users/Shared/Jenkins/Library/MobileDevice/Provisioning Profiles' and delete all cached provisioning profiles there. Usually Xcode stores it under '/Users/<USERNAME>/Library/MobileDevice/Provisioning Profiles/'
          3. Open Xcode -> preferences -> Accounts: re-add your developer account
          4. Open your Jenkins job's configuration page, navigate to your Xcode step and check the values under the 'Code signing & OS X keychain options'. Make sure the Code Signing identity value matches the identity found on your keychain.
          5. ?????
          6. Build & make profit.

          Hope it works

          Show
          im_lp Luis Placid added a comment - I was also having this issue. I just resolved via the following: 1. Open Xcode 5.0 -> Preferences -> Accounts and delete your developer account. 2.Navigate to the path where your Jenkins exists, In my case its '/Users/Shared/Jenkins/Library/MobileDevice/Provisioning Profiles' and delete all cached provisioning profiles there. Usually Xcode stores it under '/Users/<USERNAME>/Library/MobileDevice/Provisioning Profiles/' 3. Open Xcode -> preferences -> Accounts: re-add your developer account 4. Open your Jenkins job's configuration page, navigate to your Xcode step and check the values under the 'Code signing & OS X keychain options'. Make sure the Code Signing identity value matches the identity found on your keychain. 5. ????? 6. Build & make profit. Hope it works
          Hide
          majinnaibu Tom Hicks added a comment -

          "restore keychains as defined in global configuration" doesn't work for me I had to add a shell task 'security delete-keychain "jenkins-$JOB_NAME" || :' to delete the keychain if it existed before.

          I also added an "Import developer profile" task and put my *.developerprofile file in the credentials system.

          I still couldn't sign and a shell task would show no code signing keys present, because the keys aren't imported into the login.keychain keychain.

          You need to also expand "Code signing & OS X keychain options", check "Unlock Keychain?" and fill in the path to the keychain file ie "${HOME}/Library/Keychains/jenkins-${JOB_NAME}" and the password you used for the *.developerprofile file as the Keychain password.

          Show
          majinnaibu Tom Hicks added a comment - "restore keychains as defined in global configuration" doesn't work for me I had to add a shell task 'security delete-keychain "jenkins-$JOB_NAME" || :' to delete the keychain if it existed before. I also added an "Import developer profile" task and put my *.developerprofile file in the credentials system. I still couldn't sign and a shell task would show no code signing keys present, because the keys aren't imported into the login.keychain keychain. You need to also expand "Code signing & OS X keychain options", check "Unlock Keychain?" and fill in the path to the keychain file ie "${HOME}/Library/Keychains/jenkins-${JOB_NAME}" and the password you used for the *.developerprofile file as the Keychain password.
          Hide
          suda Wojtek Siudzinski added a comment -

          Only thing I found to make it work is manually specifying provisioning profile as custom xcodebuild arguments:

          1. Add Execute shell step before Xcode and place this:

          echo "PROVISIONING_ID=`/usr/libexec/PlistBuddy -c 'Print UUID' /dev/stdin <<< $(security cms -D -i ${WORKSPACE}/Resources/profile.mobileprovision)`" > env.properties

          (fix the path to provisioning file)

          2. Add Inject environment variables step after Execute shell step and set Properties File Path to env.properties

          3. In Xcode step, click Settings, then Advanced build settings... and fill Custom xcodebuild arguments with:

          PROVISIONING_PROFILE=${PROVISIONING_ID}

          Show
          suda Wojtek Siudzinski added a comment - Only thing I found to make it work is manually specifying provisioning profile as custom xcodebuild arguments: 1. Add Execute shell step before Xcode and place this: echo "PROVISIONING_ID=`/usr/libexec/PlistBuddy -c 'Print UUID' /dev/stdin <<< $(security cms -D -i ${WORKSPACE}/Resources/profile.mobileprovision)`" > env.properties (fix the path to provisioning file) 2. Add Inject environment variables step after Execute shell step and set Properties File Path to env.properties 3. In Xcode step, click Settings , then Advanced build settings... and fill Custom xcodebuild arguments with: PROVISIONING_PROFILE=${PROVISIONING_ID}
          Hide
          ohnit Nitin Malik added a comment -

          We found that specifying a path for an embedding a profile was not working and xcode is probably looking at the regular place where provisioning profiles are found.

          To solve our issue, we removed all the provisioning profiles from the computer. Then installed the missing provisioning profile by double clicking on it.

          Also ensure that you specify the correct provisioning profile in your xcode build settings.

          Show
          ohnit Nitin Malik added a comment - We found that specifying a path for an embedding a profile was not working and xcode is probably looking at the regular place where provisioning profiles are found. To solve our issue, we removed all the provisioning profiles from the computer. Then installed the missing provisioning profile by double clicking on it. Also ensure that you specify the correct provisioning profile in your xcode build settings.
          Show
          lkraider Paul Eipper added a comment - See https://issues.jenkins-ci.org/browse/JENKINS-30979 And https://stackoverflow.com/questions/25637472/jenkins-ios-build-using-credentials-and-developer-profile

            People

            • Assignee:
              Unassigned
              Reporter:
              amrsd Amr El-Dessouky
            • Votes:
              1 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

              • Created:
                Updated: