Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build setting IPHONEOS_DEPLOYMENT_TARGET has multiple values #113

Closed
mflint opened this issue Nov 1, 2013 · 9 comments
Closed

build setting IPHONEOS_DEPLOYMENT_TARGET has multiple values #113

mflint opened this issue Nov 1, 2013 · 9 comments

Comments

@mflint
Copy link

mflint commented Nov 1, 2013

Xcodeproj 0.14.0
cocoapods 0.27.1

Everything was working fine until I added a third build configuration called "Screenshots". (Previously there were just the defaults, "Debug" and "Release")

Now when I re-run "pod update" or "pod install" I see this error:

RuntimeError - [Xcodeproj] Consistency issue: build setting IPHONEOS_DEPLOYMENT_TARGEThas multiple values:{"Release"=>"6.0", "Debug"=>"6.0", "Screenshots"=>"4.3"}/Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.14.0/lib/xcodeproj/project/object/native_target.rb:82:incommon_resolved_build_setting'
/Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.14.0/lib/xcodeproj/project/object/native_target.rb:113:in deployment_target' /Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.14.0/lib/xcodeproj/project/object/native_target.rb:149:in add_build_configuration'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.27.1/lib/cocoapods/installer/target_installer.rb:47:in block in add_target' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.27.1/lib/cocoapods/installer/target_installer.rb:46:in each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.27.1/lib/cocoapods/installer/target_installer.rb:46:in add_target' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.27.1/lib/cocoapods/installer/target_installer/pod_target_installer.rb:15:in block in install!'`

This is weird. There is no mention of "4.3" anywhere in the pbxproj file.

Here's the "git diff" output (slightly abridged, but it does show the new configuration has deployment target 6.0 for each target):

diff --git a/SecretSquirrel.xcodeproj/project.pbxproj b/SecretSquirrel.xcodeproj/project.pbxproj
index 0ddaa4d..0ae74ec 100644
--- a/SecretSquirrel.xcodeproj/project.pbxproj
+++ b/SecretSquirrel.xcodeproj/project.pbxproj
@@ -4046,6 +4046,123 @@
            };  
            name = Release;
        };  
+       34EB211A18243704007E6362 /* Screenshots */ = {
+           isa = XCBuildConfiguration;
+           buildSettings = {
+               ....
+               IPHONEOS_DEPLOYMENT_TARGET = 6.0;
+               ....
+           };
+           name = Screenshots;
+       };
+       34EB211B18243704007E6362 /* Screenshots */ = {
+           isa = XCBuildConfiguration;
+           baseConfigurationReference = D5BCB7552C864FC390A8E50B /* Pods-SecretSquirrel.xcconfig */;
+           buildSettings = {
+               ....
+               IPHONEOS_DEPLOYMENT_TARGET = 6.0;
+               ....
+           };
+           name = Screenshots;
+       };
+       34EB211C18243704007E6362 /* Screenshots */ = {
+           isa = XCBuildConfiguration;
+           baseConfigurationReference = 2A0D4457AB5B40B28692352E /* Pods-SecretSquirrel Beta.xcconfig */;
+           buildSettings = {
+               ....
+               IPHONEOS_DEPLOYMENT_TARGET = 6.0;
+               ....
+           };
+           name = Screenshots;
+       };
 /* End XCBuildConfiguration section */

So that looks fine.

I can only assume that the inconsistency is in the generated xcode project for cocoapods, rather than in the xcode project for my app.

This may also be relevant:

   CocoaPods : 0.27.1
        Ruby : ruby 2.0.0p247 (2013-06-27 revision 41674) [universal.x86_64-darwin13]
    RubyGems : 2.0.3
        Host : Mac OS X 10.9 (13A603)
       Xcode : 5.0.1 (5A2053)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ 7cc542296b492be14e8d398ab32f099fae545575

Any suggestions gratefully received!

@alloy
Copy link
Member

alloy commented Nov 2, 2013

Can you share a Xcode project that illustrates the problem?

@mflint
Copy link
Author

mflint commented Nov 2, 2013

Thank-you for the reply @alloy - I tried to create a new simple project which exposes the problem, but everything works as expected.

Maybe I'll just recreate the project for this app :-)

@mflint mflint closed this as completed Nov 2, 2013
@mflint
Copy link
Author

mflint commented Nov 2, 2013

OK, my mistake, I found the problem: I was missing the platform version from "Tests" target in the Podfile:

xcodeproj 'SecretSquirrel.xcodeproj'

target :SecretSquirrel do
    platform :ios, '6.0'

    pod ...
    pod ...
end

target :'SecretSquirrel Beta' do
    platform :ios, '6.0'

    pod ...
    pod ...
end

