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

Avgtool does not Find Project File when Setting Technical Version in Xcode Build Step for Workspace-Based Project

    Details

    • Similar Issues:

      Description

      Project builds fine when not setting technical version to something like ${BUILD_NUMBER}.

      When setting technical version in build step, the following error gets output:
      /usr/bin/agvtool new-version -all 71
      There are no Xcode project files in this directory. agvtool needs a project to operate.
      FATAL: Could not set the CFBundleVersion to: 71
      Build step 'XCode' marked build as failure

      I use an Xcode Workspace File and build a Scheme. The workspace file is not in the same folder as my main project file. Maybe this is the problem?

        Attachments

          Activity

          Hide
          lacostej lacostej added a comment -

          All agvtool command executions are executed from the projectRoot directory.
          The projectRoot is currently either the workspace (default) or the relative Xcode project directory

          I don't see why setting the workspace directory should prevent agvtool from working. Could you check in your job output if the project root is properly defined ? Also try running the agvtool from the command line.

          Show
          lacostej lacostej added a comment - All agvtool command executions are executed from the projectRoot directory. The projectRoot is currently either the workspace (default) or the relative Xcode project directory I don't see why setting the workspace directory should prevent agvtool from working. Could you check in your job output if the project root is properly defined ? Also try running the agvtool from the command line.
          Hide
          jwbrown Jonathan Brown added a comment -

          My xcodeproj is in a subfolder of the folder containing the xcworkspace. I had to set the Advanced Xcode Build Options > Xcode Project Directory to the name of the project's subfolder. Then set the Xcode Workspace File to a relative path from there: e.g., ../MyWorkspace.

          (I also had to move my Scheme from the Project to the Workspace, and update the relative path to my Code Signing & OSX Keychain Options > Embedded Profile.)

          Show
          jwbrown Jonathan Brown added a comment - My xcodeproj is in a subfolder of the folder containing the xcworkspace. I had to set the Advanced Xcode Build Options > Xcode Project Directory to the name of the project's subfolder. Then set the Xcode Workspace File to a relative path from there: e.g., ../MyWorkspace. (I also had to move my Scheme from the Project to the Workspace, and update the relative path to my Code Signing & OSX Keychain Options > Embedded Profile.)
          Hide
          kazerm Sharon Bamani added a comment -

          I get the same error.
          When working with "Xcode Workspace File",which is not at the jenkins workspace (for example dirA/dirB ) without specifying the "Xcode Project Directory":
          $ /usr/bin/agvtool new-marketing-version 0.0.109
          There are no Xcode project files in this directory. agvtool needs a project to operate.
          FATAL: Could not set CFBundleShortVersionString to: 0.0.109

          Show
          kazerm Sharon Bamani added a comment - I get the same error. When working with "Xcode Workspace File",which is not at the jenkins workspace (for example dirA/dirB ) without specifying the "Xcode Project Directory": $ /usr/bin/agvtool new-marketing-version 0.0.109 There are no Xcode project files in this directory. agvtool needs a project to operate. FATAL: Could not set CFBundleShortVersionString to: 0.0.109
          Hide
          parkej60 James Parker added a comment -

          I'm not getting an error when I set this. Instead it's just not changing the version / build number from what is actually set in the project settings. It was working fine until I updated my build server to Yosemite and installed Xcode 6 alongside Xcode 5. I'm running the latest version of the Xcode plugin.

          Show
          parkej60 James Parker added a comment - I'm not getting an error when I set this. Instead it's just not changing the version / build number from what is actually set in the project settings. It was working fine until I updated my build server to Yosemite and installed Xcode 6 alongside Xcode 5. I'm running the latest version of the Xcode plugin.
          Hide
          lacostej lacostej added a comment -

          James, do you have more logs ?

          Show
          lacostej lacostej added a comment - James, do you have more logs ?
          Hide
          parkej60 James Parker added a comment - - edited

          See the below issue for further information about the issues I'm having.
          https://issues.jenkins-ci.org/browse/JENKINS-26368

          Show
          parkej60 James Parker added a comment - - edited See the below issue for further information about the issues I'm having. https://issues.jenkins-ci.org/browse/JENKINS-26368
          Hide
          ziggyeye Alvin Wong added a comment -

          Running into similar issue I think. Project builds fine but the technical version is not changed in the info.plist.

          Show
          ziggyeye Alvin Wong added a comment - Running into similar issue I think. Project builds fine but the technical version is not changed in the info.plist.
          Hide
          hyei Henry Yei added a comment -

          This failure below does NOT fail the build like it should and ended up only failing when submitting to the app store.

          [ContentBlocker] $ /usr/bin/agvtool new-version -all 377
          Setting version of project XProject to:
          377.

          Also setting CFBundleVersion key (assuming it exists)

          Updating CFBundleVersion in Info.plist(s)...

          Cannot find "XProject.xcodeproj/../ <key>INFOPLIST_FILE</key>"

          Show
          hyei Henry Yei added a comment - This failure below does NOT fail the build like it should and ended up only failing when submitting to the app store. [ContentBlocker] $ /usr/bin/agvtool new-version -all 377 Setting version of project XProject to: 377. Also setting CFBundleVersion key (assuming it exists) Updating CFBundleVersion in Info.plist(s)... Cannot find "XProject.xcodeproj/../ <key>INFOPLIST_FILE</key>"

            People

            • Assignee:
              Unassigned
              Reporter:
              fabb Fabian E
            • Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated: