Trying to build a Cocoapod for iOS and Couchbase Lite

I just found this blog which helped to understand how to access ObjC that resides in a cocoa touch framework.

I followed the steps:

  1. Create a new Xcode workspace
  2. Create a new Cocoa Touch Framework called CouchbaseUtils
  3. Download Couchbase Lite iOS and drag CouchbaseLite.framework in the Xcode framework
  4. Drag all the headers in the public headers section in build settings like so:
  5. Add the following line in CouchbaseUtils.h to make the Couchbase Lite API accessible:
#import <CouchbaseUtils/CouchbaseLite.h>
  1. Create a new single view application in the same workspace
  2. In Link binary with libraries, add CouchbaseUtils.framework
  3. Import the Couchbase Utils framework in swift classes
import CouchbaseUtils

Now, you should be able to use this CouchbaseUtils framework in other projects. Here, Couchbase Lite isn’t a pod which means that you will have to re-import it when a new version is available. It would be great to make it work with cocoapods so we’d only change the podfile to pull the new version.

An example workspace can be found here http://cl.ly/2R323a1Y1M2F

James