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

Jenkins Xcode plugin cannot build IPAs anymore

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Blocker Blocker
    • xcode-plugin
    • None
    • Mac OS 10.11.0, Xcode 7.0

      When the "Pack application and build .ipa?" option is select, the Jenkins Xcode plugin fails to build the IPA (and the build fails).

      Program /usr/bin/codesign returned 1 : [Warning: usage of --preserve-metadata with option "resource-rules" (deprecated in Mac OS X >= 10.10)!
      Warning: --resource-rules has been deprecated in Mac OS X >= 10.10!
      /tmp/DYdecE32Z7/Payload/MyApp.app/ResourceRules.plist: cannot read resources
      

          [JENKINS-31147] Jenkins Xcode plugin cannot build IPAs anymore

          David Venable added a comment -

          We've investigated this and the problem appears to be related to the PackageApplication script in Xcode. This SO post shows a work-around that we consider unacceptable because it requires changing an XCode script.
          http://stackoverflow.com/a/32762413/650176

          From our understanding, xcodebuild will sign the app file. The PackageApplication script is able to be run without the --sign option and will thus not sign the app file before creating the IPA.

          We solved this problem locally by commenting out XCodeBuilder.java lines 723-6. Now our builds are signing the app and successfully generating the IPA file.

                          /*if (!StringUtils.isEmpty(codeSigningIdentity)) {
                              packageCommandLine.add("--sign");
                              packageCommandLine.add(codeSigningIdentity);
                          }*/
          

          For a correct long-term fix, we are happy to create pull request, but wanted to discuss the correct solution. Should we add a flag to ignore this parameter (note the codeSigningIdentity property is used elsewhere)? Or should the plugin check the Xcode version and use that?

          David Venable added a comment - We've investigated this and the problem appears to be related to the PackageApplication script in Xcode. This SO post shows a work-around that we consider unacceptable because it requires changing an XCode script. http://stackoverflow.com/a/32762413/650176 From our understanding, xcodebuild will sign the app file. The PackageApplication script is able to be run without the --sign option and will thus not sign the app file before creating the IPA. We solved this problem locally by commenting out XCodeBuilder.java lines 723-6. Now our builds are signing the app and successfully generating the IPA file. /* if (!StringUtils.isEmpty(codeSigningIdentity)) { packageCommandLine.add( "--sign" ); packageCommandLine.add(codeSigningIdentity); }*/ For a correct long-term fix, we are happy to create pull request, but wanted to discuss the correct solution. Should we add a flag to ignore this parameter (note the codeSigningIdentity property is used elsewhere)? Or should the plugin check the Xcode version and use that?

            Unassigned Unassigned
            dvenable David Venable
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: