Xcode 9, Carthage. iTunes Connect Error: “Invalid Bundle - Disallowed LLVM instrumentation”

前端 未结 4 1492
野趣味
野趣味 2021-01-30 09:25

Today I downloaded Xcode 9 and made the necessary changes for my application to compile. The application is compiling and running locally without any issues.

Using Xcode

相关标签:
4条回答
  • 2021-01-30 09:43

    I too got same error from Xcode 9.1 even though I have updated Carthage to latest version https://github.com/Carthage/Carthage/releases I have failed in uploading build to iTunes

    Worked for me this way:-

    If you have updated your Xcode to 9.1 then

    Update your carthage.pkg downloading from https://github.com/Carthage/Carthage/releases

    Install .pkg and

    Give carthage update command in Terminal by referring to your project

    and

    then go to you project Build Settings find Enable Code Coverage Support change that setting from Yes to No

    Then Archive and upload to AppStore. You build will be ready. Happy!

    0 讨论(0)
  • 2021-01-30 09:46

    The solution to automate setting code coverage to false for all dependencies is to run the following command on terminal (please go to the directory of your project):

    grep -lR "codeCoverageEnabled" --include *.xcscheme --null Carthage | xargs -0 sed -i '' -e 's/codeCoverageEnabled = "YES"/codeCoverageEnabled = "NO"/g'
    

    This will set code coverage to NO and iTunes connect will not complain.

    The sequence to make everything work is the following

    • Run carthage update --platform iOS --no-use-binaries --no-build. This will update and download all dependecies. When Carthage start to compile you can press ctrl+c to cancel.
    • Run the above command to set code coverage to NO
    • Now that everything is into place run carthage build --platform iOS. This will build everything with code coverage to NO

    You can now archive and upload to iTC.

    The command was given by https://github.com/gunterhager, so credit goes to him


    As an alternative for fastlane users, add the following to your fastlane file, which will automate everything:

      desc "Update Carthage"
      lane :update_carthage do
        carthage(
          command: "update",       # One of: build, bootstrap, update, archive. (default: bootstrap)
          use_binaries: false,         # Check out dependency repositories even when prebuilt frameworks exist
          no_build: true,  # When bootstrapping Carthage do not build
          platform: "iOS"  # Define which platform to build for (one of ‘all’, ‘Mac’, ‘iOS’, ‘watchOS’, ‘tvOS‘, or comma-separated values of the formers except for ‘all’)
        )
        sh("grep -lR 'codeCoverageEnabled' --include *.xcscheme --null Carthage | xargs -0 sed -i '' -e 's/codeCoverageEnabled = 'YES'/codeCoverageEnabled = 'NO'/g'")
        carthage(
          command: "build",       # One of: build, bootstrap, update, archive. (default: bootstrap)
          platform: "iOS"  # Define which platform to build for (one of ‘all’, ‘Mac’, ‘iOS’, ‘watchOS’, ‘tvOS‘, or comma-separated values of the formers except for ‘all’)
        )
      end
    
    0 讨论(0)
  • 2021-01-30 10:06

    As quick fix, run these commands in Terminal (be sure to go to your project's root folder):

    • carthage update --platform iOS --no-use-binaries --no-build This will update your dependencies, but will build nothing.

    • grep -lR "codeCoverageEnabled" --include *.xcscheme --null Carthage | xargs -0 sed -i '' -e 's/codeCoverageEnabled = "YES"/codeCoverageEnabled = "NO"/g' This will set code coverage to NO.

    • carthage build --platform iOS This will finally build all frameworks without code coverage.

    Now you can archive your project and upload it to iTunes Connect.

    The nice people at the Carthage project are already working on a more user friendly fix, so be sure to check for releases there.

    0 讨论(0)
  • 2021-01-30 10:06

    Just update Carthage to version 0.26.0 or higher and then run the carthage update command again.

    0 讨论(0)
提交回复
热议问题