3

I am new to iOS development and tried to merge the following pieces of code into one post_install hook without luck:

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
    target.build_configurations.each do |config|
      target.build_settings(config.name)['CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES'] = 'YES'
    end
  end
end

post_install do |pi|
  t = pi.pods_project.targets.find { |t| t.name == 'MyPod' }
  t.build_configurations.each do |bc|
    bc.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
  end
end

How do I turn this into one post_install hook ? I did not find a solution for declaring multiple variables and haven't quite figured out how the syntax really works.

I'd really appreciate a hint.

error message

Specifying multiple `post_install` hooks is unsupported.

Best regards!

BerlinUkn0w
  • 458
  • 4
  • 8

0 Answers0