target :'SecretSquirrel Tests' do
    # platform version missing here!
    platform :ios

    pod ...
    pod ...
end

Panic over!

@alloy
Copy link
Member

alloy commented Nov 2, 2013

Ah I see :)

You should be able to just declare that once in the top-level.

@rivera-ernesto
Copy link

I'm having the same issue even though I specify the platform:

Report

Stack

   CocoaPods : 0.31.1
        Ruby : ruby 2.0.0p247 (2013-06-27 revision 41674) [universal.x86_64-darwin13]
    RubyGems : 2.1.9
        Host : Mac OS X 10.9.2 (13C64)
       Xcode : 5.1 (5B130a)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib
Repositories : XXX - [email protected]:xxx/Private-Cocoapods-Specs.git @ f902c5a4fb31af83b0fc1b8d08497bd412c091ad
               CordovaSpecs - [email protected]:rivera-ernesto/Cordova-Podspecs.git @ 495e1bc8190a5991b075a79d739a6b8e07662cbc
               master - https://github.com/CocoaPods/Specs.git @ 3f2a9b59d63491dd3f36a612f8bb5f17c69f72e1

Podfile

platform :ios, '5.0'

pod ...
pod ...

# iOS 6+ Pods
target :bk2, :exclusive => true do
    platform :ios, '6.0'
    pod ...
end

Error

RuntimeError - [Xcodeproj] Consistency issue: build setting `IPHONEOS_DEPLOYMENT_TARGET` has multiple values: `{"Release"=>"6.0", "Debug"=>"6.0", "Debug_adhoc"=>"5.0", "Debug_sso"=>"5.0", "Local"=>"5.0", "Staging_adhoc"=>"5.0", "Staging_sso"=>"5.0", "Staging_push"=>"5.0", "Store"=>"5.0", "Store_adhoc"=>"5.0"}`
/Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.16.0/lib/xcodeproj/project/object/native_target.rb:82:in `common_resolved_build_setting'
/Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.16.0/lib/xcodeproj/project/object/native_target.rb:113:in `deployment_target'
/Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.16.0/lib/xcodeproj/project/object/native_target.rb:149:in `add_build_configuration'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.31.1/lib/cocoapods/installer/target_installer.rb:47:in `block in add_target'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.31.1/lib/cocoapods/installer/target_installer.rb:46:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.31.1/lib/cocoapods/installer/target_installer.rb:46:in `add_target'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.31.1/lib/cocoapods/installer/target_installer/pod_target_installer.rb:15:in `block in install!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.31.1/lib/cocoapods/user_interface.rb:113:in `message'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.31.1/lib/cocoapods/installer/target_installer/pod_target_installer.rb:14:in `install!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.31.1/lib/cocoapods/installer.rb:342:in `block (2 levels) in install_libraries'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.31.1/lib/cocoapods/installer.rb:339:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.31.1/lib/cocoapods/installer.rb:339:in `block in install_libraries'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.31.1/lib/cocoapods/user_interface.rb:113:in `message'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.31.1/lib/cocoapods/installer.rb:338:in `install_libraries'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.31.1/lib/cocoapods/installer.rb:115:in `block in generate_pods_project'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.31.1/lib/cocoapods/user_interface.rb:52:in `section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.31.1/lib/cocoapods/installer.rb:112:in `generate_pods_project'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.31.1/lib/cocoapods/installer.rb:90:in `install!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.31.1/lib/cocoapods/command/project.rb:38:in `run_install_with_update'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.31.1/lib/cocoapods/command/project.rb:82:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-0.5.0/lib/claide/command.rb:277:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.31.1/lib/cocoapods/command.rb:51:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.31.1/bin/pod:33:in `<top (required)>'
/usr/bin/pod:23:in `load'
/usr/bin/pod:23:in `<main>'

@mackuba
Copy link

mackuba commented Jan 27, 2015

Same here:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '7.0'

pod 'MBXMapKit'

target 'ZoomerTests', exclusive: true do
  platform :ios, '8.0'
  pod 'Quick'
  pod 'Nimble'
end

Error:

RuntimeError - [Xcodeproj] Consistency issue: build setting `IPHONEOS_DEPLOYMENT_TARGET` has multiple values: `{"Release"=>"8.0", "Debug"=>"8.0", "Debug (live)"=>"7.0", "Release (staging)"=>"7.0", "Release (live)"=>"7.0"}`

(v. 0.36.0.beta.1)

@neonichu
Copy link
Member

This should be fixed by #229

@mackuba
Copy link

mackuba commented Jan 28, 2015

Yup, it works now, thanks.

@tanmoy27112000
Copy link

if you have uncommented the ios version in podfile just comment it back

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants