gpt4 book ai didi

ios - xcodebuild 归档失败,CircleCI 上的退出状态为 65

转载 作者:行者123 更新时间:2023-12-05 00:23:03 29 4
gpt4 key购买 nike

大纲

你好!
我正在尝试通过将 faSTLane 与 match 和 gym 结合使用来自动化 adhoc 构建。
我可以在本地环境中存档。
但我无法在 Circle CI 存档。
看起来 xcodebuild 命令失败了。
我通过 ssh 登录作业,并且此命令在 Circle CI 失败。

$ xcodebuild -workspace MyApp.xcworkspace -scheme MyApp -configuration Release -destination 'generic/platform=iOS' -archivePath MyApp.xcarchive clean archive | tee /Users/distiller/Library/Logs/gym/MyApp-MyApp.log



请告诉我解决方案。

我做了什么

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

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

我的代码符号 settig 在这里。

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

快车道来了。
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 在这里。
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

失败的日志在这里。
...
...
▸ 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

最佳答案

我看到了同样的问题,但原因完全不同。
错误地,我添加了一个带有过时路径的文件导入。由于这个问题,我无法在本地启动该应用程序。
一旦我用源代码解决了这个问题,应用程序就可以正常启动并且工作按预期工作。

关于ios - xcodebuild 归档失败,CircleCI 上的退出状态为 65,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48675576/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com