在 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 中提供这些命令?