未定义的方法 `use_unimodules!'安装 react-native-unimodules 时

undefined method `use_unimodules!' when installing react-native-unimodules

按照 this 指南安装 react-native-unimodules 让我在执行 pod install

时出现以下错误
[!] Invalid `Podfile` file: undefined method `use_unimodules!' for #<Pod::Podfile:0x00007ff24708eaa8>
Did you mean?  use_native_modules!.

 #  from /Users/Shared/workspace/App/ios/Podfile:7
 #  -------------------------------------------
 #  target 'reactProducerApp' do
 >    use_unimodules!
 #    config = use_native_modules!
 #  -------------------------------------------

这是我的 Pod 文件

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

platform :ios, '11.0'

target 'reactProducerApp' do
  use_unimodules!
  config = use_native_modules!

  use_react_native!(
    :path => config[:reactNativePath],
    # to enable hermes on iOS, change `false` to `true` and then install pods
    :hermes_enabled => false
  )

  target 'reactProducerAppTests' 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!()

  post_install do |installer|
    react_native_post_install(installer)
  end
end

对正在发生的事情有什么想法吗?

安装react-native-unimodules需要使用它自己的cocoapods。如果您将下面的这一行添加到 Podfile.

的第三行,则 use_unimodules! 将被定义
require_relative '../node_modules/react-native-unimodules/cocoapods.rb'