-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
'carthage build' failed to copy frameworks for macOS. #1513
Comments
This should not be a Carthage's issue. Looks like the project is not correctly setup as a universal framework target. Just setting |
I tried to use the xcconfigs files in this project (https://github.com/SeedLabIO/FlagKit/commits/swift3) It builds successfully, however, after I drag the framework under
I thought the copy framework still did something wrong, so I add some log in Xcode.swift
And run
I think carthage still copy the framework build from |
Hmm, so looks like currently
So the following is not the solution: if let sdk = sdk {
args += [ "-sdk", sdk.rawValue ]
} Overriding |
Thanks for the reply! |
carthage version
: 0.18xcodebuild -version
: Xcode 8.0, Build version 8A218a--no-build
? No--no-use-binaries
? No--use-submodules
? NoCartfile
Carthage Output
Issue Description
The framework I used (FlagKit) has only one target with Base SDK: iOS 10.0, supported platforms: macosx iphonesimulator iphoneos appletvsimulator appletvos:
Carthage always tries to copy the framework in base sdk folder (Release-iphoneos) to /Build/Mac. Hence it failed to build because:
I tried to set the baseSDK to tvOS 10.0 for FlagKit project in /Checkout/FlagKit folder, and run 'carthage build', the output turns out to be
Though I can using 'carthage build --platform iOS' to force build a framework file in the base sdk folder, after 'carthage build' successful, I drag the framework in '/Build/Mac' to my project, it won't build due to the error:
Because the framework carthage copy to '/Build/Mac' is still under '/DerivedData/FlagKit-x/Build/Products/Release-iphoneos/FlagKit.framework'.
Reason
After clone the carthage project, I find #922 causing this issue.
in Xcode.swift:
I think it means, when platform is macOS, don't pass '-sdk' arguments, build with projects base sdk, which doesn't works when the project's base sdk isn't macOS.
Solution
I think the codes really should be just like:
The text was updated successfully, but these errors were encountered: