Commit 49ba1272 authored by Maik Gosenshuis's avatar Maik Gosenshuis

Match IPHONEOS_DEPLOYMENT_TARGET build setting with deployment_target option in…

Match IPHONEOS_DEPLOYMENT_TARGET build setting with deployment_target option in generated Pods project file
parent 7e2875a6
...@@ -98,6 +98,9 @@ module Xcodeproj ...@@ -98,6 +98,9 @@ module Xcodeproj
if platform.requires_legacy_ios_archs? if platform.requires_legacy_ios_archs?
settings['ARCHS'] = "armv6 armv7" settings['ARCHS'] = "armv6 armv7"
end end
if platform == :ios && platform.deployment_target
settings['IPHONEOS_DEPLOYMENT_TARGET'] = platform.deployment_target.to_s
end
if scheme == :debug if scheme == :debug
settings.merge!(COMMON_BUILD_SETTINGS[:debug]) settings.merge!(COMMON_BUILD_SETTINGS[:debug])
settings['ONLY_ACTIVE_ARCH'] = 'YES' if platform == :osx settings['ONLY_ACTIVE_ARCH'] = 'YES' if platform == :osx
......
...@@ -76,5 +76,15 @@ describe 'Xcodeproj::Project' do ...@@ -76,5 +76,15 @@ describe 'Xcodeproj::Project' do
@project.build_configuration("Debug").buildSettings["ARCHS"].should == "$(ARCHS_STANDARD_32_BIT)" @project.build_configuration("Debug").buildSettings["ARCHS"].should == "$(ARCHS_STANDARD_32_BIT)"
@project.build_configuration("Release").buildSettings["ARCHS"].should == "$(ARCHS_STANDARD_32_BIT)" @project.build_configuration("Release").buildSettings["ARCHS"].should == "$(ARCHS_STANDARD_32_BIT)"
end 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
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