Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Spaces in Xcode Path Break Search Paths #682

Closed
SlaunchaMan opened this Issue · 5 comments

3 participants

Jeff Kelley Eloy Durán Fabio Pelosin
Jeff Kelley

Consider a pod like GData. It requires libxml, so it adds $(SDKROOT)/usr/include/libxml2 to the HEADER_SEARCH_PATHS configuration. Problem is, it doesn’t add quotation marks around it, so a space in the path will break and the compiler won’t be able to find libxml headers.

Any time a path is added to HEADER_SEARCH_PATHS, it should be surrounded by quotes.

Eloy Durán
Owner

I agree, but atm we merge build settings in a such a way that it is possible to specify anything in as the value, so we can't simply quote them without somehow interpreting them and knowing where the quotes should be inserted.

It should eventually be fixed, but for now I would like to keep this mechanism as simple as possible, so the current fix would be to add the quotes to the spec. Care to fix that?

Eloy Durán
Owner

Thinking about it some more, we could probably fix this by starting to accept arrays of values instead of only strings that may contain multiple values, then we’ll be able to more easily quote values and remove duplicates.

Not sure yet if accepting one string instead of an array of strings should be deprecated, though.

Fabio Pelosin

Thinking about it some more, we could probably fix this by starting to accept arrays of values instead of only strings that may contain multiple values, then we’ll be able to more easily quote values and remove duplicates.

I think that this solution should work.

Not sure yet if accepting one string instead of an array of strings should be deprecated, though.

Depends on how much strict we want to be about this issue. If we force the use of the arrays, people are more likely of no setting two paths on one string. In any case, if we add quotes, the podspec should fail if multiple paths are specified in one string.

Jeff Kelley

I’ve sent a pull request for this issue in GData: CocoaPods/Specs#854

Fabio Pelosin
Owner

this issue should be mitigated if not completely fixed by the introduction of the bundled_library attribute of the specification DSL.

Jose Zapater jzapater referenced this issue from a commit in jzapater/CocoaPods
Jeff Kelley SlaunchaMan Add quotes around libxml header search path
Fixes a problem you’ll encounter (see #682) if you have a space in `SDKROOT`.
1cbbcf8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.