iOS:React Native 版本 0..72.1 -> 'react/debug/react_native_assert.h' 文件未找到错误

Mak*_*ajo 5 javascript xcode cross-platform react-native podfile

我收到错误:未找到“react/debug/react_native_assert.h”文件,React-utils/RunLoopObserver。问题似乎是我添加的 pre_install 挂钩:

dynamic_frameworks = [
    'Starscream',
    'iProov',
    'DatadogSDK',
    'SwiftProtobuf',
]
pre_install do |installer|
  installer.pod_targets.each do |pod|
    if !dynamic_frameworks.include?(pod.name)
      puts "Overriding the static_framework? method for #{pod.name}"
      def pod.static_framework?;
        true
      end
      def pod.build_type;
        Pod::BuildType.static_library
      end
    end
  end
end

I cannot remove the pre_install hook as it is required to run one of my dependencies
Run Code Online (Sandbox Code Playgroud)

nav*_*med 0

使用此命令 USE_FRAMEWORKS=static NO_FLIPPER=1 pod install

https://github.com/facebook/react-native/issues/38140

它适用于我的情况。