【问题标题】:How to Combine Post Install in Podfile in React Native?如何在 React Native 中结合 Podfile 中的 Post Install?
【发布时间】:2020-08-19 23:33:33
【问题描述】:

我需要将以下安装后添加到 Podfile。

post_install do |pi|
  pi.pods_project.targets.each do |t|
    t.build_configurations.each do |config|
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
    end
  end
end

但是遇到了这个错误。

[!] Invalid `Podfile` file: [!] Specifying multiple `post_install` hooks is unsupported..

Podfile 中有两个 post install。我应该如何结合它们来解决错误?

post_install do |installer|
    flipper_post_install(installer)
  end
end

post_install do |pi|
  pi.pods_project.targets.each do |t|
    t.build_configurations.each do |config|
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
    end
  end
end

【问题讨论】:

    标签: ios reactjs react-native cocoapods react-native-ios


    【解决方案1】:

    以下似乎有效

      post_install do |installer|
        flipper_post_install(installer)
        installer.pods_project.targets.each do |t|
          t.build_configurations.each do |config|
            config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
          end
        end
      end
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-02-24
      • 1970-01-01
      • 1970-01-01
      • 2022-06-11
      • 2019-11-16
      • 2022-06-20
      • 2020-10-30
      • 1970-01-01
      相关资源
      最近更新 更多