#iOS知识小集# 「 解决CocoaPods v1.7.0生成了多Xcodeproj 后的post_install问题」 @jkpang-庞

今天更新CocoaPods v1.7.0并生成多个Xcodeproj后,在设置这些子Projects、Targets相关配置参数时(post_install操作)遇到的问题,后来通过查看CocoaPods源码installer.rb文件找到了解决方案,只需在Podfile内容最后写上下列代码即可:
post_install do |installer|
installer.pod_target_subprojects.each do |project|
project.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '10.0'
end
project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '10.0'
end
end
end
end
展开
评论