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

xcodebuild export step fails due to empty exportPlist

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Blocker Blocker
    • xcode-plugin
    • None
    • OSX Sierra, Xcode 9, xcode-plugin 2.0, token-macro 2.0

      We use Sierra + XCode9 + our Distribution certificate

      I was never able to build using automatic signing since we upgraded to Sierra and XCode9. It was working before for el Capitan and Xcode 8.

      I succeeded with manual signing building and archiving with the xcode-plugin parameters:

      • Generate archive => true
      • Pack application, build and sign .ipa? => method "enterprise"
      • Setup the Development Team ID
      • Custom xcodebuild arguments => CODE_SIGN_IDENTITY="iPhone Distribution" PROVISIONING_PROFILE="my_uuid_goes_here" CODE_SIGN_STYLE=Manual

      It then fails when packaging.

      18:13:12 [iOS] $ /usr/bin/xcodebuild -exportArchive -archivePath /Users/midas/workspace/myapp.release.ios.xcode11/Build/iOS/build/Release-iphoneos/Unity-iPhone.xcarchive -exportPath /Users/midas/workspace/myapp.release.ios.xcode11/Build/iOS/build/Release-iphoneos -exportOptionsPlist /Users/midas/workspace/myapp.release.ios.xcode11/Build/iOS/build/Release-iphoneos/enterpriseExport.plist
      
      18:13:12 2017-10-30 18:13:12.618 xcodebuild[29263:2358917] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/bf/x1888_rd13b4ppwq55pssbv80000gn/T/Unity-iPhone_2017-10-30_18-13-12.617.xcdistributionlogs'.
      18:13:13 2017-10-30 18:13:13.088 xcodebuild[29263:2358917] [MT] IDEDistribution: Step failed: <IDEDistributionSigningAssetsStep: 0x7fb6fffc38c0>: Error Domain=IDEDistributionSigningAssetStepErrorDomain Code=0 "Locating signing assets failed." UserInfo={NSLocalizedDescription=Locating signing assets failed., IDEDistributionSigningAssetStepUnderlyingErrors=(
      18:13:13     "Error Domain=IDEProvisioningErrorDomain Code=9 \"\"myapp.app\" requires a provisioning profile.\" UserInfo={NSLocalizedDescription=\"myapp.app\" requires a provisioning profile., NSLocalizedRecoverySuggestion=Add a profile to the \"provisioningProfiles\" dictionary in your Export Options property list.}"
      18:13:13 )}
      18:13:13 error: exportArchive: "myapp.app" requires a provisioning profile.
      18:13:13 
      18:13:13 Error Domain=IDEProvisioningErrorDomain Code=9 ""myapp.app" requires a provisioning profile." UserInfo={NSLocalizedDescription="myapp.app" requires a provisioning profile., NSLocalizedRecoverySuggestion=Add a profile to the "provisioningProfiles" dictionary in your Export Options property list.}
      18:13:13 
      18:13:13 ** EXPORT FAILED **

      When I check the used exportPlist file, it contains just this:

      <plist version="1.0">
      <dict>
      <key>method</key>
      <string>enterprise</string>
      <key>teamID</key>
      <string>my_team_id_goes_here</string>
      </dict>
      </plist>

      No mention to the provisioning profile or signatures or anything. Maybe the error comes here, from the fact it does not have this info to build the plist file??

      How can we solve that?

      We don't want to add a post-build process to manually do this and invoke code sign, as xcode-plugin is supposed to drive this anyway.

          [JENKINS-47744] xcodebuild export step fails due to empty exportPlist

          Ronak Patel added a comment -

          I have the exact same problem. Did you manage to solve this by any chance?

          It's really important.

          Appreciate your prompt support in this regard.

           

          Thanks!

          Ronak Patel added a comment - I have the exact same problem. Did you manage to solve this by any chance? It's really important. Appreciate your prompt support in this regard.   Thanks!

          Tony Ru added a comment - - edited

          We also have this problem but I found out that in the github repository the exportOptions.plist is already updated with new needed fields ... months ago ... but I wonder why the changes becomes not deployed? Is it possible to build the plugin manually?

          See this commit:

          https://github.com/jenkinsci/xcode-plugin/commit/3937e54f3c0a761528e038668471ef65a545aa99

          edit: sorry that was the wrong link

          I found the fixed here:

          https://github.com/jenkinsci/xcode-plugin/pull/87/commits/09fc94fa0783e6b7f111e3e979fb37ccaefdeeed

           

          still hoping to have it integrated soon

           

          Tony Ru added a comment - - edited We also have this problem but I found out that in the github repository the exportOptions.plist is already updated with new needed fields ... months ago ... but I wonder why the changes becomes not deployed? Is it possible to build the plugin manually? See this commit: https://github.com/jenkinsci/xcode-plugin/commit/3937e54f3c0a761528e038668471ef65a545aa99 edit: sorry that was the wrong link I found the fixed here: https://github.com/jenkinsci/xcode-plugin/pull/87/commits/09fc94fa0783e6b7f111e3e979fb37ccaefdeeed   still hoping to have it integrated soon  

            Unassigned Unassigned
            juanmoya Juan Moya
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: