首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >CircleCI上退出状态65的xcodebuild归档失败

CircleCI上退出状态65的xcodebuild归档失败
EN

Stack Overflow用户
提问于 2018-02-08 00:28:32
回答 1查看 2K关注 0票数 12

提纲

你好!我试图通过使用fastlane和match和健身房来自动化临时构建。我可以在当地环境中存档。但我不能在圆环CI存档。看起来xcodebuild命令失败了。我通过ssh登录作业,此命令在循环CI中失败。

$ xcodebuild -workspace MyApp.xcworkspace -scheme MyApp -configuration发布-destination 'generic/platform=iOS‘-archivePath MyApp.xcarchive干净归档文件tee tee-destination

请告诉我解决办法。

我所做的

https://circleci.com/docs/2.0/ios-codesigning/

我已经通过引用此页面设置了项目设置。

我的代码符号settig在这里。

https://circleci-discourse.s3.amazonaws.com/original/2X/6/6e3c5cf2ed04b16a3d782d99c99107d5889a29f8.png

快车来了。

代码语言:javascript
复制
version: 2
jobs:
 setup:
   macos:
     xcode: "9.2.0"
   shell: /bin/bash --login -eo pipefail
   steps:
     - checkout
     - run:
         name: Set Ruby Version
         command:  echo "ruby-2.4" > ~/.ruby-version
     - restore_cache:
         keys:
           - gems-{{ checksum "Gemfile.lock" }}
     - run:
         name: Running bundle install
         command: bundle check || bundle install --path vendor/bundle
         environment:
             - BUNDLE_JOBS: 4
             - BUNDLE_RETRY: 3
     - save_cache:
         key: gems-{{ checksum "Gemfile.lock" }}
         paths:
           - vendor/bundle
     - restore_cache:
         keys:
           - pods--{{ checksum "Podfile.lock" }}
     - run:
         name: Running pod install
         command: |
           curl https://cocoapods-specs.circleci.com/fetch-cocoapods-repo-from-s3.sh | bash -s cf
           bundle exec pod install
     - save_cache:
         key: pods-{{ checksum "Podfile.lock" }}
         paths:
           - Pods
           - MyApp.xcworkspace
 beta-deployment:
   macos:
     xcode: "9.2.0"
   shell: /bin/bash --login -eo pipefail
   steps:
     - checkout
     - restore_cache:
         keys:
           - gems-{{ checksum "Gemfile.lock" }}
     - restore_cache:
         keys:
           - pods-{{ checksum "Podfile.lock" }}
     - run: echo "ruby-2.4" > ~/.ruby-version
     - run: bundle install
     - run: bundle exec fastlane build_adhoc
     - store_artifacts:
         path: MyApp.app.dSYM.zip
     - store_artifacts:
         path: MyApp.ipa
workflows:
  version: 2
  build_test_deployment:
    jobs:
      - setup
      - beta-deployment:
          requires:
            - setup

config.yml来了。

代码语言:javascript
复制
fastlane_version "2.35.1"

default_platform :ios

platform :ios do
  lane :build_adhoc do
    setup_circle_ci
    match(type: "appstore", app_identifier: "jp.hogehoge.MyApp", readonly: true)
    match(type: "adhoc", app_identifier: "jp.hogehoge.MyApp", readonly: true)
    gym(
      scheme: "MyApp",
      workspace: "MyApp.xcworkspace",
      configuration: "Release",
      export_method: "ad-hoc",
      export_options: {
        provisioningProfiles: {
        "jp.hogehoge.MyApp" => "match AdHoc jp.hogehoge.MyApp"
        }
      },
      clean: true
    )
  end
end

失败的日志在这里。

代码语言:javascript
复制
...
...
▸ Running script '[CP] Embed Pods Frameworks'
▸ Running script '[CP] Copy Pods Resources'
▸ Touching MyApp.app
▸ Signing /Users/distiller/Library/Developer/Xcode/DerivedData/MyApp-dsgauupkymppmmgymocmzptqnqrr/Build/Intermediates.noindex/ArchiveIntermediates/MyApp/InstallationBuildProductsLocation/Applications/MyApp.app
▸ Touching MyApp.app.dSYM
** ARCHIVE FAILED **
[01:51:08]: Exit status: 65
[01:51:08]: 
[01:51:08]: Maybe the error shown is caused by using the wrong version of Xcode
[01:51:08]: Found multiple versions of Xcode in '/Applications/'
[01:51:08]: Make sure you selected the right version for your project
[01:51:08]: This build process was executed using '/Applications/Xcode-9.2.app'
[01:51:08]: If you want to update your Xcode path, either
[01:51:08]: 
[01:51:08]: - Specify the Xcode version in your Fastfile
[01:51:08]: ▸ xcversion(version: "8.1") # Selects Xcode 8.1.0
[01:51:08]: 
[01:51:08]: - Specify an absolute path to your Xcode installation in your Fastfile
[01:51:08]: ▸ xcode_select "/Applications/Xcode8.app"
[01:51:08]: 
[01:51:08]: - Manually update the path using
[01:51:08]: ▸ sudo xcode-select -s /Applications/Xcode.app
[01:51:08]: 

+---------------+-----------------------------+
|              Build environment              |
+---------------+-----------------------------+
| xcode_path    | /Applications/Xcode-9.2.app |
| gym_version   | 2.79.0                      |
| export_method | ad-hoc                      |
| sdk           | iPhoneOS11.2.sdk            |
+---------------+-----------------------------+

[01:51:08]: ▸ Touch /Users/distiller/Library/Developer/Xcode/DerivedData/MyApp-dsgauupkymppmmgymocmzptqnqrr/Build/Intermediates.noindex/ArchiveIntermediates/MyApp/BuildProductsPath/Release-iphoneos/MyApp.app.dSYM
[01:51:08]: ▸     cd /Users/distiller/project
[01:51:08]: ▸     export PATH="/Applications/Xcode-9.2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode-9.2.app/Contents/Developer/usr/bin:/Users/distiller/.gem/ruby/2.4.2/bin:/Users/distiller/.rubies/ruby-2.4.2/lib/ruby/gems/2.4.0/bin:/Users/distiller/.rubies/ruby-2.4.2/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
[01:51:08]: ▸     /usr/bin/touch -c /Users/distiller/Library/Developer/Xcode/DerivedData/MyApp-dsgauupkymppmmgymocmzptqnqrr/Build/Intermediates.noindex/ArchiveIntermediates/MyApp/BuildProductsPath/Release-iphoneos/MyApp.app.dSYM
[01:51:08]: 
[01:51:08]: ⬆️  Check out the few lines of raw `xcodebuild` output above for potential hints on how to solve this error
[01:51:08]:   For the complete and more detailed error log, check the full log at:
[01:51:08]:   /Users/distiller/Library/Logs/gym/MyApp-MyApp.log
[01:51:08]: 
[01:51:08]: Looks like fastlane ran into a build/archive error with your project
[01:51:08]: It's hard to tell what's causing the error, so we wrote some guides on how
[01:51:08]: to troubleshoot build and signing issues: docs.fastlane.tools/codesigning/getting-started/
[01:51:08]: Before submitting an issue on GitHub, please follow the guide above and make
[01:51:08]: sure your project is set up correctly.
[01:51:08]: fastlane uses `xcodebuild` commands to generate your binary, you can see the
[01:51:08]: the full commands printed out in yellow in the above log.
[01:51:08]: Make sure to inspect the output above, as usually you'll find more error information there
[01:51:08]: 
+------------------------------------+--------------------------------------------------------------------------------+
|                                                    Lane Context                                                     |
+------------------------------------+--------------------------------------------------------------------------------+
| DEFAULT_PLATFORM                   | ios                                                                            |
| PLATFORM_NAME                      | ios                                                                            |
| LANE_NAME                          | ios build_adhoc                                                                |
| ORIGINAL_DEFAULT_KEYCHAIN          | "/Users/distiller/Library/Keychains/login.keychain-db"                         |
| SIGH_PROFILE_TYPE                  | ad-hoc                                                                         |
| MATCH_PROVISIONING_PROFILE_MAPPING | {"jp.hogehoge.MyApp"=>"match AdHoc jp.hogehoge.MyApp"} |
+------------------------------------+--------------------------------------------------------------------------------+
[01:51:08]: Error building the application - see the log above

+------+---------------------------------+-------------+
|                   fastlane summary                   |
+------+---------------------------------+-------------+
| Step | Action                          | Time (in s) |
+------+---------------------------------+-------------+
| 1    | Verifying fastlane version      | 0           |
| 2    | default_platform                | 0           |
| 3    | setup_circle_ci                 | 0           |
| 4    | Switch to ios certificates lane | 0           |
| 5    | match                           | 2           |
| 6    | match                           | 2           |
| 7    | match                           | 1           |
|    | gym                             | 207         |
+------+---------------------------------+-------------+

[01:51:08]: fastlane finished with errors

[!] Error building the application - see the log above

...

[23:25:14]: WARNING: fastlane requires your locale to be set to UTF-8. To learn more go ://docs.fastlane.tools/getting-started/ios/setup/#set-up-environment-variables
Exited with code 1
EN

回答 1

Stack Overflow用户

发布于 2021-12-28 12:23:18

我看到了同样的问题,但原因完全不同。

错误地,我添加了一个带有过时路径的文件导入。由于这个问题,我无法在本地启动这个应用程序。

一旦我用源代码解决了这个问题,应用程序就很好地启动了,工作也如愿以偿。

票数 -2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/48675576

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档