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

Trying and failing to make OMGHTTPURLRQ Carthage compatible #294

Closed
mxcl opened this issue Feb 2, 2015 · 9 comments
Closed

Trying and failing to make OMGHTTPURLRQ Carthage compatible #294

mxcl opened this issue Feb 2, 2015 · 9 comments

Comments

@mxcl
Copy link
Contributor

mxcl commented Feb 2, 2015

OMGHTTPURLRQ now has an xcodeproj, it builds an iOS framework. When I try to make Carthage use it I get this output:

$ carthage update --verbose
*** Fetching OMGHTTPURLRQ
*** Checking out OMGHTTPURLRQ at "2.1.1"
*** xcodebuild output can be found in /var/folders/9p/55y6r8hs3yz2qkhvf74gc0gh0000gn/T/carthage-xcodebuild.h7Khzj.log
*** Building scheme "OMGHTTPURLRQ" in OMGHTTPURLRQ.xcodeproj
** BUILD FAILED **


The following build commands failed:
    Check dependencies
(1 failure)


$ cat Cartfile
github "mxcl/OMGHTTPURLRQ"
$ ls Carthage/Build/
$

Quick link: https://github.com/mxcl/OMGHTTPURLRQ

I figure I am missing something key, but I can't find docs for the framework-owner portion of Carthage. Thank you.

@mattrubin
Copy link
Member

Did you check the xcodebuild output? The log file has more detailed information about what caused the build to fail.

@mxcl
Copy link
Contributor Author

mxcl commented Feb 2, 2015

I see, I assumed it was a Carthage dependency issue. My bad assumption.

Build settings from command line:
    SDKROOT = iphonesimulator8.1

=== BUILD TARGET OMGHTTPURLRQ OF PROJECT OMGHTTPURLRQ WITH CONFIGURATION Release ===

Check dependencies

Write auxiliary files
write-file /Users/mxcl/Library/Developer/Xcode/DerivedData/OMGHTTPURLRQ-eilctxdmnyhlmdgzmtnyizcqjlws/Build/Intermediates/OMGHTTPURLRQ.build/all-product-headers.yaml

=== BUILD TARGET OMGTest OF PROJECT OMGHTTPURLRQ WITH CONFIGURATION Release ===

Check dependencies

ProcessInfoPlistFile /Users/mxcl/Library/Developer/Xcode/DerivedData/OMGHTTPURLRQ-eilctxdmnyhlmdgzmtnyizcqjlws/Build/Products/Release-iphonesimulator/OMGTest.xctest/Info.plist Tests/Tests-Info.plist
    cd /Users/mxcl/scratch/CarthageTest/Carthage/Checkouts/OMGHTTPURLRQ
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/mxcl/Library/PreferencePanes/MM.prefPane/Contents/bin:/Users/mxcl/.gem/ruby/2.0.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    builtin-infoPlistUtility /Users/mxcl/scratch/CarthageTest/Carthage/Checkouts/OMGHTTPURLRQ/Tests/Tests-Info.plist -expandbuildsettings -format binary -platform iphonesimulator -o /Users/mxcl/Library/Developer/Xcode/DerivedData/OMGHTTPURLRQ-eilctxdmnyhlmdgzmtnyizcqjlws/Build/Products/Release-iphonesimulator/OMGTest.xctest/Info.plist

Touch /Users/mxcl/Library/Developer/Xcode/DerivedData/OMGHTTPURLRQ-eilctxdmnyhlmdgzmtnyizcqjlws/Build/Products/Release-iphonesimulator/OMGTest.xctest
    cd /Users/mxcl/scratch/CarthageTest/Carthage/Checkouts/OMGHTTPURLRQ
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/mxcl/Library/PreferencePanes/MM.prefPane/Contents/bin:/Users/mxcl/.gem/ruby/2.0.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /usr/bin/touch -c /Users/mxcl/Library/Developer/Xcode/DerivedData/OMGHTTPURLRQ-eilctxdmnyhlmdgzmtnyizcqjlws/Build/Products/Release-iphonesimulator/OMGTest.xctest

** BUILD SUCCEEDED **

Build settings from command line:
    SDKROOT = iphoneos8.1

=== BUILD TARGET OMGHTTPURLRQ OF PROJECT OMGHTTPURLRQ WITH CONFIGURATION Release ===

Check dependencies

Write auxiliary files
write-file /Users/mxcl/Library/Developer/Xcode/DerivedData/OMGHTTPURLRQ-eilctxdmnyhlmdgzmtnyizcqjlws/Build/Intermediates/OMGHTTPURLRQ.build/all-product-headers.yaml

=== BUILD TARGET OMGTest OF PROJECT OMGHTTPURLRQ WITH CONFIGURATION Release ===

Check dependencies
CodeSign error: code signing is required for product type 'Unit Test Bundle' in SDK 'iOS 8.1'

Is there something I must do so it doesn't build the test target?

@mxcl
Copy link
Contributor Author

mxcl commented Feb 2, 2015

As further information. I can build the framework when I open the project in Xcode itself.

@mattrubin
Copy link
Member

Carthage builds a "fat" framework which can be used both in the simulator and on device. In addition, xcodebuild doesn't allow you to build a device-compatible framework which isn't code-signed. Thus, you need to have a code-signing identity specified (for the Release configuration) for Carthage to build a framework.

You can find more discussion in this issue.

@mattrubin
Copy link
Member

Taking another look at the build log, it appears the code-signing failure is on the OMGTest target, and not on OMGHTTPURLRQ. I'm not sure why Carthage is building what I assume is a test bundle, but you may be able to alter your project schemes to avoid building the tests as a dependency of the framework.

Also: You can run carthage build --no-skip-current in the framework's project directory to test Carthage compatibility without having to set up a Cartfile and download dependencies in another project.

@mxcl
Copy link
Contributor Author

mxcl commented Feb 2, 2015

I believe the code signing stuff is set up correctly, but indeed, it is failing trying to build the test target, I'll look further, thanks.

@mxcl
Copy link
Contributor Author

mxcl commented Feb 2, 2015

FFR I fixed this by unchecking "Find implicit dependencies" in the scheme management settings for the Build section.

So Xcode itself decided the tests were an implicit dependency of the main target. Thanks Xcode.

Thanks for your help.

@mxcl mxcl closed this as completed Feb 2, 2015
@mattrubin
Copy link
Member

Silly Xcode... 😕

Glad I could help!

@jspahrsummers
Copy link
Member

Thanks for helping out, @mattrubin!

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

No branches or pull requests

3 participants