ios - 多个部署目标 Pod install
问题描述
在 Xcode 中构建我的应用程序时,我收到多个警告,我需要将安装到 iOS 10.0 的不同 pod的'IPHONEOS_DEPLOYMENT_TARGET'设置为。
但问题是,如果我这样做,我仍然会收到警告,因为我还需要一些 pod 才能在 iOS 9.0 中。
这行得通吗?
# Uncomment the next line to define a global platform for your project
platform :ios, '10.0'
target 'myApp' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for myApp
# First I install the pods that require an iOS deployment target of 10.0 .
pod 'A'
end
# Set the iOS deployment target to 10.0 .
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '10.0'
end
end
end
# Install pods that require an iOS deployment target of 9.0 .
target 'myApp' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for myApp
pod 'B'
# Set the iOS deployment target to 9.0 .
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
end
end
end
end
如果没有,我怎样才能在我的 Podfile 中给出这些命令?
解决方案
推荐阅读
- google-cloud-platform - 当前通过系统表在 Google Bigquery 中运行的查询
- c - 使用C将int数组转换为字符串
- python - 当数组中元素的 len 大于 2 时,“解包的值太多(预期为 2)”
- c# - 如何使用 SignalR 向 C# 中的特定用户发送数据?
- python - ValueError:连接轴的所有输入数组维度必须完全匹配,但沿维度 1,
- javascript - 如何自动检索电子邮件文本并进一步抓取它们?
- linux - 如何启用对辅助驱动器的增量热备份?
- python - 通过给定的单个值列表定位数据框中的所有行
- google-sheets - 谷歌表格中的 Sumifs #ref 错误 - 无法解释
- php - HTML + PHP 验证中的日期输入