Hi,
I'm working in a framework and using carthage to manage dependencies. After dragging the built modules to 'Linked Frameworks and Libraries' in Xcode, if I try to build my module, XCode complains that the module if missing. If I add the whole project from the carthage Checkouts directory to my workspace in Xcode, my module builds. Afterwards, if I remove the imported project, but I left the reference in 'Linked Frameworks and Libraries' my own frameworks continues to build correctly. Any ideas why this happens? Where is XCode taking the module from?
Thx,
LR
EDIT: I noticed that if I remove the contents of Derived Data, it fails again to build. So I think Xcode is taking the module from derived data. If so, what's the point of the "Build" folder in Carthage?
After dragging the built modules to 'Linked Frameworks and Libraries' in Xcode, if I try to build my module, XCode complains that the module if missing.
You might also need to set the Framework Search Paths.
If I add the whole project from the carthage Checkouts directory to my workspace in Xcode, my module builds.
This is another valid configuration. It has some plusses and minuses.
I noticed that if I remove the contents of Derived Data, it fails again to build. So I think Xcode is taking the module from derived data. If so, what's the point of the "Build" folder in Carthage?
That sounds correct to me.
The DerivedData directory is pretty temporary, and it's not uncommon to need to delete it. (As you've discovered here. :trollface:) The Carthage/Build folder (1) means that clearing derived data doesn't require you to rebuild dependencies and (2) allows you to add the built frameworks to your source control system if that's what you're into.
But Carthage/Build isn't really useful if you're adding your dependencies' projects directly to your Xcode project/workspace. In that case, you can use the --no-build option to tell Carthage not to build the dependencies.
I don't want to directly add the dependencies. The problem is that if I don't add them, it doesn't work at all.
You might also need to set the Framework Search Paths.
How do I do that?
Thx!
LR
Build Settings -> Search Paths -> Framework Search Paths
thx.
On Tue, Dec 8, 2015 at 7:06 PM, Douglas Beal [email protected]
wrote:
Build Settings -> Search Paths -> Framework Search Paths
—
Reply to this email directly or view it on GitHub
https://github.com/Carthage/Carthage/issues/956#issuecomment-162964683.
Closing this for now. Feel free to reopen if you have any updates or further information!
I am having this issue with the carthage build of GCDAsyncSocket.
I've enabled modules in my build.
I've added it to the "Link Binary With Libraries"
I've also added a recursive path for my Frameworks folder which includes the GCDAsyncSocket.framework file into the "Framework Search Paths"
Still no such luck - it says: Module "CocoaAsyncSocket" not found.
Very perplexing.
Nevermind - apparently the --recursive option doesn't work in XCode 8 - POS. Sorry and thanks.
Most helpful comment
You might also need to set the
Framework Search Paths.This is another valid configuration. It has some plusses and minuses.
That sounds correct to me.
The DerivedData directory is pretty temporary, and it's not uncommon to need to delete it. (As you've discovered here. :trollface:) The
Carthage/Buildfolder (1) means that clearing derived data doesn't require you to rebuild dependencies and (2) allows you to add the built frameworks to your source control system if that's what you're into.But
Carthage/Buildisn't really useful if you're adding your dependencies' projects directly to your Xcode project/workspace. In that case, you can use the--no-buildoption to tell Carthage not to build the dependencies.