1

Here’s what I’m trying to do, in a Mac App:

  1. Mac App uses my own custom OS X framework called Proto (for short).
  2. Proto has a class like Animator.swift that uses Facebook’s pop library. It uses symbols from it like kPOPLayerBackgroundColor.
  3. pop provides frameworks for iOS and OS X. I’m only interested in the OS X version.

But I can’t seem to make this setup work. My Mac app can successfully use Proto up until I start trying to have Proto include (link to) the pop.framework. I can’t use Cocoapods for this project.

I feel like I’ve tried everything (bridging headers, frameworks, module maps, header paths, etc) but I can’t seem to get all the pieces right. Can someone give me a play by play on how to get this all to work correctly?

Edit

The errors vary, but the main problem seems to be I can’t get Proto code to find symbols from pop.

So, I’ve tried making a bridging header and doing #import <pop/POP.h> but then Swift gives me an error I can’t use bridging headers in a framework (although I’m staring at another framework that does use a bridging header :).

So I’ve tried instead importing pop in my framework’s umbrella header (Proto.h) but it still won’t compile, saying I can’t import non-modular includes (even though pop-osx-framework.framework says it is a module).

jbrennan
  • 11,943
  • 14
  • 73
  • 115

1 Answers1

0

What's the actual error or problem? Generally you should be able to link your framework against their library and then use your framework in your app. Is pop a library or an actual dynamic framework? You should not link pop into the app likely, just into Proto.

  • Pop vends a dynamic library (framework) for OS X but I’m not convinced it’s properly configured. I can’t seem to bridge pop’s headers into Proto, so Proto code can’t find pop symbols. – jbrennan Jul 31 '15 at 14:40