繁体   English   中英

-U 和 -bitcode_bundle (Xcode 设置 ENABLE_BITCODE=YES) 在 Xcode 中不能一起使用 13

[英]-U and -bitcode_bundle (Xcode setting ENABLE_BITCODE=YES) cannot be used together in Xcode 13

当我尝试在 Xcode 中运行应用程序时,我遇到了这个问题。 我的 Xcode 版本是 13.2.1 (13C100)

-U 和 -bitcode_bundle(Xcode 设置 ENABLE_BITCODE=YES)不能一起使用

这是我的播客文件

$RNFirebaseAsStaticFramework = true
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '13.0'
install! 'cocoapods', :deterministic_uuids => false

target 'Mcsc' do
  use_frameworks!
  config = use_native_modules!

  pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'

  pod 'GoogleMaps'

  pod 'RNFBApp', :path => '../node_modules/@react-native-firebase/app'
  pod 'GoogleUtilities', :modular_headers => true
  pod 'Firebase', :modular_headers => true
  pod 'FirebaseCore', :modular_headers => true
  pod 'FirebaseCoreInternal', :modular_headers => true
  pod 'FirebaseStorage', :modular_headers => true
  pod 'FirebaseStorageInternal', :modular_headers => true
  pod 'FirebaseAppCheckInterop', :modular_headers => true
  pod 'FirebaseAuthInterop', :modular_headers => true
  pod 'FirebaseCoreExtension', :modular_headers => true

  permissions_path = '../node_modules/react-native-permissions/ios'
  pod 'Permission-LocationWhenInUse', :path => "#{permissions_path}/LocationWhenInUse"

  # Flags change depending on the env values.
  flags = get_default_flags()

  use_react_native!(
    :path => config[:reactNativePath],
    # to enable hermes on iOS, change `false` to `true` and then install pods
    :hermes_enabled => flags[:hermes_enabled],
    :fabric_enabled => flags[:fabric_enabled],
    # An absolute path to your application root.
    :app_path => "#{Pod::Config.instance.installation_root}/.."
  )

  target 'McscTests' 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 the next line.
  # use_flipper!()

  pre_install do |installer|
    Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
    installer.pod_targets.each do |pod|
      if pod.name.eql?('RNPermissions') || pod.name.start_with?('Permission-')
        def pod.build_type;
          # Uncomment the line corresponding to your CocoaPods version
          Pod::BuildType.static_library # >= 1.9
          # Pod::Target::BuildType.static_library # < 1.9
        end
      end
    end
  end

  post_install do |installer|
    # config.build_settings['ENABLE_BITCODE'] = 'NO'
    # Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
    react_native_post_install(installer)
    __apply_Xcode_12_5_M1_post_install_workaround(installer)
    `sed -i -e  $'s/__IPHONE_10_0/__IPHONE_12_0/' Pods/RCT-Folly/folly/portability/Time.h`
  end
end

任何帮助都会很棒。 我尝试禁用位码,但它仍然在错误消息中显示 ENABLE_BITCODE=YES - 也清理了我的构建文件夹。 现在真的没想法了。

Bitcode 在 Xcode 14 中已弃用。因此,最好简单地禁用它,这样就没有问题了。 在 postinstall 的 Podfile 中添加这些行

post_install do |installer|
    installer.pods_project.targets.each do |target|
      target.build_configurations.each do |config|
        config.build_settings['ENABLE_BITCODE'] = 'NO'
      end
    end
end

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM