Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Set Pods' deployment target to the user project setting. #1491

wants to merge 2 commits into from

4 participants


I hope that CP can check the platform and version through Podfile and set Pod target's deployment target to the user project setting!

I think my code is simple, I hope somebody can receive my idea and update CP.

see #1241


Coverage Status

Coverage remained the same when pulling 1d7f686 on Whirlwind:master into 29697f4 on CocoaPods:master.


I think this is related to #1376.


This should use a logic similar to this one: Looking at the first build.

Also this patch is non functional because there might be more than one user projects. The intent makes sense though.

Closing for now.


Noted in #1576

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 18, 2013
  1. @Whirlwind
  2. @Whirlwind

    change code

    Whirlwind authored
This page is out of date. Refresh to see the latest.
4 lib/cocoapods/installer.rb
@@ -304,8 +304,8 @@ def prepare_pods_project
sandbox.project = @pods_project
platforms =
- osx_deployment_target = { |p| == :osx }.map(&:deployment_target).min
- ios_deployment_target = { |p| == :ios }.map(&:deployment_target).min
+ osx_deployment_target = user_project.build_configurations[0].build_settings['MACOSX_DEPLOYMENT_TARGET']
+ ios_deployment_target = user_project.build_configurations[0].build_settings['IPHONEOS_DEPLOYMENT_TARGET']
@pods_project.build_configurations.each do |build_configuration|
build_configuration.build_settings['MACOSX_DEPLOYMENT_TARGET'] = osx_deployment_target.to_s if osx_deployment_target
build_configuration.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = ios_deployment_target.to_s if ios_deployment_target
2  lib/cocoapods/installer/target_installer.rb
@@ -40,7 +40,7 @@ def initialize(sandbox, library)
def add_target
name = library.label
platform =
- deployment_target = library.platform.deployment_target.to_s
+ deployment_target = project.build_configurations[0].build_settings[platform.downcase == :ios ? 'IPHONEOS_DEPLOYMENT_TARGET' : 'MACOSX_DEPLOYMENT_TARGET']
@target = project.new_target(:static_library, name, platform, deployment_target)
library.user_build_configurations.each do |bc_name, type|
Something went wrong with that request. Please try again.