Fastlane 车道上传应用程序到 testflight
Posted
技术标签:
【中文标题】Fastlane 车道上传应用程序到 testflight【英文标题】:Fastlane lane uploading application to testflight 【发布时间】:2020-05-01 12:52:01 【问题描述】:我正在尝试构建一个 ios 应用程序并使用 Fastlane 将其上传到 Testflight,但我遇到了这些错误。 appName 是我的应用程序的名称。
[04:32:03]: $ set -o pipefail && xcodebuild -workspace ./appName.xcworkspace -scheme appName -destination 'generic/platform=iOS' -archivePath /Users/distiller/Library/Developer/Xcode/Archives/2020-05-01/appName\ 2020-05-01\ 04.32.03.xcarchive archive | tee /Users/distiller/Library/Logs/gym/appName-appName.log | xcpretty
[04:32:05]: ▸ ❌ error: /Users/distiller/demo-react-native/ios/Pods/Target Support Files/Pods-appName/Pods-appName.release.xcconfig: unable to open file (in target "appName" in project "appName") (in target 'appName')
[04:32:05]: ▸ ❌ error: /Users/distiller/demo-react-native/ios/Pods/Target Support Files/Pods-appName/Pods-appName.release.xcconfig: unable to open file (in target "appName" in project "appName") (in target 'appName')
[04:32:05]: ▸ ❌ error: /Users/distiller/demo-react-native/ios/Pods/Target Support Files/Pods-appName/Pods-appName.release.xcconfig: unable to open file (in target "appName" in project "appName") (in target 'appName')
[04:32:05]: ▸ ❌ error: Failed to parse IPHONEOS_DEPLOYMENT_TARGET: Could not parse version component from: '3 ' (in target 'appName')
[04:32:05]: ▸ ** ARCHIVE FAILED **
❌ error: /Users/distiller/demo-react-native/ios/Pods/Target Support Files/Pods-appName/Pods-appName.release.xcconfig: unable to open file (in target "appName" in project "appName") (in target 'appName')
❌ error: /Users/distiller/demo-react-native/ios/Pods/Target Support Files/Pods-appName/Pods-appName.release.xcconfig: unable to open file (in target "appName" in project "appName") (in target 'appName')
❌ error: /Users/distiller/demo-react-native/ios/Pods/Target Support Files/Pods-appName/Pods-appName.release.xcconfig: unable to open file (in target "appName" in project "appName") (in target 'appName')
❌ error: Failed to parse IPHONEOS_DEPLOYMENT_TARGET: Could not parse version component from: '3 ' (in target 'appName')
** ARCHIVE FAILED **
[04:32:05]: Exit status: 65
[04:32:05]:
[04:32:05]: Maybe the error shown is caused by using the wrong version of Xcode
[04:32:05]: Found multiple versions of Xcode in '/Applications/'
[04:32:05]: Make sure you selected the right version for your project
[04:32:05]: This build process was executed using '/Applications/Xcode-10.1.app'
[04:32:05]: If you want to update your Xcode path, either
[04:32:05]:
[04:32:05]: - Specify the Xcode version in your Fastfile
[04:32:05]: ▸ xcversion(version: "8.1") # Selects Xcode 8.1.0
[04:32:05]:
[04:32:05]: - Specify an absolute path to your Xcode installation in your Fastfile
[04:32:05]: ▸ xcode_select "/Applications/Xcode8.app"
[04:32:05]:
[04:32:05]: - Manually update the path using
[04:32:05]: ▸ sudo xcode-select -s /Applications/Xcode.app
[04:32:05]:
+---------------+------------------------------+
| Build environment |
+---------------+------------------------------+
| xcode_path | /Applications/Xcode-10.1.app |
| gym_version | 2.146.1 |
| export_method | app-store |
| sdk | iPhoneOS12.1.sdk |
+---------------+------------------------------+
[04:32:05]: ▸ Build system information
[04:32:05]: ▸ error: /Users/distiller/demo-react-native/ios/Pods/Target Support Files/Pods-appName/Pods-appName.release.xcconfig: unable to open file (in target "appName" in project "appName") (in target 'appName')
[04:32:05]: ▸ Build system information
[04:32:05]: ▸ error: Failed to parse IPHONEOS_DEPLOYMENT_TARGET: Could not parse version component from: '3 ' (in target 'appName')
[04:32:05]:
[04:32:05]: ⬆️ Check out the few lines of raw `xcodebuild` output above for potential hints on how to solve this error
[04:32:05]: ???? For the complete and more detailed error log, check the full log at:
[04:32:05]: ???? /Users/distiller/Library/Logs/gym/appName-appName.log
[04:32:05]:
[04:32:05]: Looks like fastlane ran into a build/archive error with your project
[04:32:05]: It's hard to tell what's causing the error, so we wrote some guides on how
[04:32:05]: to troubleshoot build and signing issues: https://docs.fastlane.tools/codesigning/getting-started/
[04:32:05]: Before submitting an issue on GitHub, please follow the guide above and make
[04:32:05]: sure your project is set up correctly.
[04:32:05]: fastlane uses `xcodebuild` commands to generate your binary, you can see the
[04:32:05]: the full commands printed out in yellow in the above log.
[04:32:05]: Make sure to inspect the output above, as usually you'll find more error information there
【问题讨论】:
应用程序是否可以在不使用 fastlane 的情况下编译? 是的,该应用程序在 xcode 中编译得很好。 你发现了吗? @ghkatende 你是怎么解决的? 【参考方案1】:这可能是因为 pod install
对您失败,或者在安装依赖项时出现其他问题。
我今天花了一整天的时间,只是为了让我的同事指出我的 pod install
命令在构建早期失败。
18:40:00 + cd app/ios
18:40:00 + pod install --repo-update
18:40:00 ./install.sh: /usr/local/bin/pod: /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby: bad interpreter: No such file or directory
18:40:00 + cd ../../
看到这个,很明显这是我的 Ruby 环境的问题。我已经更新了系统中的 ruby(到 2.6.3),但我仍然在这些日志中看到对旧版本 (2.3) 的引用。
【讨论】:
以上是关于Fastlane 车道上传应用程序到 testflight的主要内容,如果未能解决你的问题,请参考以下文章
fastlane 可以在某些车道上跳过 `before_all` 或 `after_all` 吗?