xcrun 未设置 rbenv shell 版本,.xcarchive 格式错误。 Fastlane,ios,本机反应

xcrun does not set rbenv shell version, .xcarchive is malformed. Fastlane, ios, react native

我正在尝试将我的 ios react-native 应用程序部署到 AppStore,使用 fastlane 自动部署以使用 TestFlight 进行 beta 测试。但是,我的 fastlane beta 命令构建应用程序,然后在存档成功构建后失败。

失败的部分是:

rbenv detected, removing env variables
rbenv: shell integration not enabled. Run `rbenv init' for instructions.
+ xcodebuild -exportArchive -exportOptionsPlist /var/folders/hq/xkbjj40x4gv1hx_q80vj7rh40000gn/T/gym_config20210223-39939-lz42w9.plist -archivePath './builds/project 2021-02-23 15.21.33.xcarchive' -exportPath /var/folders/hq/xkbjj40x4gv1hx_q80vj7rh40000gn/T/gym_output20210223-39939-1ehxxzu
error: archive at path '/Users/me/project/ios/builds/project 2021-02-23 15.21.33.xcarchive' is malformed
** EXPORT FAILED **

如果我 运行 xcrun rbenv init 它会产生预期的输出,我的 .zshrc 和 .bashrc 包含 eval "$(rbenv init -)" 并且 xc运行 具有与我相同的环境变量zsh。然而,xcrun rbenv shell 产生 rbenv: shell integration not enabled. Run 'rbenv init' for instructions. 以及 运行ning xcrun rbenv shell 2.6.3。如果 rbenv shell 2.6.3 在 zsh 中是 运行,则 rbenv 设置为该版本。

我怀疑这可能不是问题的原因,我已经尝试重新安装 xcode cli 工具并重新安装 ruby。在 fastlane 中归档完成之前,会给出以下警告:

[15:27:18]: ▸     no rule to process file '/Users/me/project/ios/Pods/Flipper-RSocket/rsocket/benchmarks/CMakeLists.txt' of type 'text' for architecture 'arm64' (in target 'Flipper-RSocket' from project 'Pods')
[15:27:18]: ▸     no rule to process file '/Users/me/project/ios/Pods/Flipper-RSocket/rsocket/benchmarks/README.md' of type 'net.daringfireball.markdown' for architecture 'arm64' (in target 'Flipper-RSocket' from project 'Pods')
[15:27:18]: ▸     no rule to process file '/Users/me/project/ios/Pods/Flipper-RSocket/rsocket/README.md' of type 'net.daringfireball.markdown' for architecture 'arm64' (in target 'Flipper-RSocket' from project 'Pods')
[15:27:18]: ▸     no rule to process file '/Users/me/project/ios/Pods/Flipper-RSocket/rsocket/benchmarks/CMakeLists.txt' of type 'text' for architecture 'armv7' (in target 'Flipper-RSocket' from project 'Pods')
[15:27:18]: ▸     no rule to process file '/Users/me/project/ios/Pods/Flipper-RSocket/rsocket/benchmarks/README.md' of type 'net.daringfireball.markdown' for architecture 'armv7' (in target 'Flipper-RSocket' from project 'Pods')
[15:27:18]: ▸     no rule to process file '/Users/me/project/ios/Pods/Flipper-RSocket/rsocket/README.md' of type 'net.daringfireball.markdown' for architecture 'armv7' (in target 'Flipper-RSocket' from project 'Pods')

我的 Fastfile 看起来像:

default_platform(:ios)

platform :ios do
  desc "Push a new beta build to TestFlight"
  lane :beta do
    increment_build_number(xcodeproj: "project.xcodeproj")
    get_certificates( # Create or get certificate, and install it
      output_path: "./builds" # Download certificate in the build folder (you don't need to create the folder)
    )
    get_provisioning_profile( # Create or get provisioning profile
      output_path: "./builds",  # Download provisioning profile in the build folder
      filename: "provisioning.mobileprovision" # Rename the local provisioning profile
    )
    update_project_provisioning( # Set the project provisioning profile (related in Xcode to the General > Signing Release section)
      xcodeproj: "project.xcodeproj",
      target_filter: "project", # Name of your project
      profile: "./builds/provisioning.mobileprovision",
      build_configuration: "Release"
    )
    update_project_team( # Set the right team on your project
      teamid: CredentialsManager::AppfileConfig.try_fetch_value(:team_id)
    )
    build_app(
      workspace: "project.xcworkspace",
      scheme: "project",
      clean: true,
      export_method: "app-store",
      export_options: {
        provisioningProfiles: {
            CredentialsManager::AppfileConfig.try_fetch_value(:app_identifier) => CredentialsManager::AppfileConfig.try_fetch_value(:app_identifier) + " AppStore" # Value of this parameter is the name of the Provisioning Profile. By default, it will be "{bundleId} AppStore"
        }
      },
      build_path: "./builds",
      output_directory: "./builds")
    upload_to_testflight
  end
end

播客文件:

require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/react-native-unimodules/cocoapods.rb'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '10.0'

target 'project' do
  use_unimodules!
  config = use_native_modules!

  use_react_native!(:path => config["reactNativePath"])

  target 'projectTests' do
    inherit! :complete
    # Pods for testing
  end

  # Enables Flipper.
  #
  # Note that if you have use_frameworks! enabled, Flipper will not work and
  # you should disable these next few lines.
  use_flipper!({ 'Flipper-Folly' => '2.3.0' })
  post_install do |installer|
    flipper_post_install(installer)
    installer.pods_project.targets.each do |target|
      target.build_configurations.each do |config|
        config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
      end
    end
end


  target 'project-tvOSTests' do
    inherit! :search_paths
    # Pods for testing
  end
end

不得不将 package.json 中的 mapbox 包更新为一周前发布的测试版。

"@react-native-mapbox-gl/maps": "8.2.0-beta1",

https://github.com/react-native-mapbox-gl/maps/pull/1262