Commit ffbf18f6 authored by Eloy Durán's avatar Eloy Durán

Merge pull request #134 from maikg/deployment_target

Match IPHONEOS_DEPLOYMENT_TARGET build setting with deployment_target option in generated Pods project file
parents 7e2875a6 49ba1272
......@@ -98,6 +98,9 @@ module Xcodeproj
if platform.requires_legacy_ios_archs?
settings['ARCHS'] = "armv6 armv7"
end
if platform == :ios && platform.deployment_target
settings['IPHONEOS_DEPLOYMENT_TARGET'] = platform.deployment_target.to_s
end
if scheme == :debug
settings.merge!(COMMON_BUILD_SETTINGS[:debug])
settings['ONLY_ACTIVE_ARCH'] = 'YES' if platform == :osx
......
......@@ -76,5 +76,15 @@ describe 'Xcodeproj::Project' do
@project.build_configuration("Debug").buildSettings["ARCHS"].should == "$(ARCHS_STANDARD_32_BIT)"
@project.build_configuration("Release").buildSettings["ARCHS"].should == "$(ARCHS_STANDARD_32_BIT)"
end
it "sets IPHONEOS_DEPLOYMENT_TARGET for both configurations" do
@project = Xcodeproj::Project.for_platform(Pod::Platform.new(:ios))
@project.build_configuration("Debug").buildSettings["IPHONEOS_DEPLOYMENT_TARGET"].should == "4.3"
@project.build_configuration("Release").buildSettings["IPHONEOS_DEPLOYMENT_TARGET"].should == "4.3"
@project = Xcodeproj::Project.for_platform(Pod::Platform.new(:ios, :deployment_target => "4.0"))
@project.build_configuration("Debug").buildSettings["IPHONEOS_DEPLOYMENT_TARGET"].should == "4.0"
@project.build_configuration("Release").buildSettings["IPHONEOS_DEPLOYMENT_TARGET"].should == "4.0"
end
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment