Christos Hadjikyriacou Christos Hadjikyriacou - 1 year ago 127
Objective-C Question

How to import FMDB to a swift framework

I want to use FMDB in a swift framework. I follow this tutorial but i am getting this error.

Opening import file for module 'Swift': Not a directory

I did all the steps exactly as mentioned in the tutorial.

Also i tried to import the files (not create a seperate framework) but it gives me an error saying that cannot import a non modular header file.

Rob Rob
Answer Source

FYI, you can now build framework for FMDB using the master branch, and using the swiftFramework branch that I discussed below is no longer needed. (That branch was created because of a problem in Xcode 6 and 7 that prevented the creation of frameworks that referenced non-modular headers.)

For example, see issue #540 for an example of how to build the frameworks using Carthage. Note, you don't have to use Carthage, but it demonstrates that the swiftFramework branch isn't needed anymore.

I'll keep the original answer below for historical purposes, but it appears that it is no longer applicable. We can build FMDB framework without incident now in Xcode 8.

There is a FMDB branch (see swiftFramework branch) that was created to allow you to create a separate framework for FMDB. For instructions on how to use it, see Using FMDB in a framework discussion at the end of the README for that branch.

Note, this is a separate branch and has not been integrated into the master branch (and probably won't until FMDB 3.0 because it includes some trivial, yet non-backward compatible changes). So, if you don't need it in a framework, I'd suggest just adding the the source to your project directly, rather than separate framework. But if you need a framework, the above branch may help you out.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download