致力于将移动应用程序从 React Native 0.59.0 迁移到 0.60.5 并支持 Android X。更新的应用程序在iOS和Android上运行良好,适用于Android的CircleCI构建工作正常。
在存档期间,使用 Fastlane 的 iOS 版 CircleCI 构建在 CircleCI 上失败。以前有没有人看到并解决了这个问题?
在本地运行bundle exec fastlane ios build_release
时,它可以正常工作。
Environment (on CircleCI):
Xcode version: 10.2.1
Fastlane version: 2.130.0
Gym SDK: iphoneos12.2
+----------------------------------------------------+--------------------------------------------------------------+
| Summary for gym 2.130.0 |
+----------------------------------------------------+--------------------------------------------------------------+
| scheme | MyApp |
| export_method | app-store |
| export_options.provisioningProfiles.com.myapp.app | match AppStore com.myapp.app |
| workspace | ./MyApp.xcworkspace |
| destination | generic/platform=iOS |
| output_name | MyApp |
| build_path | /Users/distiller/Library/Developer/Xcode/Archives/2019-09-06 |
| clean | false |
| output_directory | . |
| silent | false |
| skip_package_ipa | false |
| result_bundle | false |
| buildlog_path | ~/Library/Logs/gym |
| skip_profile_detection | false |
| xcode_path | /Applications/Xcode-10.2.1.app |
+----------------------------------------------------+--------------------------------------------------------------+
Output:
▸ Touching MyApp.app
▸ Signing /Users/distiller/Library/Developer/Xcode/DerivedData/MyApp-crgfinutbidjbqcbnlrwjwautwhq/Build/Intermediates.noindex/ArchiveIntermediates/MyApp/InstallationBuildProductsLocation/Applications/MyApp.app
▸ Touching MyApp.app.dSYM
** ARCHIVE FAILED **
[06:24:02]: Exit status: 65
[06:24:02]:
[06:24:02]: Maybe the error shown is caused by using the wrong version of Xcode
[06:24:02]: Found multiple versions of Xcode in '/Applications/'
[06:24:02]: Make sure you selected the right version for your project
[06:24:02]: This build process was executed using '/Applications/Xcode-10.2.1.app'
[06:24:02]: If you want to update your Xcode path, either
[06:24:02]:
[06:24:02]: - Specify the Xcode version in your Fastfile
[06:24:02]: ▸ xcversion(version: "8.1") # Selects Xcode 8.1.0
[06:24:02]:
[06:24:02]: - Specify an absolute path to your Xcode installation in your Fastfile
[06:24:02]: ▸ xcode_select "/Applications/Xcode8.app"
[06:24:02]:
[06:24:02]: - Manually update the path using
[06:24:02]: ▸ sudo xcode-select -s /Applications/Xcode.app
[06:24:02]:
+---------------+--------------------------------+
| Build environment |
+---------------+--------------------------------+
| xcode_path | /Applications/Xcode-10.2.1.app |
| gym_version | 2.130.0 |
| export_method | app-store |
| sdk | iPhoneOS12.2.sdk |
+---------------+--------------------------------+
[06:24:02]: ▸ Touch /Users/distiller/Library/Developer/Xcode/DerivedData/MyApp-crgfinutbidjbqcbnlrwjwautwhq/Build/Intermediates.noindex/ArchiveIntermediates/MyApp/BuildProductsPath/Release-iphoneos/MyApp.app.dSYM
[06:24:02]: ▸ cd /Users/distiller/mobile-app/ios
[06:24:02]: ▸ export PATH="/Applications/Xcode-10.2.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode-10.2.1.app/Contents/Developer/usr/bin:/Users/distiller/.gem/ruby/2.4.6/bin:/Users/distiller/.rubies/ruby-2.4.6/lib/ruby/gems/2.4.0/bin:/Users/distiller/.rubies/ruby-2.4.6/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
[06:24:02]: ▸ /usr/bin/touch -c /Users/distiller/Library/Developer/Xcode/DerivedData/MyApp-crgfinutbidjbqcbnlrwjwautwhq/Build/Intermediates.noindex/ArchiveIntermediates/MyApp/BuildProductsPath/Release-iphoneos/MyApp.app.dSYM
我不建议在Fastfile中设置Xcode版本,因为它会一直变化。也许您在本地和 CI 计算机上有不同的 Xcode 版本。
我们曾经把它设置在Fastfile
的顶部:
xcode_select '/Applications/Xcode.app'
确保Xcode位于名为Xcode
的应用程序文件夹中,然后它应该可以工作...
正如错误日志中所说 - 您使用了错误的 xcode 版本,因此 fastline 无法选择正确的版本;
要定义 Xcode 的版本,您应该在 fastline 配置文件中添加
xcversion(version: "10.2")