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

Non-framework schemes cause builds to fail #124

Closed
0xced opened this issue Nov 21, 2014 · 5 comments · Fixed by #141
Closed

Non-framework schemes cause builds to fail #124

0xced opened this issue Nov 21, 2014 · 5 comments · Fixed by #141
Assignees
Labels
Milestone

Comments

@0xced
Copy link
Contributor

0xced commented Nov 21, 2014

I’m trying to build XCDYouTubeKit with this simple Cartfile:

github "0xced/XCDYouTubeKit" ~> 2.0.0

Here is what I get:

$ carthage bootstrap
*** Checking out XCDYouTubeKit at "2.0.3"
*** xcodebuild output can be found in /var/folders/1l/rbhqr1jx4fdbgxmf58vwdw700000gq/T/carthage-xcodebuild.RXXr6v.log
*** Building scheme "XCDYouTubeKit iOS Framework" in XCDYouTubeKit Demo.xcworkspace
*** Building scheme "XCDYouTubeKit iOS Static Library" in XCDYouTubeKit Demo.xcworkspace
xcodebuild did not return a value for build setting WRAPPER_NAME

I see 3 issues here.

  1. Since a ProjectLocator prefers workspaces over projects, carthage picks the wrong one: XCDYouTubeKit Demo.xcworkspace instead of XCDYouTubeKit.xcodeproj. Maybe that’s not an actual issue since the framework is built anyway. I’ll open another issue if it turns out to be a blocker.
  2. The XCDYouTubeKit OS X Framework scheme is not built because Carthage aborts after it chokes on the static library scheme.
  3. Highly related to the previous issue: Carthage tries to build the product of a static library scheme. Maybe it should identify it as a static library scheme and ignore it instead?
@robrix
Copy link
Contributor

robrix commented Nov 21, 2014

Highly related to the previous issue: Carthage tries to build the product of a static library scheme. Maybe it should identify it as a static library scheme and ignore it instead?

Totally. I wonder how we can retrieve build settings from schemes?

@robrix
Copy link
Contributor

robrix commented Nov 21, 2014

Alternatively/additionally, perhaps we should be able to specify the project/workspace/scheme/target/configuration we want to use?

@0xced
Copy link
Contributor Author

0xced commented Nov 21, 2014

Totally. I wonder how we can retrieve build settings from schemes?

This works well:

xcodebuild -showBuildSettings -workspace "XCDYouTubeKit Demo.xcworkspace" -scheme "XCDYouTubeKit iOS Framework"

Alternatively/additionally, perhaps we should be able to specify the project/workspace/scheme/target/configuration we want to use?

Looks like a sensible solution to me. But where should it be specified? A Cartspec file? 😁

@jspahrsummers
Copy link
Member

I wonder how we can retrieve build settings from schemes?

We already do this.

I like the suggestion of just skipping static libraries. That seems like something we want no matter what.

@0xced
Copy link
Contributor Author

0xced commented Nov 21, 2014

Even better than skipping static libraries would be to build dynamic frameworks only since that’s the only supported packaging. This would also automatically skip unit test targets.

Filtering on PACKAGE_TYPE = com.apple.package-type.wrapper.framework plus MACH_O_TYPE = mh_dylib would be a pretty strong identification of dynamic frameworks I think.

@jspahrsummers jspahrsummers changed the title Building XCDYouTubeKit Non-framework schemes cause builds to fail Nov 22, 2014
@jspahrsummers jspahrsummers added this to the 0.3: Submodules Support milestone Nov 22, 2014
@jspahrsummers jspahrsummers self-assigned this Nov 24, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants