Skip to content
This repository has been archived by the owner on Jun 20, 2021. It is now read-only.

Shenzhen::XcodeBuild#settings skips first target #29

Closed
sirbarrence opened this issue Jan 11, 2013 · 0 comments · Fixed by #31
Closed

Shenzhen::XcodeBuild#settings skips first target #29

sirbarrence opened this issue Jan 11, 2013 · 0 comments · Fixed by #31

Comments

@sirbarrence
Copy link

When Shenzhen::XcodeBuild#settings is parsing xcodebuild's -showBuildSettings output, the first line, which contains the first target name, is shifted off before proceeding to iterate over the lines. Therefore the first target's settings are never returned in the Settings object. If the project only had one target, an empty Settings object is returned.

Steps to reproduce:

  1. Create a new iOS project named "Bazinga" in Xcode.
  2. Ensure that Include Unit Tests is not checked in the new project wizard.
  3. Invoke the following script in the project directory:
#!/usr/bin/env ruby
require "shenzhen"

foo = Shenzhen::XcodeBuild.settings("-project Bazinga.xcodeproj", "-scheme Bazinga", "-configuration Debug")
puts foo.members.length

I would expect the output to be 1 for the Bazinga target, but instead it's 0.

Perhaps in a version of Xcode prior to 4.5.2, xcodebuild emitted some unwanted first line in its output that needed to be discarded? Apparently this is no longer the case.

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

Successfully merging a pull request may close this issue.

1 participant