[英]How to Combine Post Install in Podfile in React Native?
I need to add the following post install to the Podfile.我需要将以下安装后添加到 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
But encountered this error.但是遇到了这个错误。
[!] Invalid `Podfile` file: [!] Specifying multiple `post_install` hooks is unsupported..
There are two post install in the Podfile. Podfile 中有两个 post install。 How should I combine them to resolve the error?我应该如何结合它们来解决错误?
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
The following seems to work以下似乎有效
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
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.