-
Notifications
You must be signed in to change notification settings - Fork 602
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
Fix Carthage support #89
Conversation
Mmmmh. Probably an So as I understand it, you duplicated the iOS Unit Tests target to assign this copy to the iOS Framework target and change its Deployment Target, right? Maybe it would be simpler just to remove the test target from the framework scheme altogether rather than having two duplicate targets to maintain. After all, the Unit Tests target only contains functional tests (there is no integration test or whatnot in there), so as long as one can run those tests, it should be ok. The only important thing here is that the test can be run, making them run from the static lib or framework shouldn't change their behavior, so only having them associated with the StaticLib scheme should be sufficient, right? |
Hey, just for my information, because I'm not that familiar with Cartage yet:
Isn't Carthage only supposed to use/be compatible with iOS dynamic Frameworks? And as frameworks are only supported since iOS8, how come you try to run it with iOS7 simulator then? Is that supposed to work at all? I mean iOS7 + frameworks are not compatible in the first place anyway, right? |
Yes, you are right. I will remove duplicated test target and remove test target from iOS framework scheme. |
Thanks. Note the original error still seems to make sense for me, regardless of the test target stuff:
if your destination is using the iOS7 runtime, this error makes sense as iOS7 is not compatible with dynamic frameworks that was introduced with iOS8, so I'm not sure your error originates from the test target after all. |
Carthage supports dynamic framework only, thus it supports iOS 8 or later and all of OS X. And I did not try to build OHHTTPStubs.framework for iOS 7 runtime (iOS 8 or later only). The problem is we can not build framework by |
I noticed this also happened on Travis CI before. This error is avoided by adding |
Maybe you should file an issue to I mean, given what you describe, that issue is with |
Unfortunately, they decided that they will not add workaround for the similar issue. Anyway, their requirement is very simple, just making |
Damn. I don't like that our libraries (I mean not just mine but any other lib developer's too) have to do workarounds for a tool that don't want to fix issues on their end 😢 Sad that Carthage does not want to fix that at the common place 😒 That means that if one wants Carthage support, we need to report this workaround on every of our libraries instead of fixing it at only one place directly on the tool that have the problem. And they told us that "there was nothing to do for lib developers to support Carthage out of the box" ahah… I'll probably merge your PR anyway as it's ready to go, but integrating with CocoaPods or manual integration for example does not generate this issue when integrating iOS frameworks, so from my point of view it should still be up to Carthage to fix it… |
Workaround for Carthage issue
Thank you for merging. I hope this will be fixed in future version of Xcode. |
Workaround for Carthage issue
Workaround for Carthage issue
Could not install OHHTTPStubs using Carthage if iOS 7 simulator is installed. The cause of failure is
xcodebuild
misunderstands deployment target as 6.0, which is from OHHTTPStubs iOS Tests, so I separate tests target for iOS framework from OHHTTPStubs iOS Tests. This might be a bug ofxcodebuild
, but we need a workaround for now.NOTE: this is not bug of Carthage because this can be reproduced by
xcodebuild -scheme "OHHTTPStubs iOS Framework" -workspace OHHTTPStubsDemo.xcworkspace
.Cartfile:
Output: